Multi-terminal-oriented resource classification processing method and device and related equipment

By classifying and integrating resource files on the server and uploading them to cloud services, the problem that clients cannot obtain the latest resources in a timely manner is solved, and timely updates of resources and reducing pressure on the server are achieved.

CN120216469APending Publication Date: 2025-06-27HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510336427.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

When the application uses many types of resources and changes frequently, the client cannot obtain the latest resources in time due to excessive server load and other reasons.

Method used

By classifying resource files on the server side, all files of the same resource type are integrated into structured resource files and uploaded to cloud services. The server updates the download address and notifies the native side, and the client updates the resource file through the latest download address.

Benefits of technology

The client has realized the function of obtaining the latest resources in a timely manner, reducing the pressure on the server, and realizing timely updates of resources through cloud configuration, avoiding the update of the overall resource file.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120216469A_ABST
    Figure CN120216469A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-terminal-oriented resource classification processing method and device and related equipment, and relates to the technical field of multi-terminal resource processing, a server side obtains resource files corresponding to a preset resource scene, the server side classifies the resource files to obtain a classification result, all resource files of the same resource type in the classification result are collected, and the resource files of the same resource type are stored in the server side; the server side integrates all the resource files into a structured resource file and uploads the structured resource file to the cloud side for service, the server side obtains a file address corresponding to the structured resource file and updates the downloading address of the same resource type according to the file address, the server side determines the updated downloading address as the latest resource file downloading address, and the server side sends the latest resource file downloading address to the server side. And the server side sends the latest resource file downloading address to a native side in the client side through the cloud service, so that the native side in the client side carries out client side resource file updating operation through the latest resource file downloading address.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of multi-terminal resource processing, and more specifically, to a method, device, and related equipment for resource classification processing for multiple terminals. Background Art

[0002] The client includes a front end and a native end. The types of resources that the front end needs to obtain include text, images, videos, audio, script files, etc. These resources can be stored in the file system of the server or generated by querying the database.

[0003] When the types of resources used by the application are numerous and change frequently, the front end may not be able to obtain the latest resources in a timely manner due to reasons such as high server load.

[0004] Therefore, how to enable the client to obtain the latest resources in a timely manner is an urgent problem to be solved in this application. Summary of the Invention

[0005] In view of this, this application discloses a method, device, and related equipment for resource classification processing for multiple terminals, aiming to update various resources in a timely manner through cloud configuration, so that the client can obtain the latest resources in a timely manner.

[0006] To achieve the above objective, the disclosed technical solutions are as follows:

[0007] The first aspect of this application discloses a method for resource classification processing for multiple terminals. The method is applied to the server, and the method includes:

[0008] Obtain the resource files corresponding to the preset resource scenarios;

[0009] Classify the resource files to obtain a classification result;

[0010] Collect all the resource files of the same resource type in the classification result, integrate the all resource files into a structured resource file and upload it to the cloud service;

[0011] Obtain the file address corresponding to the structured resource file, and update the download address of the same resource type with the file address;

[0012] Determine the updated download address as the latest resource file download address;

[0013] Send the latest resource file download address to the native end in the client through the cloud service, so that the native end in the client can perform client resource file update operations through the latest resource file download address.

[0014] Preferably, the classifying the resource files to obtain a classification result includes:

[0015] Classify the resource files according to the resource function characteristics and the preset resource scenario to obtain a classification result; wherein, the classification includes at least assigning a unique ID to the resource and setting detailed resource information.

[0016] Preferably, collect all resource files of the same resource type in the classification result, and integrate all the resource files into a structured resource file and upload it to the cloud service, including:

[0017] Obtain the unique resource ID in the classification result, and query the resource classification in the classification result according to the unique resource ID;

[0018] Query all detailed resource information of the same type according to the resource classification to complete the process of collecting all resource files of the same resource type in the classification result;

[0019] For all resource files of the same resource type, serialize all the detailed resource information of the same type into a JS key-value pair data object;

[0020] Construct the JS key-value pair data object into a file stream to complete the process of integrating all resource files of the same resource type into a structured resource file, and upload the structured resource file to the cloud service.

[0021] The second aspect of the present application discloses a resource classification processing method for multiple terminals, which is applied to the native terminal, and the method includes:

[0022] When receiving the latest resource file download address sent by the server, perform a client resource file update operation according to the latest resource file download address;

[0023] Wherein, the latest resource file download address is determined by the file address corresponding to the structured resource file; the structured resource file is obtained by the server integrating all resource files of the same resource type in the classification result; the classification result is obtained by the server classifying the resource files corresponding to the preset resource scenario.

