Methods, devices, equipment and media for updating emoji resources

By employing a hierarchical storage and atomic update approach, the limitations of storage space and CPU computing power on terminal devices when updating emoji resources are resolved. This enables a fast and seamless update process, ensuring the efficiency and integrity of the update and avoiding issues such as lost emojis and version inconsistencies.

CN121255753BActive Publication Date: 2026-03-10SHENZHEN UASCENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-02
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

When updating emoji resources, existing terminal devices suffer from limited storage space and low CPU computing power, resulting in a complex and time-consuming update process. Furthermore, the lack of version verification and rollback strategies can easily lead to issues such as lost emojis or version inconsistencies.

Method used

The system employs a hierarchical storage and atomic update approach. The terminal device sends the version number to the server, receives and compares the latest version identification information, downloads the latest emoji resources to the cache area, decompresses them to the temporary storage area, performs breakpoint resume and verification in the event of a power outage, and finally performs an atomic switch to ensure the efficiency and integrity of the update process.

Benefits of technology

It enables fast and seamless updates of emoji resources on lightweight terminal devices, avoiding memory resource consumption and loss of emojis due to update failures, improving user experience and download efficiency, and significantly saving data and time, especially in unstable network environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121255753B_ABST
    Figure CN121255753B_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, device, and medium for updating emoji resources, relating to the field of resource updates. The method includes: a terminal device sending the version number of emoji resources in a first storage area to a server, where the first storage area is the working area; receiving latest version identification information sent by the server; comparing the version number of the emoji resources in the working area with the version number in the latest version identification information to obtain a comparison result; in response to the comparison result indicating a version difference, downloading the latest emoji resources sent by the server to a cache area; temporarily storing the latest emoji resources in the decompressed area to a second storage area; setting the second storage area as the working area and the first storage area as a backup area. For lightweight terminal devices, this method employs a process combining layered storage and atomic updates, avoiding the consumption of terminal memory resources and eliminating the need to parse the internal files of the emoji resources, thus achieving seamless updates and smooth switching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of resource updating technology, and more specifically, to a method, apparatus, device, and medium for updating emoji resources. Background Technology

[0002] Terminal devices such as children's smartwatches, story machines, and smart toys typically have chat functions. To enhance the fun of chatting, these devices often include the ability to send emoticons to express emotions (happiness, sadness, missing you, etc.), compensating for the limitations of text-based expression.

[0003] Existing terminal devices generally suffer from limited storage space and low CPU computing power. Updating emoji resources requires downloading the entire ZIP package and then using atomic overwriting to achieve rapid upgrades. While some optimization attempts exist, they all face significant problems: First, some solutions attempt to have the device remember old emoji fragment information using differential / patch methods to index old file blocks, but this is extremely difficult to implement due to insufficient ROM / RAM memory in MCU-level devices. Second, if a power outage occurs during the decompression process after a full ZIP download, the working area is prone to "partial write" corruption, resulting in unfinished emoji files that the device cannot recover from. Third, some solutions use a "decompression + single-file comparison" method before overwriting, requiring decompression first and then checking each file individually for replacement, doubling the time required and severely impacting user experience. Fourth, there is a lack of a unified version verification and rollback strategy, which can lead to resource loss or version drift after a failed upgrade, potentially resulting in lost emojis or version inconsistencies. Summary of the Invention

[0004] To quickly update emoji resources on small devices, in a first aspect, embodiments of the present invention provide an emoji resource updating method, applied to a terminal device, the method comprising:

[0005] Send the version number of the emoji resources in the first storage area to the server. The first storage area is the working area.

[0006] Receive the latest version identification information sent by the server;

[0007] The comparison results are obtained by comparing the version number of the emoji resources in the workspace with the version number in the latest version identifier information;

[0008] In response to the comparison result indicating a version difference, the latest emoji resource sent by the server is downloaded to the cache area;

[0009] The latest emoji resources in the cache are decompressed to the second storage area, which is a temporary decompression area.

[0010] Set the first storage area as the backup area and the second storage area as the working area.

[0011] As one possible implementation, downloading the latest emoji resources sent by the server to the cache includes:

[0012] Send a download request for the latest emoji pack resources to the server;

[0013] Download the latest emoji resources sent by the server to the cache area, and record the file range of the latest downloaded emoji resources in real time;

[0014] If a power outage occurs during the download process, upon restarting, the system checks if the cache contains any incompletely downloaded latest emoji resources. If so, it sends a resume request to the server, the resume request including data representing the file range of the latest emoji resources being downloaded. The system then downloads the incompletely downloaded latest emoji resources sent by the server to the cache.

