Data storage method, client and server
By uploading target data from instant messaging clients to a storage server and retaining representative icons, the problem of limited storage space is solved, enabling flexible access and efficient storage of user data.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2026-04-21
AI Technical Summary
In instant messaging tools, existing cleanup methods cannot meet users' needs for viewing and using pictures, videos, and files, resulting in storage space shortages and a poor user experience.
The instant messaging client uploads the target data to the storage server and retains a representative icon locally. The storage server responds to requests to store the data and provide data download.
This saves local storage space on the client side, allowing users to retrieve data from the storage server when needed, thus improving the user experience.
Smart Images

Figure CN121907808A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a data storage method, client, and server. Background Technology
[0002] When using instant messaging (IM) tools, it is often necessary to send or receive pictures, videos, and files. After prolonged use of IM tools, users' mobile phones or computers will consume a large amount of storage space, causing problems such as insufficient hard drive space and slowed system performance.
[0003] The proposed solutions clean up images, videos, and files in instant messaging tools using two methods. One method retains image thumbnails, video thumbnails, and file icons, but deletes the images, videos, and files themselves. In this case, the images, videos, and files are still visible in the instant messaging chat context, but cannot be opened. The other method deletes all communication records, including chat text. Both methods have limitations. The first method allows users to see the existence of images, videos, and files, but they are unusable; the second method essentially deletes all communication records, making them completely undetectable to the user. Summary of the Invention
[0004] This application provides a data storage method, a client, and a server. By uploading the data of the client's local communication group to the server, the client's local storage space can be saved, and the data can be retrieved from the server for the user's use when needed, thereby improving the user experience.
[0005] In a first aspect, embodiments of this application provide a data storage method, executed by an instant messaging client, comprising:
[0006] The instant messaging client sends a first request to the storage server, the first request being used to upload target data in the target communication group in the instant messaging client to the target storage space corresponding to the instant messaging client in the storage server;
[0007] The instant messaging client deletes the target data stored locally, but retains the representative image corresponding to the target data locally.
[0008] Secondly, embodiments of this application provide a data storage method, executed by a storage server, comprising:
[0009] Obtain a first request from the instant messaging client, the first request being used to upload target data in the target communication group in the instant messaging client to the target storage space corresponding to the instant messaging client in the storage server;
[0010] In response to the first request, the target data in the target communication group in the instant messaging client is stored in the target storage space corresponding to the instant messaging client.
[0011] In some embodiments, the primary directory of the storage path of the target data in the target storage space contains the identifier of the target communication group.
[0012] In some embodiments, the second-level directory of the storage path contains the object identifier of the sender of the target data.
[0013] In some embodiments, the name of the target data in the storage path includes the time when the target data was sent in the target communication group.
[0014] In some embodiments, the target storage space is associated with the application identifier returned by the login object of the instant messaging client after completing the registration of the account in the storage server.
[0015] In some embodiments, the first request further includes an access key, which is generated by the storage server in response to the instant messaging client calling a second interface provided by the storage server and returned to the instant messaging client.
[0016] In some embodiments, the method further includes:
[0017] Obtain a second request from the instant messaging client, the second request being used to download the target data from the target storage space corresponding to the instant messaging client on the storage server;
[0018] In response to the second request, a response to the second request is sent to the instant messaging client, the response including the target data.
[0019] In some embodiments, the second request includes at least one of the storage path corresponding to the target communication group and the name of the target data.
[0020] In some embodiments, the method further includes:
[0021] Obtain a third request from the instant messaging client, the third request being used to delete the data corresponding to the target communication group in the target storage space corresponding to the instant messaging client in the storage server;
[0022] In response to the third request, the data corresponding to the target communication group in the target storage space is deleted.
[0023] In some embodiments, the third request includes an identifier of the target communication group.
[0024] Thirdly, a client is provided, including:
[0025] The sending unit is used to send a first request from the instant messaging client to the storage server. The first request is used to upload target data in the target communication group in the instant messaging client to the target storage space corresponding to the instant messaging client in the storage server.
[0026] The processing unit is used by the instant messaging client to delete the target data stored locally and retain the representative image corresponding to the target data locally.
[0027] Fourthly, a server is provided, comprising:
[0028] A receiving unit is configured to acquire a first request from an instant messaging client, the first request being used to upload target data in a target communication group in the instant messaging client to the target storage space corresponding to the instant messaging client in the storage server;
[0029] The processing unit is configured to, in response to the first request, store the target data in the target communication group in the instant messaging client into the target storage space corresponding to the instant messaging client.
[0030] Fifthly, embodiments of this application provide an electronic device, including:
[0031] Processor, adapted to implement computer instructions; and,
[0032] A computer-readable storage medium storing computer instructions adapted for loading by a processor and performing the methods provided in the first aspect or the second aspect mentioned above.
[0033] In a sixth aspect, embodiments of this application provide a computer-readable storage medium storing computer instructions that, when read and executed by a processor of a computer device, cause the computer device to perform the method provided in the first aspect or the method provided in the second aspect mentioned above.
[0034] In a seventh aspect, embodiments of this application provide a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method provided in the first aspect or the method provided in the second aspect mentioned above.
[0035] In this embodiment, the instant messaging client sends a first request to the storage server, requesting that target data be uploaded to the target storage space corresponding to the instant messaging client on the storage server. The storage server responds to the first request, storing the target data in the target storage space corresponding to the instant messaging client. The instant messaging client deletes the locally stored target data and retains the corresponding representative image locally. Therefore, this embodiment uploads the target data of a communication group to the storage space corresponding to the instant messaging client on the storage server via the instant messaging client, and deletes the target data locally on the client, retaining only the corresponding representative image, thereby saving local storage space on the client. Simultaneously, since the target data is stored on the storage server, it can be retrieved from the storage server for user access when needed, improving the user experience. Attached Figure Description
[0036] Figure 1 This is a schematic diagram illustrating an application scenario of an embodiment of this application;
[0037] Figure 2 A schematic flowchart illustrating the data storage method provided in the embodiments of this application;
[0038] Figure 3 This is a schematic diagram of the display interface of the client in an embodiment of this application;
[0039] Figure 4 This is another schematic diagram of the display interface of the client in an embodiment of this application;
[0040] Figure 5 Another illustrative flowchart of the data storage method provided in the embodiments of this application;
[0041] Figure 6 This is another schematic diagram of the display interface of the client in an embodiment of this application;
[0042] Figure 7 This is another schematic diagram of the display interface of the client in an embodiment of this application;
[0043] Figure 8 This is another schematic diagram of the display interface of the client in an embodiment of this application;
[0044] Figure 9 Another illustrative flowchart of the data storage method provided in the embodiments of this application;
[0045] Figure 10 This is a schematic block diagram of a client according to an embodiment of this application;
[0046] Figure 11 This is a schematic block diagram of a server according to an embodiment of this application;
[0047] Figure 12 This is a schematic block diagram of an electronic device according to an embodiment of this application;
[0048] Figure 13 This is a schematic block diagram of a terminal according to an embodiment of this application. Detailed Implementation
[0049] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0050] It should be understood that in the embodiments of this application, "B corresponding to A" means that B is associated with A. In one implementation, B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B solely based on A; B can also be determined based on A and / or other information.
[0051] In the description of this application, unless otherwise stated, "at least one" means one or more, and "multiple" means two or more. Additionally, "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0052] It should also be understood that the descriptions of "first", "second", etc. appearing in the embodiments of this application are only for illustration and to distinguish the objects being described, and there is no order to them. They do not indicate any special limitation on the number of devices in the embodiments of this application, and cannot constitute any limitation on the embodiments of this application.
[0053] It should also be understood that specific features, structures, or characteristics relating to embodiments in the specification are included in at least one embodiment of this application. Furthermore, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0054] Furthermore, the terms “comprising” and “having”, and any variations thereof, are intended to cover non-exclusive inclusion, such that a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such processes, methods, products, or devices.
[0055] The proposed solutions clean up images, videos, and files in instant messaging tools using two methods. One method retains image thumbnails, video thumbnails, and file icons, but deletes the images, videos, and files themselves. In this case, the images, videos, and files are still visible in the instant messaging chat context, but cannot be opened. The other method deletes all communication records, including chat text. Both methods have limitations. The first method allows users to see the existence of images, videos, and files, but they are unusable; the second method essentially deletes all communication records, making them completely undetectable to the user.
[0056] In view of this, embodiments of this application provide a data storage method, a client, and a server. The instant messaging client uploads target data from a communication group to the storage space corresponding to the instant messaging client on a storage server, and deletes the target data locally on the client, retaining only the representative image corresponding to the target data, thereby saving local storage space on the client. Simultaneously, since the target data is stored on the storage server, it can be retrieved from the storage server for user access when needed, improving the user experience.
[0057] Figure 1 A schematic diagram illustrating an application scenario of an embodiment of this application is shown.
[0058] like Figure 1 As shown, this application scenario involves terminal 110 and server 120, which are connected via a network.
[0059] In this embodiment, the terminal 110 is equipped with an instant messaging client, and the server 120 can be an instant messaging server or a backend. Objects (e.g., users) can communicate in real-time with other objects (e.g., users) through the instant messaging client installed on the terminal 110. The server 120 can provide services to the terminal 110 or the communication application client installed on the terminal 110. In this embodiment, the server 110 may also include a storage server for providing storage (or cloud storage) services to the instant messaging client.
[0060] In some embodiments, terminal 110 can refer to a type of device that has rich human-computer interaction methods, internet access capabilities, typically runs various operating systems, and has strong processing capabilities. Terminal 110 includes, but is not limited to: desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. Terminal devices are often equipped with a display device, which can also be a monitor, display screen, touch screen, etc., and the touch screen can also be a touch screen, touch panel, etc.
[0061] In some embodiments, the server 120 may be one or more servers. When there are multiple servers, at least two servers may be used to provide different services, and / or at least two servers may be used to provide the same service, such as providing the same service in a load-balanced manner. This application embodiment does not limit this. The server may be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The server may also be a node in a blockchain.
[0062] Optionally, server 120 may include a storage server that provides storage (cloud storage) services. In one possible scenario, the storage server could be used to provide data storage services to the backend server of an instant messaging client, for example, storing relevant data within the instant messaging client. In another possible scenario, the storage server could be a standalone third-party server, providing storage solutions for different users, allowing users or businesses to access and store data via the internet. For example, the storage server could have public cloud network storage capabilities.
[0063] In this embodiment, an object (e.g., a user) can log in to an instant messaging client on terminal 110 using an account, and communicate with other users in real time via text, voice, video, etc. Instant messaging clients typically provide functions such as instant messaging, voice calls, video calls, and file transfer, enabling users to communicate and collaborate conveniently.
[0064] In some embodiments, an instant messaging client installed on terminal 110 sends a first request to server 120, requesting that target data be uploaded to the target storage space corresponding to the instant messaging client in server 120. In response to the first request, server 120 stores the target data in the target storage space corresponding to the instant messaging client. Optionally, server 120 may send a first response to the first request to the instant messaging client, indicating that the target data upload was successful. Correspondingly, terminal 110 deletes the target data locally, but retains the representative image corresponding to the target data. Optionally, terminal 110 may display the representative image corresponding to the target data.
[0065] In some embodiments, in response to a download operation by an object targeting target data in a target communication group within the instant messaging client, an instant messaging client installed on terminal 110 sends a second request to server 120, requesting to download the target data from the target storage space corresponding to the instant messaging client on server 120. In response to the second request, server 120 sends a second response to terminal 110, the second response including the target data. Correspondingly, terminal 110 obtains the second response and thus the target data. Optionally, terminal 110 may use (e.g., open) the target data.
[0066] This embodiment of the application uploads target data of a communication group to the storage space corresponding to the instant messaging client on a storage server via an instant messaging client. This eliminates the need for the client to store the target data itself locally; instead, only a representative image corresponding to the target data is retained, thus saving local storage space on the client. Furthermore, since the target data is stored on the storage server, it can be retrieved from the storage server for user access when needed, improving the user experience.
[0067] In some embodiments, in response to a deletion operation on data corresponding to a target communication group in the instant messaging client installed on terminal 110, the instant messaging client sends a third request to server 120, requesting the deletion of the data corresponding to the target communication group in the target storage space corresponding to the instant messaging client in the storage server. Server 120, in response to the third request, deletes the data corresponding to the target communication group in the target storage space. Optionally, server 120 sends a third response to terminal 110 in response to the third request, indicating that the data in the target communication group was successfully deleted. Correspondingly, terminal 110 obtains the third response. Optionally, terminal 110 may delete the representative image corresponding to the locally retained data.
[0068] It should be understood that Figure 1 These are merely examples in this application and should not be construed as limiting the scope of this application. For example, Figure 1 This example only includes one terminal 110, but in other alternative embodiments, the application scenario may include multiple terminals or multiple servers.
[0069] The technical solutions of the embodiments of this application will be described in detail below through some examples. The following embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0070] Figure 2 This is a schematic flowchart illustrating a data storage method 200 according to an embodiment of this application. The method 200 can be executed by an instant messaging client and a storage server. The instant messaging client can be installed on any electronic device with digital processing capabilities, for example, it can be implemented as... Figure 1 Terminal 110 in the middle. The storage server can be the backend server for the instant messaging client, or a server provided with cloud storage capabilities by a third party, for example, it can be implemented as... Figure 1 The application does not limit the number of servers in the 120 list.
[0071] like Figure 2 As shown, the data storage method 200 includes steps S210 to S230.
[0072] S210, the instant messaging client sends a first request to the storage server. The first request is used to upload the target data in the target communication group in the instant messaging client to the target storage space corresponding to the instant messaging client in the storage server.
[0073] Correspondingly, the storage server receives the aforementioned first request from the instant messaging client.
[0074] S220, in response to the first request, the storage server stores the target data in the target storage space corresponding to the instant messaging client.
[0075] S230, the instant messaging client deletes the target data stored locally, and retains the representative image corresponding to the target data locally.
[0076] Therefore, in this embodiment, the instant messaging client sends a first request to the storage server to request that target data be uploaded to the target storage space corresponding to the instant messaging client on the storage server. The storage server responds to this first request by storing the target data in the target storage space corresponding to the instant messaging client. The instant messaging client deletes the locally stored target data and retains the representative image corresponding to the target data locally. Thus, this embodiment uploads the target data of a communication group to the storage space corresponding to the instant messaging client on the storage server via the instant messaging client, and deletes the target data locally on the client, retaining only the representative image corresponding to the target data, thereby saving local storage space on the client. Simultaneously, since the target data is stored on the storage server, it can be retrieved from the storage server for user access when needed, improving the user experience.
[0077] It should be understood that Figure 2 The steps or operations of the data storage method are illustrated, but these steps or operations are merely examples, and other operations may be performed in the embodiments of this application. Figure 2 Variations of various operations within the process. Alternatively, data storage methods may also include... Figure 2 The steps described herein are only some of the steps, not all of them, and this application does not limit the scope of the embodiments.
[0078] In some embodiments, the target data may include, but is not limited to, images, videos, files, and text data from chats in a communication group. Files include, but are not limited to, text files, audio files, program files, and compressed files.
[0079] It should be understood that the size of the target data is not limited in the embodiments of this application. Optionally, the size of the target data may be greater than or equal to a preset value.
[0080] It should also be understood that the data format of the target data is not limited in the embodiments of this application. For example, when the target data is an image, the image format includes, but is not limited to, JPEG (.jpg), PNG (.png), GIT (.git), etc.; as another example, when the target data is a video, the video format includes, but is not limited to, MP4 (MPEG-4 Part 14), AVI (Audio Video Interleave), MOV (QuickTime Movie), WMV (Windows Media Video), etc.; as another example, when the target data is a text file, the text file format includes, but is not limited to, TXT, DOC, PDF, etc.; as another example, when the target data is a program file, the program file format includes, but is not limited to, EXE, APK, etc.
[0081] In some embodiments, the communication group may include a two-person communication group, or a multi-person communication group of three or more people, and this application does not limit it.
[0082] In some embodiments, the storage server has public cloud network storage capabilities, enabling it to store data such as images, videos, and files from instant messaging client group chats. For example, the storage server can be various cloud storage products provided by third-party public cloud vendors.
[0083] In some embodiments, step S210 may specifically be implemented as the instant messaging client sending a first request to the storage server in response to an object's upload operation for target data in a target communication group in the instant messaging client.
[0084] For example, an object can perform an upload operation on target data in a target communication group within an instant messaging client, such as by triggering the upload option button corresponding to the target data. In response to the object's upload operation on the target data in the target communication group, the instant messaging client can send a first request to the storage server to request that the target data be uploaded to the target storage space corresponding to the instant messaging client on the storage server.
[0085] It should be noted that, unless otherwise specified in the embodiments of this application, the object referred to is the login object of the instant messaging client, that is, the login user or the user.
[0086] As one possible implementation, when cleaning up the local storage of the instant messaging client, the client can provide the option to upload local data to a storage server (such as cloud storage). For example, the client can provide... Figure 3 The interface shown includes options for various communication groups, such as Communication Group A, Communication Group B, etc., as well as options for uploading or cleaning up the selected target communication group. Figure 3 As shown, when an object selects communication group A and triggers the upload option button, the instant messaging client can send the first request to the storage server.
[0087] In some embodiments, the instant messaging client may send a first request to the storage server when there is data transmission in the target communication group.
[0088] For example, when an object sends data, such as an image, video, or file, to a target communication group in an instant messaging client, an upload operation can be automatically performed on that data (i.e., the target data). At this time, the instant messaging client can send a first request to the storage server to request that the target data be uploaded to the target storage space corresponding to the instant messaging client on the storage server.
[0089] Optional, such as Figure 2 As shown, method 200 may further include step S240, in which the storage server sends a first response to the first request to the instant messaging client, the first response indicating that the target data has been successfully uploaded. Correspondingly, the instant messaging client receives the first response from the storage server for the first request. For example, step S240 is executed before step S230.
[0090] In some embodiments, when an object uses a storage server to store local data, it needs to complete registration and real-name authentication on the storage server. One implementation method is to use an instant messaging client account for registration, binding or associating the registered account on the storage server with the instant messaging client account. After registration, the storage server can return an Application Identifier (APPID) value to the instant messaging client. The APPID value uniquely identifies the instant messaging client and is used by developers and the storage platform to distinguish the application. Optionally, the storage server can also return information such as account nickname and account ID to the instant messaging client; there are no limitations.
[0091] In one possible implementation, when an object performs an upload operation on target data, if the object has not yet registered with the storage server, it can be prompted to register an account and complete real-name authentication. (Continue) Figure 3 In the example above, when the upload option button is triggered, if the object has not yet registered, a pop-up window can remind the object to register an account and complete real-name authentication.
[0092] In some embodiments, the instant messaging client may also invoke a second interface provided by the storage server to obtain an access key for accessing the cloud storage server. The second interface is used to create this access key.
[0093] As one implementation, when an object uses the upload function for the first time, the instant messaging client requests the creation of an access key from the storage server by calling the Application Programming Interface (API). The storage server responds to the API call and returns the access key. Optionally, the response may also include information about the creation time of the access key. For example, the access key consists of two parts: an access key (AccessKeyID) and a secret access key (SecretAccessKey).
[0094] In some embodiments, the first request also includes an access key. Since an access key is a long-term valid security credential used for secure access to cloud service resources, and can be used for authentication and authorization, request signing, and security management, using an access key between the instant messaging client and the storage server improves data security.
[0095] In some embodiments, the instant messaging client may also invoke a first interface provided by the storage server to create a target storage space corresponding to the instant messaging client on the storage server. The first interface is used to create the target storage space corresponding to the instant messaging client on the storage server.
[0096] As one implementation, when an object uses the upload function, the instant messaging client automatically calls the API to create a storage space corresponding to the instant messaging client on the storage server. As an example, the storage space can also be called a bucket. After the storage space is successfully created, the storage server can return a response indicating that the storage area has been created successfully. Optionally, the name of the storage space can be randomly generated by the client or randomly assigned by the storage server.
[0097] The name of the target storage space is mapped to the object identifier of the logged-in object in the instant messaging client. For example, the object identifier can be a user ID, and one user ID can correspond to one or more target storage spaces. In some embodiments, the instant messaging client can locally store the mapping relationship between the object ID and the storage space name, which enables the association of the storage space name with the APPID.
[0098] Optionally, the target storage space is associated with the application identifier (APPID) returned when the login object of the instant messaging client completes the account registration in the storage server.
[0099] As a concrete example, the PUTBucket interface can be used to request the creation of a bucket under a specified account. Optionally, this interface requires a request with authorization signature authentication to create a new bucket. The user creating the bucket is the bucket holder by default. For example, the request may include BucketName-APPID and Region. BucketName can be randomly assigned by the storage server or randomly generated by the client. APPID is the APPID returned when registering the storage server account, used to indicate that the bucket corresponds to an instant messaging client, i.e., it can be used to store data uploaded by the instant messaging client. Region is the region where the bucket is located, such as the city where the object is located. After the bucket is successfully created, a response can be returned to the instant messaging client. For example, a response containing the "200 OK" field indicates that the bucket was created successfully. Optionally, the response may also include time information.
[0100] In some embodiments, after obtaining the access key and creating the target storage space corresponding to the instant messaging client, a first request can be sent to the storage server to request that the target data be uploaded to the target storage space corresponding to the instant messaging client in the storage server. The following describes one possible implementation of the instant messaging client sending the first request, taking the storage server providing public cloud services as an example.
[0101] First, you can create a public cloud object storage (COS) client instance. This instance can be used to interact with the public cloud COS service, such as uploading, downloading, and managing files. For example, using PHP, you can implement this using the following code: `$cosClient = new Qcloud\Cos\Client()`. Here, the variable `$cosClient` stores the created object storage client instance. Through this variable, you can call various methods provided by the public cloud COS service. `Qcloud\Cos\Client()` is the fully qualified namespace for the client class provided by the public cloud object storage service. This `$cosClient` instance contains parameters such as secretID, secretKey, and region.
[0102] Then, you can call the API to request the upload of the local object to the specified bucket. Optionally, you can accept an associative array as a parameter, containing various configuration information required for file upload. For example, you can use the PUTObject API to request the upload of a local object (such as target data) to the bucket. In PHP, this can be achieved using the following code: `$result = $cosClient->putObject()`. For example, the PUTObject API request can include parameters such as Bucket, Key, and Body, where Bucket is the name of the bucket, Key is the desired file path and name within the bucket, and Body is the path to the local file to be uploaded. Optionally, the bucket name in the Bucket parameter can be in the format BucketName-APPID.
[0103] In some embodiments, the primary directory of the storage path of the target data in the target storage space contains the identifier of the target communication group.
[0104] Specifically, since communication group IDs are unique within an instant messaging client, the top-level directory of the storage path contains the communication group IDs, ensuring that the top-level directory is unique. This means that each communication group will have a unique top-level directory, thus enabling the creation of a corresponding storage path for each communication group in the target storage space.
[0105] In some embodiments, the second-level directory of the storage path contains the object identifier of the sender of the target data.
[0106] Specifically, since object IDs in instant messaging clients are unique, the second-level directories of the storage path contain the object IDs of the senders of the target data. This ensures that the second-level directories are unique, meaning that under the first-level target of the communication group, a unique second-level target is set for each sender. This allows for the establishment of corresponding storage paths for different senders under the target communication group in the target storage space.
[0107] In some embodiments, the name of the target data in the storage path includes the time when the target data was sent in the target communication group.
[0108] Specifically, the name of the target file on the storage server contains the sending time of the target data in the target communication group. Since the same object (sender) cannot send multiple files at the same time, the names of the target data will not be duplicated. For example, the format of the target data name on the storage server can be a 17-digit number, including 4 digits for year, 2 digits for month, 2 digits for day, 2 digits for hour, 2 digits for minute, 2 digits for second, and 3 digits for millisecond. By limiting the sending time to the millisecond level, duplicate file names on the storage server can be avoided as much as possible.
[0109] Optionally, the file extension of the target data saved in the storage server can be retained as the original file extension.
[0110] In some embodiments, to conserve mobile data, the upload process can begin only after the device is connected to Wi-Fi, provided the device selects the upload option button. Furthermore, previously uploaded data, such as images, videos, and files, will not be uploaded again. The data upload operation runs in the background of the instant messaging client, unnoticed by the user.
[0111] After the target data is uploaded, the instant messaging client can delete the locally stored target data. Optionally, the instant messaging client can respond to the object's cleanup operation on the target data by deleting the locally stored data after uploading the local data to the storage server, thereby freeing up local storage space on the client.
[0112] When deleting locally stored target data, the instant messaging client can retain a representative image corresponding to the target data locally, consistent with the logic of existing cleanup methods. It should be understood that the representative image corresponding to the target data can also be called a summary image, icon, or other names; this application embodiment does not limit this.
[0113] As an example, such as Figure 4 As shown, in the chat context of communication group A, group member A sends an image, and after cleaning, the image thumbnail can be displayed; group member B sends a video, and after cleaning, the video cover or a thumbnail of the cover can be displayed; group member B also sends a file, and after cleaning, the file icon can be displayed. In this way, target data that has been deleted locally can still be seen in the chat context of the instant messaging client.
[0114] In some embodiments, see Figure 5 The data storage method 200 may also include the following steps S250 and S260.
[0115] S250, in response to the object's download operation for target data in a target communication group in the instant messaging client, the instant messaging client sends a second request to the storage server, the second request being used to download the target data from the target storage space corresponding to the instant messaging client on the storage server.
[0116] Correspondingly, the storage server receives the aforementioned second request from the instant messaging client.
[0117] S260, in response to the second request, the storage server sends a second response to the second request to the instant messaging client, the second response including the target data.
[0118] Correspondingly, the instant messaging client obtains a second response from the storage service server in response to the second request.
[0119] Specifically, an object can perform a download operation on uploaded target data in a target communication group within an instant messaging client. This can be achieved, for example, by triggering a representative graph corresponding to the target data in the chat context of the target communication group. In response to the object's download operation on the target data in the target communication group, the instant messaging client can send a second request to the storage server to request the download of the target data from the storage server.
[0120] Therefore, in this embodiment, when the instant messaging client receives a download operation for target data in a target communication group, it can send a second request to the storage server in response to the download operation. This request requests the download of the target data from the target storage space corresponding to the instant messaging client on the storage server. The storage server can then respond to this second request by sending a second response to the instant messaging client, which includes the target data. Thus, this embodiment can retrieve the target data from the storage server for the user's use when needed, improving the user experience.
[0121] As one implementation method, the target data is represented in the chat context of the target communication group in the instant messaging client when the object clicks on it, for example... Figure 4 When displaying thumbnails of images, video covers, or file icons, such as... Figure 6 As shown, the client can prompt the object whether to download the target data from the storage server. When the object clicks the "Confirm Download" option, the client begins downloading the target data in the background, and the object is unaware of this download process. Optionally, the target data can be automatically opened after the download is complete. When the user clicks the "Cancel" option, the client can keep... Figure 4 The legend is displayed in the image.
[0122] In some embodiments, the second request includes at least one of the following: an identifier of a target communication group, an object identifier of the sender of the target data, and the transmission time of the target data in the target communication group.
[0123] Specifically, the identifier of the target communication group, the object identifier of the sender of the target data, and the sending time of the target data in the target communication group can represent the storage path and file name corresponding to the target data in the target storage space. Therefore, by including at least one of the identifier of the target communication group, the object identifier of the sender of the target data, and the sending time of the target data in the target communication group in the second request, the storage server can obtain the target data.
[0124] In some embodiments, the second request may also include an access key. Specifically, the access key may be the same as the access key in the first request, or the access key in the second request may be obtained in the same way as the access key in the first request, without limitation.
[0125] The following describes one possible implementation of an instant messaging client sending a second request, using a storage server providing public cloud services as an example. This implementation is based on the public cloud COS client instance created above. Specifically, the client instance can be found in the description above.
[0126] Specifically, an interface request can be made to download an object from a specified bucket. Optionally, an associative array can be accepted as a parameter, containing various configuration information required for downloading the file. For example, the associative array may include the identifier of the target communication group, the object identifier of the sender of the target data, and the sending time of the target data in the target communication group. For example, the GETObject interface can be used to request the download of an object (such as target data) from the bucket. In PHP, this can be implemented using the following code: $result = $cosClient->getObject(). For example, the GETObject interface request may include parameters such as Bucket, Key, and SaveAs, where Bucket is the name of the bucket, Key is the file directory interface and name within the bucket, and SaveAs is the local save path on the client. Optionally, the bucket name in the Bucket parameter can be in the format BucketName-APPID. The Key is obtained based on at least one of the identifier of the corresponding target communication group, the object identifier of the sender of the target data, and the sending time of the target data in the target communication group.
[0127] In some embodiments, see continue to see Figure 5The data storage method 200 may also include the following steps S270 to S290.
[0128] S270, in response to the object's deletion operation on the data in the target communication group in the instant messaging client, the instant messaging client sends a third request to the storage server, the third request being used to delete the data corresponding to the target communication group in the target storage space corresponding to the instant messaging client in the storage server.
[0129] Correspondingly, the storage server receives the aforementioned third request from the instant messaging client.
[0130] S280, in response to the third request, delete the data corresponding to the target communication group in the target storage space.
[0131] Optionally, in S290, the storage server sends a third response to the third request to the instant messaging client, the third response indicating that the data in the target communication group has been successfully deleted.
[0132] Correspondingly, the instant messaging client obtains a third response from the storage service server in response to the third request.
[0133] Specifically, an object can delete uploaded data, such as some or all of the data, in a target communication group within an instant messaging client. Here, the uploaded data can include the target data mentioned in the previous steps. In response to the object's deletion operation on the data in the target communication group, the instant messaging client can send a third request to the storage server to request the deletion of the data from the target communication group.
[0134] As one possible implementation, when an object cleans up the instant messaging client's storage, the client can provide the option to delete data stored on the server side (such as cloud storage). For example, the client can provide the option mentioned above... Figure 3 The interface shown. (As shown) Figure 3 As shown, when an object selects communication group A and triggers the cleanup option button, the instant messaging client can send a third request to the storage server to delete the data corresponding to communication group A in the target storage space corresponding to the instant messaging client in the storage server.
[0135] Optionally, when an object triggers the cleanup option button, the instant messaging client can further remind the object whether to perform data cleanup on the storage server side. For example, when the object... Figure 3 When the cleanup option button is triggered in the interface shown, the instant messaging client can also provide... Figure 7The pop-up window shown allows the user to choose to clear either local data or cloud data. After the user clicks the "OK" button, the instant messaging client can send a third request to the storage server to delete the data corresponding to communication group A in the target storage space of the instant messaging client on the storage server, and simultaneously delete the local data corresponding to communication group A.
[0136] Optionally, when an object triggers the cleanup option button, the instant messaging client can further provide the option to select target data to delete cloud data corresponding to a portion of the data in the communication group. For example, when an object in Figure 3 When the cleanup option button is triggered in the interface shown, the instant messaging client can also provide... Figure 8 The pop-up window shown allows users to select the data they want to clear from the cloud. After the user clicks the "OK" button, the instant messaging client can send a third request to the storage server to delete the selected data in communication group A in the target storage space corresponding to the instant messaging client on the storage server.
[0137] Therefore, in this embodiment, when the instant messaging client receives a deletion operation from an object targeting data in a target communication group, it can send a third request to the storage server in response to the deletion operation. This request requests the deletion of the data for the target communication group from the target storage space corresponding to the instant messaging client on the storage server. The storage server can respond to the third request and delete the data for the target communication group from the target storage space. Optionally, the instant messaging client sends a third response to the third request, indicating that the data in the target communication group has been successfully deleted. Therefore, this embodiment can achieve the deletion of data from the target communication group in the target storage space of the instant messaging client on the storage server.
[0138] In some embodiments, after the storage server deletes the data corresponding to the target communication group in the target storage space corresponding to the instant messaging client, the client can still retain representative images of the data, such as image thumbnails, video covers or cover thumbnails, file icons, etc. Figure 4 The legend is shown below. Optionally, after clearing cloud data, when an object clicks on a representative graph of the data, the client can display a pop-up notification that the file or data has been cleared, which is consistent with the existing logic.
[0139] In some embodiments, when an object deletes communication information in a communication group, including pictures, videos, or files, in an instant messaging client, the client can automatically perform a cleanup operation on cloud storage, such as sending the aforementioned third request to the storage server to delete the data, without the object being aware of it.
[0140] In some embodiments, the third request includes an identifier of the target communication group.
[0141] Specifically, by including the identifier of the target communication group in the third request, the storage server can delete all data under the primary target corresponding to the target communication group in the target storage space.
[0142] Optionally, the third request may also include at least one of the following: the object identifier of the sender of the target data and the sending time of the target data in the target communication group. In this way, the storage server can delete data in the target storage space from the corresponding second-level directory or data with the corresponding name under the first-level target of the target communication group.
[0143] For example, when an object selects some data for cloud cleanup, the third request may include the object identifier of the sender corresponding to this data, or the sending time in the target communication group, etc., so that the storage server can delete the data in the second-level directory or the data with the corresponding name under the first-level target of the target communication group in the target storage space, thereby realizing cloud cleanup according to the object's needs.
[0144] In some embodiments, the third request may also include an access key. Specifically, the access key may be the same as the access key in the first request, or the access key in the third request may be obtained in the same way as the access key in the first request, without limitation.
[0145] The following describes one possible implementation of an instant messaging client sending a third-party request, using a storage server providing public cloud services as an example. This implementation is based on the public cloud COS client instance created above. For details, please refer to the description above for the client instance.
[0146] Specifically, an interface request can be invoked to delete an object from a specified bucket. Optionally, an associative array can be accepted as a parameter, containing various configuration information required to delete the file. For example, the associative array may include the identifier of the target communication group, the object identifier of the sender of the target data, and the sending time of the target data in the target communication group. For example, the DELETEObject interface can be used to request the deletion of an object (such as data) from the bucket. In PHP, this can be achieved using the following code: $result = $cosClient->deleteObject(). For example, the DELETEObject interface request may include parameters such as Bucket, Key, and VersionId, where Bucket is the name of the bucket, Key is the file directory interface and name in the bucket, and VersionId is the version number. Optionally, VersionId can be omitted. Optionally, the bucket name in the Bucket parameter can be in the format BucketName-APPID. The Key is obtained based on at least one of the identifier of the corresponding target communication group, the object identifier of the sender of the target data, and the sending time of the target data in the target communication group.
[0147] Figure 9 This is a schematic flowchart illustrating another data storage method 300 according to an embodiment of this application. Method 300 can be executed by an instant messaging client and a storage server. The instant messaging client can be installed on any electronic device with digital processing capabilities, for example, it can be implemented as... Figure 1 Terminal 110 in the middle. The storage server can be the backend server for the instant messaging client, or a server provided with cloud storage capabilities by a third party, for example, it can be implemented as... Figure 1 The application does not limit the number of servers in the 120 list.
[0148] like Figure 9 As shown, the data storage method 300 includes steps S301 to S313.
[0149] S301, the instant messaging client registers an account and performs real-name authentication with the storage server.
[0150] Specifically, when users use cloud storage to save instant messaging client data, they need to register an account and complete real-name authentication on the storage server.
[0151] S302, the storage server returns the registration and authentication results to the instant messaging client.
[0152] Specifically, the storage server can return an APPID to the instant messaging client, which uniquely identifies the instant messaging client and is used by developers and the storage platform to distinguish the application.
[0153] S303, the instant messaging client requests the storage server to create an access key.
[0154] Specifically, instant messaging clients need to provide access keys when interacting with storage servers to improve access security. For example, when a user uses the local data upload function for the first time, the instant messaging client can call the API provided by the storage server to create an access key.
[0155] S304, The storage server returns the key creation result to the instant messaging client.
[0156] For example, the storage server may return access keys to the instant messaging client, which may include AccessKeyID and SecretAccessKey.
[0157] S305, the instant messaging client requests the storage server to create a storage bucket.
[0158] For example, when a user uses the local data upload function for the first time, the instant messaging client can call the API provided by the storage server to create a storage bucket on the storage server. Here, a storage bucket is an example of storage space. Optionally, the name of the storage bucket is randomly assigned by the storage server or randomly generated by the client. Optionally, the instant messaging client stores the mapping relationship between the user's ID and the storage bucket name.
[0159] For example, taking HTTP as the input, the request can be a Host: <bucketname-appid>.cos. <region>.myqcloud.com. Where BucketName is randomly generated by the client, and APPID is the APPID returned when registering a cloud storage account; <region>This refers to the area where the storage bucket is located.
[0160] S306, The storage server returns the bucket creation result to the instant messaging client.
[0161] For example, a response that includes a specific field, such as "200 OK", indicates that the bucket was created successfully.
[0162] S307, the instant messaging client uploads files to the storage server.
[0163] For example, when a user clears the instant messaging client's storage, the client can provide an option to upload to cloud storage. When a user uploads a file from a communication group, the storage path and filename of the uploaded file are named as follows: Communication Group ID / Sender User ID / File Sending Time.File Extension. Here, the Communication Group ID serves as the first-level storage directory; since communication group IDs are unique, each communication group can have a unique first-level directory. The Sender User ID serves as the second-level storage directory; since user IDs are unique, the second-level directory name will also be unique. The File Sending Time serves as the filename, and the format can be a 17-digit number, including 4 digits for year, 2 digits for month, 2 digits for day, 2 digits for hour, 2 digits for minute, 2 digits for second, and 3 digits for millisecond. Since the same user cannot send multiple files within the same millisecond, the filename will also be unique. The file extension remains unchanged from the original filename.
[0164] For example, an instant messaging client can send a first request to the storage server to request the upload of a corresponding file. Specifically, the first request can be referred to the relevant description in the method above.
[0165] S308, the storage server returns the upload result to the instant messaging client.
[0166] For example, the upload result may include upload success or upload failure.
[0167] After uploading a file, the instant messaging client can retain only a representative image of the file, such as a thumbnail of an image, a video cover or a thumbnail of a cover, or the file icon, maintaining consistency with existing logic. The image, video, and file itself will be deleted from the client.
[0168] S309, the instant messaging client downloads files from the storage server.
[0169] For example, when a user clicks on an uploaded file in a communication group, the client uses the communication group identifier, the file sender ID, and the file sending time as parameters to request the download of the corresponding file from the storage bucket corresponding to the user ID.
[0170] For example, an instant messaging client can send a second request to the storage server to request the download of the corresponding file. Specifically, the second request can be referred to the relevant description in the method above.
[0171] S310, the storage server returns the downloaded file to the instant messaging client.
[0172] For example, when a download is successful, the downloaded file can be returned to the instant messaging client. When a download fails, a download failure response can be returned.
[0173] S311, the instant messaging client opens a file.
[0174] For example, once the file is downloaded, it can be automatically opened for the user to use.
[0175] S312, the instant messaging client requests the storage server to delete a file.
[0176] For example, when a user clears the instant messaging client's storage, the client can provide a "delete cloud storage" option, allowing the user to delete the corresponding communication records from the cloud storage. Specifically, the client can use the communication group identifier as a parameter to request the deletion of all files in the first-level directory corresponding to the communication group identifier within the bucket associated with the user ID.
[0177] For example, an instant messaging client can send a third request to the storage server to request the deletion of a corresponding file. Specifically, the third request can be referred to the relevant description in the methods above.
[0178] S313, the storage server returns the deletion result to the instant messaging client.
[0179] For example, the deletion result can include deletion success or deletion failure.
[0180] It should be understood that Figure 2 The steps or operations of the data storage method are illustrated, but these steps or operations are merely examples, and other operations may be performed in the embodiments of this application. Figure 2 Variations of various operations within the process. Alternatively, data storage methods may also include... Figure 2 The steps described herein are only some of the steps, not all of them, and this application does not limit the scope of the embodiments.
[0181] Therefore, this application embodiment can utilize cloud storage technology to upload files such as images, videos, and documents from the instant messaging client to cloud storage. When the user does not need to open these files, the instant messaging client only retains representative images of the files, such as thumbnails of images, cover images or thumbnails of video covers, and file icons, saving client storage space, freeing up hard drive space on the terminal, and improving system operating speed. When the user needs to open these files, the client can automatically download them from cloud storage for the user's use, improving the user experience.
[0182] The specific embodiments of this application have been described in detail above with reference to the accompanying drawings. However, this application is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this application, various simple modifications can be made to the technical solutions of this application, and these simple modifications all fall within the protection scope of this application. For example, the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, this application will not describe the various possible combinations separately. Furthermore, various different embodiments of this application can also be arbitrarily combined, as long as they do not violate the spirit of this application, they should also be considered as the content disclosed in this application.
[0183] It should also be understood that, in the various method embodiments of this application, the sequence numbers of the above processes do not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. It should be understood that these sequence numbers can be interchanged where appropriate so that the embodiments of this application described can be implemented in a sequence other than those illustrated or described.
[0184] The method embodiments of this application have been described in detail above. The following description, in conjunction with... Figures 10 to 13 The following describes in detail the device embodiments of this application.
[0185] Figure 10 This is a schematic block diagram of client 10 according to an embodiment of this application. Figure 10 As shown, the client 10 may include a sending unit 11 and a processing unit 12.
[0186] Sending unit 11 is used for an instant messaging client to send a first request to a storage server, the first request being used to upload target data in a target communication group in the instant messaging client to the target storage space corresponding to the instant messaging client in the storage server;
[0187] Processing unit 12 is used by the instant messaging client to delete the target data stored locally and retain the representative image corresponding to the target data locally.
[0188] In some embodiments, the primary directory of the storage path of the target data in the target storage space contains the identifier of the target communication group.
[0189] In some embodiments, the second-level directory of the storage path contains the object identifier of the sender of the target data.
[0190] In some embodiments, the name of the target data in the storage path includes the time when the target data was sent in the target communication group.
[0191] In some embodiments, the sending unit 11 is specifically used for:
[0192] In response to an object's upload operation for target data in a target communication group within the instant messaging client, the instant messaging client sends the first request to the storage server.
[0193] Optionally, the client 10 further includes a receiving unit for obtaining a first response from the storage server in response to the first request, the first response indicating that the target data was successfully uploaded.
[0194] In some embodiments, the client 10 further includes a calling unit for:
[0195] The instant messaging client calls a first interface provided by the storage server. The first interface is used to create the target storage space on the storage server. The name of the target storage space is mapped to the object identifier of the login object of the instant messaging client.
[0196] In some embodiments, the target storage space is associated with the application identifier returned by the login object of the instant messaging client after completing the registration of the account in the storage server.
[0197] In some embodiments, the first request may further include an access key, which is obtained by the instant messaging client calling a second interface provided by the storage server.
[0198] In some embodiments, the sending unit 11 is further configured to respond to the object's download operation of the target data in the target communication group in the instant messaging client, wherein the instant messaging client sends a second request to the storage server, the second request being used to download the target data from the target storage space corresponding to the instant messaging client on the storage server;
[0199] The receiving unit is further configured to obtain a second response from the storage server in response to the second request, the second response including the target data.
[0200] In some embodiments, the second request includes at least one of the identifier of the target communication group, the object identifier of the sender of the target data, and the sending time of the target data in the target communication group.
[0201] In some embodiments, the sending unit 11 is further configured to respond to the object's deletion operation on the data in the target communication group in the instant messaging client, wherein the instant messaging client sends a third request to the storage server, the third request being used to delete the data corresponding to the target communication group in the target storage space corresponding to the instant messaging client in the storage server.
[0202] Optionally, the receiving unit is further configured to obtain a third response from the storage server in response to the third request, the third response indicating that the data deletion in the target communication group was successful.
[0203] In some embodiments, the third request includes an identifier of the target communication group.
[0204] This embodiment of the application uploads target data of a communication group to the storage space corresponding to the instant messaging client on a storage server via an instant messaging client, and deletes the target data locally on the client, retaining only the representative image corresponding to the target data, thereby saving local storage space on the client. Simultaneously, since the target data is stored on the storage server, it can be retrieved from the storage server for user access when needed, improving the user experience.
[0205] It should be understood that the apparatus embodiments and method embodiments can correspond to each other, and similar descriptions can be found in the method embodiments. To avoid repetition, further details are omitted here. Specifically, Figure 10 The client 10 shown can execute the above method embodiments, and the aforementioned and other operations and / or functions of each module in the client 10 are respectively to implement the process corresponding to the instant messaging client in the above method 200. For the sake of brevity, they will not be described in detail here.
[0206] Figure 11 This is a schematic block diagram of server 20 according to an embodiment of this application. Figure 11 As shown, the server 20 may include a receiving unit 21, a processing unit 22, and a sending unit 23.
[0207] Receiving unit 21 is used to obtain a first request from an instant messaging client, the first request being used to upload target data in a target communication group in the instant messaging client to the target storage space corresponding to the instant messaging client in the storage server;
[0208] Processing unit 22 is configured to, in response to the first request, store the target data in the target communication group in the instant messaging client into the target storage space corresponding to the instant messaging client.
[0209] Optionally, the server 20 further includes a sending unit for sending a first response to the first request to the instant messaging client, the first response indicating that the target data was successfully uploaded.
[0210] In some embodiments, the primary directory of the storage path of the target data in the target storage space contains the identifier of the target communication group.
[0211] In some embodiments, the second-level directory of the storage path contains the object identifier of the sender of the target data.
[0212] In some embodiments, the name of the target data in the storage path includes the time when the target data was sent in the target communication group.
[0213] In some embodiments, the processing unit 22 is further configured to:
[0214] In response to the instant messaging client calling the first interface provided by the storage server, the target storage space is created on the storage server, and the name of the target storage space is mapped to the object identifier of the login object of the instant messaging client.
[0215] In some embodiments, the target storage space is associated with the application identifier returned by the login object of the instant messaging client after completing the registration of the account in the storage server.
[0216] In some embodiments, the first request further includes an access key, which is generated by the storage server in response to the instant messaging client calling a second interface provided by the storage server and returned to the instant messaging client.
[0217] In some embodiments, the receiving unit 21 is further configured to obtain a second request from the instant messaging client, the second request being configured to download the target data from the target storage space corresponding to the instant messaging client on the storage server;
[0218] The sending unit is also configured to, in response to the second request, send a second response to the instant messaging client in response to the second request, the second response including the target data.
[0219] In some embodiments, the second request includes at least one of the storage path corresponding to the target communication group and the name of the target data.
[0220] In some embodiments, the receiving unit 21 is further configured to obtain a third request from the instant messaging client, the third request being configured to delete the data corresponding to the target communication group in the target storage space corresponding to the instant messaging client in the storage server;
[0221] In some embodiments, the processing unit 22 is further configured to, in response to the third request, delete the data corresponding to the target communication group in the target storage space.
[0222] Optionally, the sending unit is further configured to send a third response to the third request to the instant messaging client, the third response indicating that the data deletion in the target communication group was successful.
[0223] In some embodiments, the third request includes an identifier of the target communication group.
[0224] This embodiment of the application uploads target data of a communication group to the storage space corresponding to the instant messaging client on a storage server via an instant messaging client, and deletes the target data locally on the client, retaining only the representative image corresponding to the target data, thereby saving local storage space on the client. Simultaneously, since the target data is stored on the storage server, it can be retrieved from the storage server for user access when needed, improving the user experience.
[0225] It should be understood that the apparatus embodiments and method embodiments can correspond to each other, and similar descriptions can be found in the method embodiments. To avoid repetition, further details are omitted here. Specifically, Figure 11 The server 20 shown can execute the above method embodiments, and the aforementioned and other operations and / or functions of each module in the device 20 are respectively for implementing the server corresponding to the above method 200. For the sake of brevity, they will not be described in detail here.
[0226] The apparatus of this application embodiment has been described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that this functional module can be implemented in hardware, in software instructions, or in a combination of hardware and software modules. Specifically, the steps of the method embodiments in this application can be completed by integrated logic circuits in the processor's hardware and / or by software instructions. The steps of the method disclosed in this application embodiment can be directly embodied as being executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. Optionally, the software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps in the above method embodiments.
[0227] Figure 12 This is a schematic block diagram of the electronic device provided in the embodiments of this application.
[0228] like Figure 12 As shown, the electronic device 30 may include:
[0229] The system includes a memory 33 for storing a computer program 34 and a processor 32 for transferring the program code 34 to the processor 32. In other words, the processor 32 can retrieve and run the computer program 34 from the memory 33 to implement the steps executed by the client or the server in the data storage method provided in this embodiment.
[0230] In some embodiments, the processor 32 may call and run the computer program 34 from the memory 33 to implement the steps executed by the client or the server in the data storage method provided in this application embodiment.
[0231] For example, the processor 32 can be used to execute the steps corresponding to the client or the steps corresponding to the server in the method 200 described above, according to the instructions in the computer program 34.
[0232] In some embodiments of this application, the processor 32 may include, but is not limited to:
[0233] General-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0234] In some embodiments of this application, the memory 33 includes, but is not limited to:
[0235] Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0236] In some embodiments of this application, the computer program 34 may be divided into one or more units, which are stored in the memory 33 and executed by the processor 32 to perform the method provided in this application. The one or more units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program 34 in the electronic device 30.
[0237] Optional, such as Figure 12 As shown, the electronic device 30 may further include:
[0238] Transceiver 33, which can be connected to processor 32 or memory 33.
[0239] The processor 32 can control the transceiver 33 to communicate with other devices; specifically, it can send information or data to other devices or receive information or data sent by other devices. The transceiver 33 may include a transmitter and a receiver. The transceiver 33 may further include antennas, and the number of antennas may be one or more. It should be understood that the various components in this electronic device are connected through a bus system, which includes, in addition to a data bus, a power bus, a control bus, and a status signal bus.
[0240] Taking electronic devices as terminals as an example, Figure 13 A schematic diagram of the hardware structure of a terminal to implement an embodiment of this application.
[0241] The terminal 40 includes, but is not limited to, at least some of the following components: radio frequency unit 41, network module 42, audio output unit 43, input unit 44, sensor 45, display unit 46, user input unit 47, interface unit 48, memory 49, and processor 40.
[0242] Those skilled in the art will understand that the terminal 40 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 40 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 13 The terminal structure shown does not constitute a limitation on the terminal. The terminal may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0243] It should be understood that, in this embodiment, the input unit 44 may include a graphics processing unit (GPU) 441 and a microphone 442. The GPU 441 processes image data of still images or videos obtained by an image acquisition device (such as a camera) in video acquisition mode or image acquisition mode. The display unit 46 may include a display panel 461, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 47 includes a touch panel 471 and at least one of other input devices 472. The touch panel 471 is also called a touch screen. The touch panel 471 may include a touch detection device and a touch controller. Other input devices 472 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.
[0244] In this embodiment, the radio frequency unit 41 receives or transmits data. Typically, the radio frequency unit 41 includes, but is not limited to, an antenna, an amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, etc.
[0245] The memory 49 can be used to store software programs or instructions, as well as various data. The memory 49 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, applications or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 49 may include volatile memory or non-volatile memory. The memory 49 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.
[0246] Processor 410 may include one or more processing units; optionally, processor 410 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 410.
[0247] This application also provides a computer storage medium storing a computer program thereon, which, when executed by a computer, enables the computer to perform the methods of the above-described method embodiments. Alternatively, embodiments of this application also provide a computer program product containing instructions that, when executed by a computer, cause the computer to perform the methods of the above-described method embodiments.
[0248] When implemented using software, it can be implemented entirely or partially as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0249] It is understood that in the specific implementation of this application, when the above embodiments of this application are applied to specific products or technologies and involve user information and other related data, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0250] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0251] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0252] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. For example, the functional modules in the various embodiments of this application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0253] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.< / region> < / region>
Claims
1. A data storage method, characterized in that, The method is executed by an instant messaging client and includes: The instant messaging client sends a first request to the storage server, the first request being used to upload target data in the target communication group in the instant messaging client to the target storage space corresponding to the instant messaging client in the storage server; The instant messaging client deletes the target data stored locally, but retains the representative image corresponding to the target data locally.
2. The method according to claim 1, characterized in that, The first-level directory of the storage path of the target data in the target storage space contains the identifier of the target communication group.
3. The method according to claim 2, characterized in that, The second-level directory of the storage path contains the object identifier of the sender of the target data.
4. The method according to claim 2, characterized in that, The name of the target data in the storage path includes the time when the target data was sent in the target communication group.
5. The method according to any one of claims 1-4, characterized in that, The instant messaging client sends a first request to the storage server, including: In response to an object's upload operation for target data in a target communication group within the instant messaging client, the instant messaging client sends the first request to the storage server.
6. The method according to any one of claims 1-4, characterized in that, Also includes: The instant messaging client calls a first interface provided by the storage server. The first interface is used to create the target storage space on the storage server. The name of the target storage space is mapped to the object identifier of the login object of the instant messaging client.
7. The method according to any one of claims 1-4, characterized in that, The target storage space is associated with the application identifier returned by the login object of the instant messaging client after completing the account registration in the storage server.
8. The method according to any one of claims 1-4, characterized in that, The first request also includes an access key, which is obtained by the instant messaging client calling a second interface provided by the storage server.
9. The method according to any one of claims 1-4, characterized in that, Also includes: In response to an object's download operation for the target data in the target communication group in the instant messaging client, the instant messaging client sends a second request to the storage server, the second request being used to download the target data from the target storage space corresponding to the instant messaging client on the storage server; Obtain a response from the storage server for the second request, the response including the target data.
10. The method according to claim 9, characterized in that, The second request includes at least one of the following: the identifier of the target communication group, the object identifier of the sender of the target data, and the sending time of the target data in the target communication group.
11. The method according to any one of claims 1-4, characterized in that, Also includes: In response to an object's deletion operation on data in the target communication group in the instant messaging client, the instant messaging client sends a third request to the storage server, the third request being used to delete the data corresponding to the target communication group in the target storage space corresponding to the instant messaging client in the storage server.
12. The method according to claim 11, characterized in that, The third request includes the identifier of the target communication group.
13. A data storage method, characterized in that, The method is executed by the storage server and includes: Obtain a first request from the instant messaging client, the first request being used to upload target data in the target communication group in the instant messaging client to the target storage space corresponding to the instant messaging client in the storage server; In response to the first request, the target data in the target communication group in the instant messaging client is stored in the target storage space corresponding to the instant messaging client.
14. The method according to claim 13, characterized in that, Also includes: In response to the instant messaging client calling the first interface provided by the storage server, the target storage space is created on the storage server, and the name of the target storage space is mapped to the object identifier of the login object of the instant messaging client.
15. The method according to claim 13, characterized in that, Also includes: Obtain a second request from the instant messaging client, the second request being used to download the target data from the target storage space corresponding to the instant messaging client on the storage server; In response to the second request, a response to the second request is sent to the instant messaging client, the response including the target data.
16. The method according to claim 13, characterized in that, Also includes: Obtain a third request from the instant messaging client, the third request being used to delete the data corresponding to the target communication group in the target storage space corresponding to the instant messaging client in the storage server; In response to the third request, the data corresponding to the target communication group in the target storage space is deleted.
17. A client, characterized in that, include: The sending unit is used to send a first request from the instant messaging client to the storage server. The first request is used to upload target data in the target communication group in the instant messaging client to the target storage space corresponding to the instant messaging client in the storage server. The processing unit is used by the instant messaging client to delete the target data stored locally and retain the representative image corresponding to the target data locally.
18. A server, characterized in that, include: A receiving unit is configured to acquire a first request from an instant messaging client, the first request being configured to upload target data in a target communication group in the instant messaging client to the target storage space corresponding to the instant messaging client in the storage server; The processing unit is configured to, in response to the first request, store the target data in the target communication group in the instant messaging client into the target storage space corresponding to the instant messaging client.
19. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores instructions, and when the processor executes the instructions, it causes the processor to perform the method according to any one of claims 1-12, or the method according to any one of claims 13-16.
20. A computer storage medium, characterized in that, Used to store a computer program, the computer program comprising a method for performing any one of claims 1-12, or any one of claims 13-16.