[0024] Preferably, when receiving the latest resource file download address sent by the server, perform a client resource file update operation according to the latest resource file download address, including:

[0025] When receiving the latest resource file download address sent by the server, obtain the local resource file address;

[0026] Compare the local resource file address with the latest resource file download address;

[0027] If the local resource file address is inconsistent with the latest resource file download address, obtain the latest resource file from the object storage service to complete the operation of updating the client resource file according to the latest resource file download address;

[0028] If the local resource file address is consistent with the latest resource file download address, download the latest resource file from the latest resource file download address to complete the operation of updating the client resource file according to the latest resource file download address.

[0029] Preferably, it further includes:

[0030] When a resource acquisition requirement is received, perform a resource search from the local resource file address according to the resource acquisition requirement to obtain the resource corresponding to the resource acquisition requirement.

[0031] The third aspect of this application discloses a multi-terminal-oriented resource classification processing device, which is applied to the server side. The method includes:

[0032] A first acquisition unit for acquiring a resource file corresponding to a preset resource scenario;

[0033] A classification unit for classifying the resource file to obtain a classification result;

[0034] An integration unit for collecting all resource files of the same resource type in the classification result, integrating the all resource files into a structured resource file and uploading it to the cloud service;

[0035] A second acquisition unit for acquiring the file address corresponding to the structured resource file and updating the download address of the same resource type with the file address;

[0036] A determination unit for determining the updated download address as the latest resource file download address;

[0037] An update operation unit for sending the latest resource file download address to the native side in the client through the cloud service, so that the native side in the client performs the operation of updating the client resource file through the latest resource file download address.

[0038] The fourth aspect of this application discloses a multi-terminal-oriented resource classification processing device, which is applied to the native side. The device includes:

[0039] A second operation unit, configured to perform a client resource file update operation according to the latest resource file download address when receiving the latest resource file download address sent by the server; wherein, the latest resource file download address is determined by the file address corresponding to the structured resource file; the structured resource file is obtained by the server integrating all resource files of the same resource type in the classification result; the classification result is obtained by the server classifying the resource files corresponding to the preset resource scenario.

[0040] A fifth aspect of the present application discloses a storage medium, which includes stored instructions. When the instructions are running, the device where the storage medium is located is controlled to execute the multi-terminal oriented resource classification processing method according to any one of the first aspects.

[0041] A sixth aspect of the present application discloses an electronic device, including a memory, and one or more instructions, wherein one or more instructions are stored in the memory and are configured to be executed by one or more processors to execute the multi-terminal oriented resource classification processing method according to any one of the first aspects.

[0042] Through the above technical solutions, the present application discloses a multi-terminal oriented resource classification processing method, device and related equipment. The server obtains the resource files corresponding to the preset resource scenario, classifies the resource files to obtain a classification result, collects all resource files of the same resource type in the classification result, the server integrates all resource files into a structured resource file and uploads it to the cloud service, the server obtains the file address corresponding to the structured resource file, and updates the download address of the same resource type with the file address, the server determines the updated download address as the latest resource file download address, and the server sends the latest resource file download address to the native end in the front end through the cloud service, so that the client in the front end obtains the latest resource file download address from the native end, and performs a client resource file update operation through the client and the latest resource file download address.

[0043] Through the above solution, the server classifies different resource types such as level information, emoticons, materials, etc. For each type, the server organizes all resource files of the same resource type into independent structured resource files. When the resources are updated, the server only needs to notify the native side to update the corresponding client resource files according to the type to which the updated object belongs, avoiding the overall update of all resource files. The client includes a front-end and a native side. When the front-end is developed using multiple technologies, unified resource management is implemented on the front-end without the need for real-time distribution by the server, reducing the pressure on the server. And when managing resources that need to be used by native functions and H5 functions simultaneously, they are distributed once for multi-terminal use by the front-end and the native side, etc. At the same time, a solution for obtaining resources by classification is also provided, enabling various resources to be updated in a timely manner through cloud configuration without the need for application version release, so that the client can obtain the latest resources in a timely manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained according to the provided drawings.

[0045] Figure 1 It is a schematic flow chart of a multi-terminal-oriented resource classification processing method disclosed in an embodiment of the present application;

[0046] Figure 2 It is a schematic flow chart of server resource upload disclosed in an embodiment of the present application;

[0047] Figure 3 It is a schematic flow chart of another multi-terminal-oriented resource classification processing method disclosed in an embodiment of the present application;