[0015] As one possible implementation, after downloading the latest emoji resources sent by the server to the cache, the method further includes:

[0016] Calculate the CRC32 checksum of the latest emoji resource;

[0017] Compare whether the calculated CRC32 checksum is consistent with the CRC32 checksum in the latest version identification information;

[0018] If not, delete the latest emoji resource.

[0019] As one possible implementation, after setting the first storage area as a backup area and the second storage area as a working area, the method further includes:

[0020] Verify the integrity of the second storage area and obtain the verification result;

[0021] In response to the verification result being passed, the files in the third storage area are deleted, and the third storage area is set as a temporary decompression area;

[0022] In response to the verification result being unsuccessful, the second storage area is set as a temporary decompression area, the first storage area is set as a working area, and the process of sending the version number of the emoji resources in the first storage area to the server is returned.

[0023] Secondly, embodiments of the present invention provide a method for updating emoji resources, applied to a server, the method comprising:

[0024] The version number of the emoji resource sent by the receiving terminal device;

[0025] Determine whether the version number of the emoji resource sent by the terminal device is the same as the version number in the latest version identifier information;

[0026] If so, send the latest version identification information to the terminal device;

[0027] In response to receiving a download request from the terminal device, the latest emoji resources are sent to the terminal device.

[0028] As one possible implementation, the method further includes:

[0029] In response to receiving a resume request sent by the terminal device, the resume request includes data representing the file range of the latest emoji resources being downloaded;

[0030] Send the latest emoji pack resources that have not yet been downloaded to the terminal device.

[0031] Thirdly, embodiments of the present invention provide an emoji resource updating device, the device comprising:

[0032] The terminal version sending module is used to send the version number of the emoji resources in the first storage area to the server, where the first storage area is the working area;

[0033] The terminal version receiving module is used to receive the latest version identification information sent by the server;

[0034] The terminal version comparison module is used to compare the version number of the emoji resources in the workspace with the version number in the latest version identification information to obtain the comparison result;

[0035] The terminal resource download module is used to download the latest emoji resources sent by the server to the cache area in response to the comparison result indicating that the versions are different.

[0036] The terminal resource decompression module is used to decompress the latest emoji resources in the cache to the second storage area, where the second storage area is a temporary decompression area.

[0037] The terminal resource switching module is used to set the first storage area as a backup area and the second storage area as a working area.

[0038] Fourthly, embodiments of the present invention provide an emoji resource updating device, the device comprising:

[0039] The server-side version receiving module is used to receive the version number of the emoji resources sent by the terminal device;

[0040] The server-side comparison module is used to determine whether the version number of the emoji resource sent by the terminal device is the same as the version number in the latest version identifier information;

[0041] The server version sending module is used to send the latest version identification information to the terminal device if the condition is met.

[0042] The server-side resource sending module is used to send the latest emoji resources to the terminal device in response to receiving a download request from the terminal device.

[0043] Fifthly, embodiments of the present invention provide an electronic device, comprising:

[0044] One or more processors;

[0045] Storage device, on which one or more programs are stored,

[0046] When the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the method as described in the first aspect and / or the second aspect.

[0047] In a sixth aspect, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by one or more processors, implements the method as described in the first aspect and / or the second aspect.

[0048] The emoticon resource update method, apparatus, device, and medium provided in the embodiments of the present invention first send the version number of the emoticon resources in a first storage area to a server through a terminal device, the first storage area being a working area; then, receive the latest version identification information sent by the server; then compare the version number of the emoticon resources in the working area with the version number in the latest version identification information to obtain a comparison result; then, in response to the comparison result indicating that the versions are different, download the latest emoticon resources sent by the server to a cache area; then decompress the latest emoticon resources in the cache area to a second storage area, the second storage area being a temporary decompression area; finally, set the first storage area as a backup area and the second storage area as a working area.

[0049] In this way, for lightweight terminal devices, the process of using a combination of layered storage and atomic updates can avoid occupying terminal memory resources and eliminate the need to parse the internal files of emoji resources, thus achieving seamless updates and smooth switching. Attached Figure Description

[0050] Figure 1 This is an exemplary architecture diagram in which an embodiment of the present invention can be applied;

[0051] Figure 2 This is a flowchart of an embodiment of the emoji resource update method for terminal devices provided by the present invention;

[0052] Figure 3 This is a flowchart of an embodiment of the emoji resource update method applied to a server provided by the present invention;

[0053] Figure 4 This is a timing diagram of an embodiment of the emoji resource update method provided in this invention;

[0054] Figure 5 This is a structural diagram of one embodiment of the emoji resource updating device for terminal devices provided in this invention;

[0055] Figure 6 This is a structural diagram of one embodiment of the emoji resource updating device applied to a server provided in this invention;

[0056] Figure 7 This is a schematic diagram of the structure of a computer suitable for implementing embodiments of the present disclosure. Detailed Implementation

[0057] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.

[0058] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0059] Figure 1 An exemplary architecture 100 is shown, illustrating embodiments of the emoji resource update method, apparatus, electronic device, and storage medium to which the present invention can be applied.

[0060] like Figure 1 As shown, architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0061] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as communication applications, voice recognition applications, short video social applications, audio and video conferencing applications, live video streaming applications, document editing applications, input method applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0062] Terminal devices 101, 102, and 103 can be either hardware or software. When terminal devices 101, 102, and 103 are hardware, they can be various electronic devices with displays, including but not limited to children's watches, story machines, smart toys, smartphones, smart home appliances, wearable devices, and desktop computers. When terminal devices 101, 102, and 103 are software, they can be installed in the terminal devices listed above. They can be implemented as multiple software programs or software modules (e.g., to provide communication services) or as a single software program or software module. No specific limitations are imposed here.

[0063] Server 105 can be either hardware or software. When server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When server 105 is software, it can be implemented as multiple software programs or software modules (e.g., used to provide distributed services), or as a single software program or software module. No specific limitations are made here.

[0064] The emoji resource update method provided by this invention can be jointly executed by terminal devices 101, 102, and 103 and server 105. For example, the step of "sending the version number of the emoji resource in the first storage area to the server" can be executed by terminal devices 101, 102, and 103, and the step of "determining whether the version number of the emoji resource sent by the terminal device is the same as the version number in the latest version identifier information" can be executed by server 105. This invention does not limit this. Correspondingly, the emoji resource update device can also be respectively set in terminal devices 101, 102, and 103 and server 105.

[0065] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0066] Continue to refer to Figure 2 The flowchart 200 illustrates an embodiment of the emoji resource update method for terminal devices provided by the present invention, including the following steps:

[0067] Step S201: Send the version number of the emoji resources in the first storage area to the server.

[0068] In this embodiment, the Lightweight Update Engine (LUE) built into the terminal device divides the storage area into four parts: a first storage area, a second storage area, a third storage area, and a cache area. At step S201, the first storage area is the working area. The working area, which is the dedicated folder of the "current working area" in the terminal device, is the core directory for storing and displaying emoticon resources to the user. All emoticon files that are visible and usable by the user are stored here.

[0069] Emoji resources are generally ZIP packages. The version number is a unique identifier for the version of the emoji resource. It is the core basis for determining whether the local resources on the terminal need to be updated. It is consistent with the version number in the version identification information maintained by the server (e.g., ZIP-meta, which may include version number, total size, CRC32 checksum, digital signature, etc.).

[0070] The terminal device actively reads the version number of the emoji resources in the workspace through its built-in Lightweight Update Engine (LUE), and then sends the version number to the server through the communication module. This completes the initial interaction of the terminal reporting the local version, preparing for subsequent version comparison. In other words, it is the operation of the terminal reporting the local ZIP version number.

[0071] Step S202: Receive the latest version identification information sent by the server.

[0072] The latest version identification information, which can be equivalent to ZIP-meta, contains key information such as the version number, total size, CRC32 checksum, and digital signature of the latest emoji resource. It is like an "identity manual" for the latest emoji resource, used by the terminal to determine whether an update is needed and to verify the legality of the resource.

[0073] After receiving the version number sent by the terminal, the server will determine whether the terminal device needs to be updated. If so, it will return the latest version identifier information. The terminal receives this information through the communication module to obtain the core basis for judging whether local resources are outdated.

[0074] Step S203: Compare the version number of the emoji resources in the workspace with the version number in the latest version identifier information to obtain the comparison result.

[0075] The terminal's Lightweight Update Engine (LUE) compares the local version number read from the workspace with the version number in the latest version identifier information. If they match, the local resource is already up-to-date and no further update is needed; if they differ, the subsequent download process is triggered.

[0076] Step S204: In response to the comparison result indicating a version difference, download the latest emoji resources sent by the server to the cache area.

[0077] The cache area, also known as the "download cache area" among the four parts on the terminal side, is a dedicated area for storing ZIP format emoji resources that have just been downloaded or are not yet downloaded. Ideally, it should have the characteristic of not losing data when power is off to avoid data corruption during the download process.

[0078] The latest emoji resource is the only latest Full-ZIP package maintained by the server, containing N emoji resources and a central directory.