[0048] Figure 4 It is a schematic diagram of front-end resource update disclosed in an embodiment of the present application;

[0049] Figure 5 It is a schematic diagram of obtaining front-end resource details disclosed in an embodiment of the present application;

[0050] Figure 6 It is a schematic structural diagram of a multi-terminal-oriented resource classification processing device disclosed in an embodiment of the present application;

[0051] Figure 7 It is a schematic structural diagram of another multi-terminal-oriented resource classification processing device disclosed in an embodiment of the present application;

[0052] Figure 8Schematic diagram of the structure of the electronic device disclosed in the embodiments of the present application. Specific implementation manners

[0053] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0054] In the present application, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "comprising a..." does not exclude the existence of additional identical elements in the process, method, article or device comprising the element.

[0055] As can be seen from the background art, when the types of resources used by an application are numerous and change frequently, the client cannot obtain the latest resources in a timely manner due to imperfect resource update mechanisms of the application, high server loads, and other reasons. Therefore, how to enable the client to obtain the latest resources in a timely manner is an urgent problem to be solved in the present application.

[0056] To solve the above problems, the present application discloses a method, device and related equipment for resource classification processing for multiple terminals. The server classifies different resource types such as level information, emoticons, materials, etc. For each type, the server organizes all resource files of the same resource type into independent structured resource files. When resources are updated, the server only needs to notify the native side to update the corresponding client resource files according to the type to which the update object belongs, avoiding updating all resource files as a whole. The client includes a front end and a native side. When the front end is developed using multiple technologies, unified resource management is implemented at the front end without real-time distribution by the server, reducing the pressure on the server. And when managing resources that need to use native functions and H5-end functions at the same time, they are distributed at one time and used by multiple terminals such as the front end and the native side. At the same time, a solution for obtaining resources by classification is also provided, enabling various resources to be updated in a timely manner only through cloud configuration without the need for an application version release, so that the client can obtain the latest resources in a timely manner. The specific implementation manner will be specifically described in the following embodiments.

[0057] Refer to Figure 1As shown in the figure, it is a schematic flowchart of a resource classification and processing method for multiple terminals disclosed in an embodiment of the present application. This resource classification and processing method for multiple terminals is applied to the server, and the method mainly includes the following steps:

[0058] S101: The server obtains the resource files corresponding to the preset resource scenarios.

[0059] Among them, the preset resource scenarios include, but are not limited to, scenarios of newly added resources and scenarios where resource information has changed.

[0060] S102: The server classifies the resource files to obtain a classification result.

[0061] In S102, the server classifies the resource files according to the resource function characteristics and the preset resource scenarios to obtain a classification result; among them, the classification includes at least assigning a unique resource ID and setting the detailed resource information. The classification includes assigning a unique resource ID, setting the detailed resource information, maintaining the detailed resource information, etc.

[0062] Among them, the server's basis for resource function characteristics includes characteristics such as emoji resources being displayed on the private chat page, virtual avatars being displayed in the mall, and chat bubbles being displayed in the backpack.

[0063] All that needs to be shown to the user is a resource. For example, the types of resources include expression resources, virtual avatars, chat bubbles, etc. Different resources contain different contents. For example, chat bubbles contain background colors, fonts, etc. Chat bubbles have static resources and dynamic resources, and virtual avatars are divided into different parts. Different resources are also shown in different places. Emoji resources are shown on the private chat page, virtual avatars, for example, are shown in the mall, and chat bubbles are shown in the backpack. In summary, classification will be based on the different function characteristics of the resources.

[0064] The unique resource ID is assigned when the resource is created and consists of information such as the resource category and resource number.

[0065] There is a dedicated resource maintenance background, where all attributes of the resource can be set in the background to achieve setting and maintaining the detailed resource information.

[0066] S103: The server collects all the resource files of the same resource type in the classification result, integrates the resource files into a structured resource file, and uploads it to the cloud service.

[0067] It should be noted that integrating the resource files into a structured resource file can improve the data management efficiency. Structured data is easier to understand and analyze, which helps to improve the value of data usage.

[0068] The object storage service provides a storage solution with high reliability and high security. By uploading resource files to the object storage service, the security and integrity of the data can be ensured. In addition, the object storage service usually provides data backup and recovery functions, further enhancing data security. And the object storage service usually has a distributed architecture and content delivery network (CDN) support, which can significantly improve the access speed of data. By uploading resource files to the object storage service, the transmission and access of data can be accelerated, improving the user experience.