[0079] When the version comparison result is "different", the terminal starts the download process, obtains the latest ZIP format emoticon package resources from the server via the HTTP protocol, and stores them in the cache area instead of writing them directly to the working area, ensuring that the download process does not affect the emoticon resources currently in use.

[0080] Specifically, step S204 includes steps S2041 to S2043:

[0081] Step S2041: Send a download request for the latest emoji resources to the server.

[0082] After confirming that an update is needed, the terminal proactively sends a request instruction to the server, explicitly informing the server that "the latest emoji resources are needed". This request will carry basic information such as the terminal's identity and the required resource version, triggering the server's resource sending process, which corresponds to the pre-operation of "the terminal initiates a download request" in the document.

[0083] Step S2042: Download the latest emoji resources sent by the server to the cache area, and record the file range of the latest emoji resources downloaded in real time.

[0084] The file range refers to the byte range (e.g., "0-10240 bytes") corresponding to the downloaded ZIP package data segments. It is the key data for implementing breakpoint resume and is used to mark the download progress.

[0085] The terminal receives ZIP packet data sent by the server, writes it to the buffer, and simultaneously records the file range of each segment of downloaded data in real time, forming a download progress log. This recording method provides a basis for resuming downloads in case of possible interruptions, preventing downloaded data from becoming invalid due to network interruptions or power outages.

[0086] Step S2043: If a power outage occurs during the download process, after restarting, check if there are any unfinished latest emoji resources in the cache; if so, send a resume request to the server, the resume request including data representing the file range of the latest emoji resources being downloaded; download the unfinished latest emoji resources sent by the server to the cache.

[0087] A resume request is a request sent by the terminal to the server after restarting to "continue completing the download of undownloaded resources". The core of it is to carry the range of downloaded files and inform the server that "there is no need to resend the downloaded part".

[0088] If the device experiences an unexpected power outage during the download process, the Lightweight Update Engine (LUE) on the terminal will prioritize checking the cache after restarting. If there are any incomplete ZIP packages, it will read the previously recorded file range, generate and send a resume request to the server. The server, based on the file range in the request, will only send the undownloaded portion of the data. Upon receiving this, the terminal will continue writing the data to the cache to complete the remaining download. This operation fully implements the "resume interrupted download" function, avoiding repeated downloads and saving bandwidth and time.

[0089] As one possible implementation, after step S204, the method further includes: calculating the CRC32 checksum of the latest emoji resource; comparing whether the calculated CRC32 checksum is consistent with the CRC32 checksum in the latest version identification information; if not, deleting the latest emoji resource.

[0090] The CRC32 checksum is a 32-bit value generated by a cyclic redundancy check algorithm. It is used to verify file integrity and is the core criterion for determining whether a ZIP package is corrupted. After downloading, the terminal calculates the CRC32 checksum of the ZIP package in the cache and compares it with the CRC32 checksum in the latest version identifier information (ZIP-meta). If the two do not match, it means that the ZIP package was corrupted during the download process, and the terminal will immediately delete the cached package and report the failure to avoid using corrupted resources; if they match, the subsequent decompression process will proceed.

[0091] Step S205: Decompress the latest emoji resources in the cache area to the second storage area.

[0092] The second storage area at this time is a temporary decompression area, which is a separate area specifically used for decompressing ZIP packages and is completely isolated from the working area.

[0093] The terminal's Lightweight Update Engine (LUE) decompresses verified ZIP packages in the cache to a second storage area (temporary decompression area). Since this directory is independent of the current working area, even if errors occur during decompression (such as file corruption or power failure), it will not contaminate the emoji resources currently in use or their backups, ensuring that the user's current experience is not affected.

[0094] Step S206: Set the first storage area as a backup area and the second storage area as a working area.

[0095] The backup area is used to store the last intact emoji resources, serving as a "recovery guarantee" in case of update failure.

[0096] Optionally, the terminal can rename the directory using a POSIX rename (atomic operation) to set the storage area properties. First, the original working area (first storage area) is renamed to the backup area, completing an immediate backup of the old resources; then, the decompressed second storage area (temporary decompressed area) is renamed to the working area, allowing the new emoji resources to take effect immediately. The entire process is completed in milliseconds, imperceptibly to the user, ensuring the security and efficiency of the switching process.

[0097] As one possible implementation, after step S206, the method further includes:

[0098] Step S207: Verify the integrity of the second storage area and obtain the verification result.

[0099] After the terminal starts up, the Lightweight Update Engine (LUE) performs an integrity check on the second storage area that has been switched to the working area. The check can be performed using sampling CRC or digital signature verification to determine whether the new resources are damaged or missing, and then generate a check result.

[0100] Step S208: In response to the verification result being passed, delete the files in the third storage area and set the third storage area as a temporary decompression area.

[0101] If the verification result is "passed", it means that the new emoji resources are intact and usable. At this time, there is no need to keep the original backup area. The terminal will delete the files in this directory and release storage space, which corresponds to the operation "verification passed → delete / backup / release space" in the document.

[0102] Step S209: In response to the verification result being unsuccessful, the second storage area is set as a temporary decompression area, the first storage area is set as a working area, and the process of sending the version number of the emoji resources in the first storage area to the server is returned.

[0103] If the verification result is "failed", it indicates that there is a problem with the new resource (such as incomplete decompression or file corruption). The terminal immediately performs a reverse atomic renaming - changing the second storage area, which has become the working area, back to the temporary decompression area, and changing the first storage area of ​​the backup area back to the working area, restoring the previously intact emoji resources to avoid problems such as lost or unusable emojis for users. Then, it returns to the initial version reporting steps, restarts the update process, attempts to obtain and update the latest resources, and executes the rollback strategy.

[0104] Thus, through the complete process design described above, the emoji resource update method provided by this invention achieves fully automated closed-loop management from version reporting, comparison, downloading, verification to switching. Throughout the process, the terminal device and the server collaborate efficiently through the Lightweight Update Engine (LUE), ensuring both the accuracy and integrity of the updated resources. Furthermore, the atomic switching mechanism between the backup area and the working area completely avoids the loss of user emoji resources due to update failures. Simultaneously, the introduction of the breakpoint resume function further improves download efficiency, especially in unstable network environments, significantly saving user data and time costs. In addition, this method has good scalability, easily adapting to different types and sizes of terminal devices to meet diverse application scenario needs.

[0105] Continue to refer to Figure 3 The flowchart 300 illustrates an embodiment of the emoji resource update method applied to a server provided by the present invention, including the following steps:

[0106] Step S301: Receive the version number of the emoji resource sent by the terminal device.

[0107] The server receives the local emoji version number sent by the terminal through the communication interface. This version number is the core input data for the server to determine whether the terminal needs to be updated. It corresponds to the "version reporting" operation in step S201 on the terminal side, forming the first interactive link of "terminal reporting - server receiving".

[0108] Step S302: Determine whether the version number of the emoji resource sent by the terminal device is the same as the version number in the latest version identifier information.

[0109] The server retrieves the "latest version identifier information (ZIP-meta)" stored internally and checks the consistency between the version number in it and the version number sent by the terminal. This check is the key basis for the server to return updated resources in the future, forming a two-way verification with the "version comparison" in step S203 on the terminal side to ensure the accuracy of the version determination.

[0110] Step S303: If yes, send the latest version identification information to the terminal device.

[0111] If the judgment result is "the terminal version is the same as the latest version", the server only sends the latest version identification information (ZIP-meta) to the terminal, informing the terminal that "the local resources are already the latest", and no further download operation is required to avoid invalid data transmission.

[0112] Step S304: In response to receiving a download request from the terminal device, send the latest emoji resources to the terminal device.

[0113] When the server receives a "download request" from the terminal (corresponding to step S2041 on the terminal side), it retrieves the only latest Full-ZIP emoji resource from the storage module and sends the resource to the terminal via the HTTP protocol, triggering the terminal's download process (corresponding to step S2042 on the terminal side), thus realizing the core resource transmission link of server push and terminal reception.

[0114] Step S305: In response to receiving the resume request sent by the terminal device, send the latest undownloaded emoji resources to the terminal device.

[0115] The resume request includes data representing the file range of the latest emoji resources being downloaded. After receiving the resume request from the terminal, the server parses the "file range" data carried in the request, identifies the resource segments that the terminal has already downloaded, and determines the undownloaded data range that needs to be sent, thus preparing for accurate resume transmission.

[0116] Based on the parsed "file range", the server extracts only the part of the ZIP package data that the terminal has not downloaded and sends that part of the data to the terminal instead of resending the complete resource. This enables server support for "resuming interrupted downloads" and corresponds to the resume operation in step S2043 on the terminal side, ensuring the continuity and efficiency of the download process.