[0069] After the server uploads the resource to the object storage service, it will obtain a file address. The server saves the file address on the server. After the client obtains this file address from the server, it downloads the corresponding resource file from the object storage service. The server updates the download address of the type resource after uploading to the object storage service, that is, the server only saves the latest file download address.

[0070] The process of specifically collecting all resource files of the same resource type in the classification result, integrating the resource files into a structured resource file, and uploading it to the cloud service is shown in A1 - A4.

[0071] A1: Obtain the unique resource ID in the classification result, and query the resource classification in the classification result according to the unique resource ID.

[0072] Among them, the unique resource ID is assigned when the resource is created and consists of information such as the resource category and resource number.

[0073] A2: Query all resource details of the same type according to the resource classification to complete the process of collecting all resource files of the same resource type in the classification result.

[0074] For example, if there are resource files of two different resource types (such as expression resources and virtual avatars) in the classification result, integrate the resource files of the expression resources into a structured resource file, and integrate the resource files of the virtual avatars into another structured resource file.

[0075] A3: For all resource files of the same resource type, serialize all resource details of the same type into a JS key - value pair data object.

[0076] A4: Construct the JS key - value pair data object into a file stream to complete the process of integrating all resource files of the same resource type into a structured resource file.

[0077] S104: The server obtains the file address corresponding to the structured resource file and updates the download address of the same resource type with the file address.

[0078] S105: The server determines the updated download address as the latest resource file download address.

[0079] S106: The server sends the latest resource file download address to the native side in the client through the cloud service, so that the native side in the client can perform the client resource file update operation according to the latest resource file download address.

[0080] The client includes a front end and a native side.

[0081] For the convenience of understanding the process of resource classification and processing for multiple terminals, an example is given in combination with Figure 2 for illustration. Figure 2 Fig. shows the schematic flow chart of server resource upload.

[0082] Figure 2 In, the server determines whether the usage scenario is a new resource scenario;

[0083] If so, the server obtains the resource files corresponding to the new resource scenario, classifies the resource files, and organizes the resource information to obtain a classification result; The classification includes at least resource type, assigning a unique resource ID, setting, maintaining resource detailed information, etc.;

[0084] If not, update the resource information; Among them, the updated resource information such as expression name, expression description, expression files, etc. all the information that needs to be exposed on the client;

[0085] The server based on all the resource files of the same resource type in the classification result, and integrates the resource files into a structured resource file and uploads it to the cloud service;

[0086] The server obtains the file address corresponding to the structured resource file, and updates the download address of the same resource type with the file address;

[0087] The server notifies the client to update the resource file, that is, the server sends the latest resource file download address to the native side in the client through the cloud service, so that the native side in the client can perform the client resource file update operation through the latest resource file download address.

[0088] This application combines technologies such as cloud service, native side, and H5 to form a resource classification management solution for multiple terminals. The APP has both native development functions, such as private chat, and H5 development functions, such as shopping mall. This solution is used to manage resources that need to be used simultaneously in native functions and H5 functions, realizing one-time distribution and multi-terminal use. At the same time, it also provides a solution for classifying and obtaining resources, achieving the purpose of timely updating various resources through cloud configuration without the need for App release.

[0089] The server classifies different resources, such as level information, emoticons, materials, etc. For each type, the server organizes the relevant resources into independent resource files. When the resources are updated, the server only needs to notify the native side to update the corresponding resource file according to the type of the updated object, avoiding updating all resource files as a whole. When organizing the resources, a unique resource ID is assigned to each resource for resource indexing and querying. The native side downloads all resources from the cloud, stores them classified, and refreshes the local resource files according to the update policy (such as system messages); the native side can obtain a single resource through the resource ID, or obtain all resources of a certain type through the type. The update policy means that when the native side starts the APP, it obtains the latest resource address from the server and compares it with the local resource address. If they are inconsistent, it performs an overwrite update. When the server resource file is updated, a system message is pushed to the client, and the client pulls the latest resource file for overwrite update. The H5 side obtains the local resources through the interface provided by the native side without obtaining them from the server, greatly improving the H5 rendering speed and enhancing the user experience.

[0090] This solution is applicable to applications with a large variety of resource information, frequent changes, and developed using multiple front-end technologies. When an application uses a large variety of resources and the changes are frequent, how to enable the client to obtain the latest resources in a timely manner and at the same time be able to conveniently obtain all resources of a certain type. When the front-end is developed using multiple technologies, if unified resource management is implemented on the front-end without relying on the real-time distribution of the server, the pressure on the server can be reduced.