[0117] In summary, the emoji resource update method provided by this invention constructs a complete version management closed loop through collaborative interaction between the server and the terminal. The server, as the resource hub, not only maintains the unique version identifier information (ZIP-meta) of the latest emoji resources but also achieves precise control over resource updates by dynamically responding to the terminal's version reporting, download requests, and resume requests. In the version judgment stage, the dual verification mechanism between the server and the terminal ensures the accuracy of version consistency judgment, avoiding invalid updates or resource loss due to version misjudgment. In the resource transmission stage, the server supports both full download and breakpoint resume modes, satisfying the complete requirements of the initial update while optimizing the update experience under unstable network conditions. In particular, the breakpoint resume function, by parsing the file range data sent by the terminal, accurately locates the undownloaded portion, achieving efficient resource resending and significantly saving user traffic and time costs. Furthermore, the server design fully considers scalability and compatibility, adapting to different types and sizes of terminal devices to meet diverse application scenario needs. Through this close collaboration between the server and the terminal, the emoji resource update method provided by this invention not only improves update efficiency and resource accuracy, but also provides users with a more stable and reliable emoji usage experience.

[0118] Continue to refer to Figure 4The diagram illustrates a timing diagram 400 of an embodiment of the emoji resource update method provided by the present invention, which includes the following steps:

[0119] Step S401: The terminal device sends the version number of the emoji resources in the first storage area to the server.

[0120] Step S402: The server determines whether the version number of the emoji resource sent by the terminal device is the same as the version number in the latest version identification information; if so, it sends the latest version identification information to the terminal device.

[0121] Step S403: The terminal device compares the version number of the emoji resources in the work area with the version number in the latest version identifier information to obtain a comparison result; in response to the comparison result indicating that the versions are different, the terminal device downloads the latest emoji resources sent by the server to the cache area.

[0122] Step S404: If the terminal device loses power during the download process, after restarting, the terminal device checks whether there are any unfinished latest emoji resources in the cache; if so, it sends a resume request to the server.

[0123] Step S405: The terminal device downloads the latest emoticon pack resources that have not yet been downloaded from the server to the cache area.

[0124] Step S406: Calculate the CRC32 checksum of the latest emoji resource, and compare the calculated CRC32 checksum with the CRC32 checksum in the latest version identification information. If not, delete the latest emoji resource.

[0125] Step S407: The terminal device decompresses the latest emoji resources in the cache area to the second storage area.

[0126] Step S408: The terminal device sets the first storage area as a backup area and the second storage area as a working area.

[0127] Step S409: The terminal device verifies the integrity of the second storage area and obtains the verification result.

[0128] Step S410: In response to the verification result being passed, the terminal device deletes the file in the third storage area and sets the third storage area as a temporary decompression area.

[0129] Step S411: In response to the verification result being unsuccessful, the terminal device sets the second storage area as a temporary decompression area, sets the first storage area as a working area, and returns to execute step S401.

[0130] The implementation details of this embodiment are similar to those of the embodiments described above, and will not be repeated here.

[0131] In this way, the server (such as the manufacturer's server) and the terminal (such as your child's smartwatch) work together to solve the problems of lagging, being prone to damage, and being insecure in older methods for terminal devices with "small memory and weak performance" by downloading the entire ZIP package and "atomic switching." The terminal only needs to verify the validity of the package (signature / CRC), without parsing the internal files. It features atomic switching between decompression and overwriting directories, power-loss safety, support for resuming interrupted downloads, automatic discarding of compressed packages that fail verification, and no upload of any user data throughout the process, ensuring privacy compliance.

[0132] Experiments show that this type of single file system operation does not require traversing internal files, reducing CPU usage by 70%; after a download is interrupted, the integrity will be checked first on the next startup, and then the interrupted download will continue; the dual-directory atomic switching function ensures that the file system can ensure that a complete resource directory is available at any time when power is lost, achieving "self-healing".

[0133] For the IoT toy project (256 MB Flash, single-core A7), the ZIP package is 10.5 MB. Under a WIFI network environment, the total time for downloading, decompressing and switching is 10.1 seconds; the peak memory usage is 2.3 MB, and the CPU utilization is 15%; after 50 random power outage tests, it can achieve 100% self-healing rollback without any resource corruption.

[0134] Further reference Figure 5 , Figure 5 This invention provides a structural diagram 500 illustrating one embodiment of an emoji resource update device for terminal devices, as described above. Figure 2 The implementation of the method shown, and the device embodiment Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices, including:

[0135] The terminal version sending module 501 is used to send the version number of the emoji resources in the first storage area to the server, where the first storage area is the working area;

[0136] The terminal version receiving module 502 is used to receive the latest version identification information sent by the server;

[0137] The terminal version comparison module 503 is used to compare the version number of the emoji resources in the work area with the version number in the latest version identification information to obtain the comparison result;

[0138] The terminal resource download module 504 is used to download the latest emoji resources sent by the server to the cache area in response to the comparison result indicating that the versions are different.

[0139] The terminal resource decompression module 505 is used to decompress the latest emoji resources in the cache to the second storage area, where the second storage area is a temporary decompression area.

[0140] The terminal resource switching module 506 is used to set the first storage area as a backup area and the second storage area as a working area.

[0141] As one possible implementation, the terminal resource download module 504 includes:

[0142] The download request unit is used to send a download request for the latest emoji resources to the server;

[0143] The download unit is used to download the latest emoji resources sent by the server to the cache area and record the file range of the latest downloaded emoji resources in real time;

[0144] The restart and resume unit is used to detect, upon restarting, whether there are any unfinished latest emoji resources in the cache if a power outage occurs during the download process; if so, to send a resume request to the server, the resume request including data representing the file range of the latest emoji resources to be downloaded; and to download the unfinished latest emoji resources sent by the server to the cache.

[0145] As one possible implementation, the emoji resource update device applied to the terminal device further includes:

[0146] The checksum calculation module is used to calculate the CRC32 checksum of the latest emoji resource;

[0147] The verification module is used to compare whether the calculated CRC32 checksum is consistent with the CRC32 checksum in the latest version identification information.

[0148] The verification and deletion module is used to delete the latest emoji resource if the condition is not met.

[0149] As one possible implementation, the emoji resource update device applied to the terminal device further includes:

[0150] The integrity verification module is used to verify the integrity of the second storage area and obtain the verification result.

[0151] The expired backup deletion module is used to delete the files in the third storage area in response to the verification result being passed, and to set the third storage area as a temporary decompression area;

[0152] The rollback module is used to, in response to the verification result being unsuccessful, set the second storage area as a temporary decompression area, set the first storage area as a working area, and return the version number of the emoji resources in the first storage area to the server.

[0153] It should be noted that the implementation details and technical effects of each module and unit in the device provided in the embodiments of the present invention can be referred to the description of other embodiments of the present invention, and will not be repeated here.

[0154] Further reference Figure 6 , Figure 6 This diagram 600 illustrates a structural diagram of an embodiment of an emoji resource update device for a server provided by the present invention, as an example of the above-described... Figure 3 The implementation of the method shown, and the device embodiment Figure 3 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices, including:

[0155] The server-side version receiving module 601 is used to receive the version number of the emoji resources sent by the terminal device;

[0156] The server-side comparison module 602 is used to determine whether the version number of the emoji resource sent by the terminal device is the same as the version number in the latest version identifier information;

[0157] The server version sending module 603 is used to send the latest version identification information to the terminal device if necessary.

[0158] The server-side resource sending module 604 is used to send the latest emoji resources to the terminal device in response to receiving a download request from the terminal device.

[0159] As one possible implementation, the emoji resource update device applied to the server further includes:

[0160] The server resume request receiving module is used to respond to receiving a resume request sent by the terminal device, wherein the resume request includes data representing the file range of the latest emoji resources to be downloaded;

[0161] The server resume module is used to send the latest emoji resources that have not yet been downloaded to the terminal device.

[0162] It should be noted that the implementation details and technical effects of each module and unit in the device provided in the embodiments of the present invention can be referred to the description of other embodiments of the present invention, and will not be repeated here.

[0163] The following is for reference. Figure 7 It shows a schematic diagram of the structure of a computer 700 suitable for implementing the electronic device of the present invention. Figure 7 The computer 700 shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention.

[0164] like Figure 7As shown, the computer 700 may include a processing device 701 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (i.e., ROM 702) or a program loaded from a storage device 708 into a random access memory (i.e., RAM 703). The RAM 703 also stores various programs and data required for the operation of the computer 700. The processing device 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0165] Typically, the following devices can be connected to I / O interface 705: input devices 706 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, etc.; output devices 707 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 708 including, for example, magnetic tapes, hard disks, etc.; and communication devices 709. Communication device 709 allows computer 700 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 A computer 700 with various electronic devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0166] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 709, or installed from a storage device 708, or installed from a ROM 702. When the computer program is executed by a processing device 701, it performs the functions defined in the methods of the embodiments of the present invention.

[0167] It should be noted that the computer-readable medium described above in this invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor device or apparatus, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be executed by instructions, used by a device or apparatus, or used in conjunction with it. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with instructions, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0168] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0169] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the following functions: Figure 2 , Figure 3 or Figure 4 The methods illustrated in the embodiments and their alternative implementations are methods.

[0170] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0171] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using dedicated hardware-based implementations that perform the specified functions or operations, or using a combination of dedicated hardware and computer instructions.

[0172] The units or modules described in the embodiments of the present invention can be implemented in software or hardware. The names of the units or modules do not necessarily limit the specific unit itself.

[0173] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-disclosed concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this invention.

Claims