[0091] In this solution, the server classifies the resources according to the functional characteristics and usage scenarios of the resources. When a certain type of resource changes, the server collects the latest information of all resources of this type, integrates and processes them into a structured resource file, and uploads the structured resource file to the cloud service. The server synchronously notifies the native side that the resource file has been updated. After receiving the notification, the server enables the native side to obtain the latest resource file download address from the server, and after downloading the resource file from the cloud service, enables the native side to perform an overwrite update on the resources in the local database; when the native side or the H5 side needs to obtain resources, it directly retrieves a single resource from the local according to the requirement, or can also obtain all resources of a certain type.

[0092] Advantages of the embodiments of the present application: The server classifies different resource types such as level information, emoticons, materials, etc. For each type, the server organizes all resource files of the same resource type into independent structured resource files. When the resources are updated, the server only needs to notify the native side to update the corresponding client resource files according to the type to which the update object belongs, avoiding the overall update of all resource files. The client includes a front end and a native side. When the front end is developed using multiple technologies, unified resource management is implemented on the front end without the need for real-time distribution by the server, reducing the pressure on the server. And when managing resources that need to be used by native functions and H5-side functions at the same time, they are distributed once and used by multiple sides such as the front end and the native side. At the same time, a solution for obtaining resources by classification is also provided, enabling various resources to be updated in a timely manner without the need for the release of the application version, but only through cloud configuration, so that the client can obtain the latest resources in a timely manner.

[0093] Reference Figure 3 As shown, it is a flowchart of another multi-terminal-oriented resource classification processing method disclosed in the embodiments of the present application. This another multi-terminal-oriented resource classification processing method is applied to the native side, and this another multi-terminal-oriented resource classification processing method mainly includes the following steps:

[0094] S301: The native side receives the download address of the latest resource file sent by the cloud service.

[0095] In S301, at an appropriate time, such as when the application (App) starts or when a server notification is received, the native side queries the latest resources through the download address of the latest resource file sent by the cloud service to refresh the local resources.

[0096] The native side obtains the list of all resource file addresses from the server as needed and sends the list of all resource file addresses to the client.

[0097] The native side obtains the download address of the latest resource file sent by the cloud service from the list of all resource file addresses. When the native side obtains the resource details, according to the content to be queried, it can obtain the details of a single resource from the local data according to the resource unique ID, or obtain the details of all resources of a certain type from the local database according to the resource type.

[0098] The specific process of the native side receiving the download address of the latest resource file sent by the cloud service is as shown in B1 - B4.

[0099] B1: When the native side receives the download address of the latest resource file sent by the server, it obtains the local resource file address.

[0100] In B1, when the native side receives the latest resource file download address sent by the server side, the native side obtains the local resource file address and compares the local resource file address with the latest resource file address.

[0101] B2: The native side compares the local resource file address with the latest resource file download address.

[0102] B3: If the local resource file address is inconsistent with the latest resource file download address, the native side obtains the latest resource file from the object storage service to complete the operation of updating the client resource file according to the latest resource file download address.

[0103] In B3, the native side compares the local resource file address with the latest resource file download address. If they are inconsistent, it pulls the latest resource file from the object storage service, overwrites and updates the local resources, and updates the latest resource file address.

[0104] B4: If the local resource file address is consistent with the latest resource file download address, the native side downloads the latest resource file from the latest resource file download address to complete the operation of updating the client resource file according to the latest resource file download address.

[0105] In B4, if the local resource file address is consistent with the latest resource file download address, the native side downloads the latest resource file from the latest resource file download address to complete the operation of updating the client resource file according to the latest resource file download address.

[0106] S302: The native side performs the operation of updating the client resource file according to the latest resource file download address; wherein, the latest resource file download address is determined by the file address corresponding to the structured resource file; the structured resource file is obtained by integrating all resource files of the same resource type in the classification result; the classification result is obtained by classifying the resource files corresponding to the preset resource scenario.

[0107] The execution process and principle of S302 are the same as those of Figure 1 S102 - S107 in the above embodiment, which can be referred to and will not be elaborated here.

[0108] When the front end receives a resource acquisition requirement, it acquires the resource corresponding to the resource acquisition requirement from the local resource file address to complete the front - end resource query process. The specific front - end resource query process is described in combination with Figure 4 for illustration. Figure 4 shows a schematic diagram of front - end resource update.

[0109] Figure 4 In, the native side determines whether to perform a full - volume update;

[0110] If not, the server obtains the latest resource file download address according to the resource type;

[0111] If so, the server queries the resource file address list to obtain the latest resource file download addresses of all resource types;

[0112] The native side compares the latest resource file download address with the obtained local resource file address to determine whether the latest resource file download address is the same as the obtained local resource file address;

[0113] If the latest resource file download address is the same as the obtained local resource file address, the native side downloads the latest resource file from the latest resource file download address to complete the client resource file update operation according to the latest resource file download address.

[0114] If the latest resource file download address is not the same as the obtained local resource file address, the native side pulls the latest resource file from the object storage service, overwrites and updates the local resources, and updates the latest resource file address.

[0115] Among them, when the native side obtains the resource details, according to the content to be queried, it can obtain the details of a single resource from the local data according to the resource unique ID, or obtain the details of all resources of a certain type from the local database according to the resource type.

[0116] After the native side parses the detailed information of the downloaded resource, it maintains the data of the resource ID, resource type, and resource details in the resource table of the local database. After the native side can locate the resource data through the resource ID, it can obtain the resource details, and it can also obtain the detailed information of all resources of this type through the resource type.

[0117] The native side provides interfaces for other sides (such as H5, applets, etc.), including an interface for querying a single resource according to the ID and an interface for querying a resource list according to the resource type. Other sides can directly obtain the information of the required resources from the native side.

[0118] Among them, the interfaces include a single query interface getResourceById and a type query interface getResourceByType, etc. Other sides can obtain the corresponding resource detailed information by calling these two interfaces.

[0119] Specifically, the process of the native side obtaining the resource details is as Figure 5 shown. Figure 5 Shows a schematic diagram of obtaining front-end resource details.

[0120] Figure 5In it, 1. After the native side downloads the resource files, it organizes them into structured data and stores them in the local database, and each piece of data is identified by a unique resource ID (resource_id);

[0121] 2. When the front end (such as H5) needs to display the detailed information of a single resource in a certain scenario, it will first obtain the resource ID, which is usually dependent on being returned from the server side or fixed in the front-end code;

[0122] 3. The front end (such as H5) calls the interface provided by the native side and passes the resource ID as an interface request parameter to the native side;

[0123] 4. After the native side matches the corresponding resource information from the local database through the resource ID, it returns the structured data to the front end;

[0124] 5. The front end displays the returned structured data on the page;

[0125] Similarly, when displaying all the information of a certain column of resources, all resources of that type are matched through the resource type.

[0126] An example of the code for matching details according to the resource ID is as follows:

[0127] The matching process is an SQL query statement: select * from table where resource_id = XXXX.

[0128] Matching the resource details list according to the resource type means matching the same resource type from the resource details list, that is, obtaining it by executing the SQL query statement: select * from table where resource_type = XXXX.

[0129] Matching details according to the resource ID, that is, performing resource ID matching through the SQL query statement: select * from table where resource_id = XXXX.

[0130] Advantages of the embodiments of the present application: The server classifies different resource types such as level information, emoticons, materials, etc. For each type, the server organizes all resource files of the same resource type into independent structured resource files. When the resources are updated, the server only needs to notify the native side to update the corresponding client resource files according to the type to which the update object belongs, avoiding the overall update of all resource files. The client includes a front end and a native side. When the front end is developed using multiple technologies, unified resource management is implemented on the front end without the need for real-time distribution by the server, reducing the pressure on the server. And when managing resources that need to be used simultaneously by native functions and H5 functions, they are distributed once and used by multiple sides such as the front end and the native side. At the same time, a solution for classifying and obtaining resources is also provided, enabling various resources to be updated in a timely manner without the need for an application version release, but only through cloud configuration, so that the client can obtain the latest resources in a timely manner.

[0131] Based on the above embodiments Figure 1 A resource classification and processing method for multiple terminals disclosed, the embodiments of the present application also correspondingly disclose a resource classification and processing device for multiple terminals, as Figure 6 shown. The resource classification and processing device for multiple terminals includes:

[0132] A first acquisition unit 601, configured to acquire resource files corresponding to a preset resource scenario;

[0133] A classification unit 602, configured to classify the resource files to obtain a classification result;

[0134] An acquisition unit 603, configured to acquire all resource files of the same resource type in the classification result, integrate all resource files into a structured resource file, and upload it to the cloud service;

[0135] An integration unit 604, configured to obtain the file address corresponding to the structured resource file, and update the download address of the same resource type with the file address;

[0136] A determination unit 605, configured to determine the updated download address as the latest resource file download address;

[0137] A first update operation unit 606, configured to send the latest resource file download address to the native side in the client through the cloud service, so that the native side in the client performs a client resource file update operation through the latest resource file download address.