1. An expression package resource updating method, characterized in that, The method is applied to a lightweight terminal device, the lightweight terminal device comprises a first storage area, a second storage area and a cache area, and the method comprises the following steps: sending a version number of an emoticon package resource in the first storage area to a server, the first storage area being a working area, and the emoticon package resource being a ZIP package; receiving latest version identification information sent by the server; comparing the version number of the emoticon package resource in the working area with a version number in the latest version identification information to obtain a comparison result; in response to the comparison result being different versions, downloading the latest emoticon package resource sent by the server to the cache area through an HTTP protocol, the cache area storing emoticon package resources that have just been downloaded or have not been completely downloaded; decompressing the latest emoticon package resource in the cache area to the second storage area, the second storage area being a temporary decompression area; setting the first storage area as a backup area and the second storage area as the working area through an atomic operation.

2. The method of claim 1, wherein, The method further comprises the following steps after the latest emoticon package resource sent by the server is downloaded to the cache area: calculating a CRC32 check code of the latest emoticon package resource; comparing the calculated CRC32 check code with a CRC32 check code in the latest version identification information to determine whether they are consistent; if not, deleting the latest emoticon package resource.

3. The method of claim 1, wherein, The lightweight terminal device further comprises a third storage area, and the method further comprises the following steps after the first storage area is set as the backup area and the second storage area is set as the working area: checking the integrity of the second storage area to obtain a checking result; in response to the checking result being passed, deleting files in the third storage area and setting the third storage area as a temporary decompression area; in response to the checking result being failed, setting the second storage area as the temporary decompression area, setting the first storage area as the working area, and returning to execute the step of sending the version number of the emoticon package resource in the first storage area to the server.

4. The method of claim 1, wherein, The method is applied to a lightweight terminal device, the lightweight terminal device comprises a first storage area, a second storage area and a cache area, and the method comprises the following steps: sending a version number of an emoticon package resource in the first storage area to a server, the first storage area being a working area, and the emoticon package resource being a ZIP package; receiving latest version identification information sent by the server; comparing the version number of the emoticon package resource in the working area with a version number in the latest version identification information to obtain a comparison result; 5. An emoticon resource updating apparatus, characterized by comprising: in response to the comparison result being different versions, downloading the latest emoticon package resource sent by the server to the cache area through an HTTP protocol, the cache area storing emoticon package resources that have just been downloaded or have not been completely downloaded; decompressing the latest emoticon package resource in the cache area to the second storage area, the second storage area being a temporary decompression area; setting the first storage area as a backup area and the second storage area as the working area through an atomic operation. The method further comprises the following steps after the latest emoticon package resource sent by the server is downloaded to the cache area: calculating a CRC32 check code of the latest emoticon package resource; comparing the calculated CRC32 check code with a CRC32 check code in the latest version identification information to determine whether they are consistent; if not, deleting the latest emoticon package resource. The lightweight terminal device further comprises a third storage area, and the method further comprises the following steps after the first storage area is set as the backup area and the second storage area is set as the working area: checking the integrity of the second storage area to obtain a checking result; in response to the checking result being passed, deleting files in the third storage area and setting the third storage area as a temporary decompression area; in response to the checking result being failed, setting the second storage area as the temporary decompression area, setting the first storage area as the working area, and returning to execute the step of sending the version number of the emoticon package resource in the first storage area to the server. The method is applied to a lightweight terminal device, the lightweight terminal device comprises a first storage area, a second storage area and a cache area, and the method comprises the following steps: sending a version number of an emoticon package resource in the first storage area to a server, the first storage area being a working area, and the emoticon package resource being a ZIP package; receiving latest version identification information sent by the server; comparing the version number of the emoticon package resource in the working area with a version number in the latest version identification information to obtain a comparison result; The terminal resource downloading module is configured to download the latest emoticon package resource sent by the server to a cache area through an HTTP protocol in response to the comparison result being different versions. The terminal resource decompression module is configured to decompress the latest emoticon package resource in the cache area to a second storage area, which is a temporary decompression area. The terminal resource switching module is configured to set the first storage area as a backup area and the second storage area as a working area through an atomic operation.

6. An electronic device, comprising: Comprise: One or more processors; A storage device having one or more programs stored thereon, which, when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1 to 4.

7. A computer readable storage medium characterized by A computer program is stored thereon, wherein the computer program is executed by one or more processors to implement the method of any one of claims 1 to 4.

Citation Information

Patent Citations

  • Power-off continuous transmission upgrading method and terminal system thereof

    CN110262816A

  • System updating method and device, electronic equipment and computer readable storage medium

    CN111666091A

  • Resource updating method and device, electronic equipment, server and storage medium

    CN114675871A