[0138] Further, the classification unit 602 is specifically configured to classify the resource files according to the resource function characteristics and the preset resource scenario to obtain a classification result; wherein, the classification at least includes assigning a unique resource ID and setting resource detailed information.

[0139] Further, the integration unit 604 includes:

[0140] A first acquisition module, configured to acquire the resource unique ID in the classification result, and query the resource classification in the classification result according to the resource unique ID;

[0141] A query module, configured to query all resource detailed information of the same type according to the resource classification, so as to complete the process of collecting all resource files of the same resource type in the classification result;

[0142] A serialization module, configured to serialize all resource detailed information of the same type into a JS key-value pair data object for all resource files of the same resource type;

[0143] A construction module, configured to construct the JS key-value pair data object into a file stream, so as to complete the process of integrating all resource files of the same resource type into a structured resource file, and upload the structured resource file to the cloud service.

[0144] The beneficial effects of the embodiments of the present application: The server classifies different resource types such as level information, emoticons, materials, etc. For each type, all resource files of the same resource type are sorted into independent structured resource files. When the resources are updated, only the corresponding resource files need to be updated according to the type to which the updated object belongs, avoiding updating all resource files as a whole. The front end includes the native end and the client end. When the front end is developed using multiple technologies, unified resource management is implemented at the front end without the need for real-time distribution by the server, reducing the pressure on the server. And when managing resources that need to use native functions and H5 functions at the same time, they are issued at one time and used by multiple terminals such as the native end and the client end. At the same time, a solution for classifying and obtaining resources is also provided, realizing that various resources can be updated in a timely manner only through cloud configuration without the need for application version release, so that the client can obtain the latest resources in a timely manner.

[0145] Based on the above embodiments Figure 3 Another resource classification processing method for multiple terminals disclosed, the embodiments of the present application also correspondingly disclose another resource classification processing device for multiple terminals, as Figure 7 shown, this resource classification processing device for multiple terminals is applied to the native end, and this resource classification processing device for multiple terminals includes:

[0146] The second update operation unit 701 is configured to perform a client resource file update operation according to the latest resource file download address when receiving the latest resource file download address sent by the server; wherein, the latest resource file download address is determined by the file address corresponding to the structured resource file; the structured resource file is obtained by the server integrating all resource files of the same resource type in the classification result; the classification result is obtained by the server classifying the resource files corresponding to the preset resource scenario.

[0147] Further, the second update operation unit 701 includes:

[0148] The second acquisition module is configured to acquire the local resource file address when receiving the latest resource file download address sent by the server;

[0149] The comparison module is configured to compare the local resource file address with the latest resource file download address;

[0150] The third acquisition module is configured to, if the local resource file address is inconsistent with the latest resource file download address, acquire the latest resource file from the object storage service to complete the client resource file update operation according to the latest resource file download address;

[0151] The download module is configured to, if the local resource file address is consistent with the latest resource file download address, download the latest resource file from the latest resource file download address to complete the client resource file update operation according to the latest resource file download address.

[0152] Further, the multi-terminal-oriented resource classification processing device further includes:

[0153] The acquisition unit is configured to, when receiving a resource acquisition requirement, perform a resource retrieval from the local resource file address according to the resource acquisition requirement to obtain the resource corresponding to the resource acquisition requirement.

[0154] Advantages of the embodiments of the present application: The server classifies different resource types such as level information, emoticons, materials, etc. For each type, the server organizes all resource files of the same resource type into independent structured resource files. When resources are updated, the server only needs to notify the native side to update the corresponding client resource files according to the type to which the update object belongs, avoiding the overall update of all resource files. The client includes a front end and a native side. When the front end is developed using multiple technologies, unified resource management is implemented on the front end without the need for real-time distribution from the server, reducing the pressure on the server. And when managing resources that need to be used by both native functions and H5 functions at the same time, a single distribution is realized for multi-terminal use by the front end and the native side, etc. At the same time, a solution for obtaining resources by classification is also provided, enabling various resources to be updated in a timely manner through cloud configuration without the need for an application version release, so that the client can obtain the latest resources in a timely manner.

[0155] The embodiments of the present application further provide a storage medium, and the storage medium includes stored instructions, wherein when the instructions run, the device where the storage medium is located is controlled to execute the multi-terminal-oriented resource classification processing method as described above.

[0156] The embodiments of the present application further provide an electronic device, and its structural schematic diagram is as Figure 8 shown, specifically including a memory 801, and one or more instructions 802, wherein one or more instructions 802 are stored in the memory 801 and are configured to be executed by one or more processors 803 to execute the one or more instructions 802 to execute the multi-terminal-oriented resource classification processing method as described above.

[0157] For the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.

[0158] It should be noted that the embodiments in this specification are all described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the embodiments can be referred to each other. For system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiments.

[0159] The steps in the methods of the embodiments of the present application can be adjusted, combined, and deleted according to actual needs.

[0160] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.

[0161] The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0162] The above are only the preferred embodiments of the present application. It should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.

Claims

1. A multi-terminal resource classification processing method, characterized in that: The method is applied to the server, and the method includes: Get the resource file corresponding to the preset resource scene; Classifying the resource files to obtain classification results; Collect all resource files of the same resource type in the classification results, integrate all resource files into a structured resource file and upload it to the cloud service; Obtaining a file address corresponding to the structured resource file, and updating the file address with a download address of the same resource type; Determine the updated download address as the latest resource file download address; The latest resource file download address is sent to the native end in the client through the cloud service, so that the native end in the client performs a client resource file update operation through the latest resource file download address.

2. The method according to claim 1, characterized in that The classifying the resource files to obtain the classification results includes: According to the resource function characteristics and the preset resource scenario, the resource files are classified to obtain classification results; wherein the classification at least includes allocating a resource unique ID and setting resource detailed information.

3. The method according to claim 1, characterized in that Collecting all resource files of the same resource type in the classification results, integrating all resource files into a structured resource file and uploading it to the cloud service, includes: Obtaining a resource unique ID in the classification result, and querying the resource classification in the classification result according to the resource unique ID; Querying detailed information of all resources of the same type according to the resource classification to complete the process of collecting all resource files of the same resource type in the classification result; For all resource files of the same resource type, serialize all resource details of the same type into JS key-value pair data objects; The JS key-value pair data object is constructed as a file stream to complete the process of integrating all resource files of the same resource type into a structured resource file, and the structured resource file is uploaded to the cloud service.

4. A multi-terminal resource classification processing method, characterized in that: The method is applied to the native end, and the method includes: When receiving the latest resource file download address sent by the server, performing a client resource file update operation according to the latest resource file download address; Among them, the latest resource file download address is determined by the file address corresponding to the structured resource file; the structured resource file is obtained by the server integrating all resource files of the same resource type in the classification result; the classification result is obtained by the server classifying the resource files corresponding to the preset resource scenario.

5. The method according to claim 4, characterized in that When receiving the latest resource file download address sent by the server, performing a client resource file update operation according to the latest resource file download address, including: When receiving the latest resource file download address sent by the server, obtain the local resource file address; Compare the local resource file address with the latest resource file download address; If the local resource file address is inconsistent with the latest resource file download address, obtain the latest resource file from the object storage service to complete the client resource file update operation according to the latest resource file download address; If the local resource file address is consistent with the latest resource file download address, the latest resource file is downloaded from the latest resource file download address to complete the client resource file update operation according to the latest resource file download address.

6. The method according to claim 4, characterized in that Also includes: When a resource acquisition requirement is received, a resource search is performed from a local resource file address according to the resource acquisition requirement to obtain a resource corresponding to the resource acquisition requirement.

7. A multi-terminal resource classification processing device, characterized in that: The device is applied to a server, and the method includes: A first acquisition unit, used to acquire a resource file corresponding to a preset resource scenario; A classification unit, used to classify the resource files and obtain classification results; An integration unit, used to collect all resource files of the same resource type in the classification results, integrate all the resource files into a structured resource file and upload it to the cloud service; A second acquisition unit is used to acquire a file address corresponding to the structured resource file, and update the file address to a download address of the same resource type; A determination unit, used to determine the updated download address as the latest resource file download address; The update operation unit is used to send the latest resource file download address to the native end in the client through the cloud service, so that the native end in the client performs the client resource file update operation through the latest resource file download address.

8. A multi-terminal resource classification processing device, characterized in that: The device is applied to a native end, and the device includes: The second operation unit is used to perform a client resource file update operation according to the latest resource file download address when receiving the latest resource file download address sent by the server; wherein the latest resource file download address is determined by the file address corresponding to the structured resource file; the structured resource file is obtained by the server integrating all resource files of the same resource type in the classification result; the classification result is obtained by the server classifying the resource files corresponding to the preset resource scenario.

9. A storage medium, characterized in that: The storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the multi-terminal resource classification processing method as described in any one of claims 1 to 6.

10. An electronic device, characterized in that: It comprises a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the multi-terminal resource classification processing method as described in any one of claims 1 to 6.