Resource management method and device, storage medium and electronic equipment
By using a matching, storage, and replacement mechanism for resource identifiers and scene identifiers, the problems of cumbersome operations and fragmented permissions in resource management are solved, achieving efficient and secure resource management.
Patent Information
- Application Number
- CN202410431043.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-10
- Publication Date
- 2025-10-17
AI Technical Summary
Resource management suffers from cumbersome operations and fragmented permissions, leading to low management efficiency. In particular, resource replacement requires traversing multiple permission levels, increasing management complexity.
By acquiring resource identifiers and scene identifiers from resource data, storing them in a designated database, and replacing them when the similarity between identifiers and scene identifiers reaches a threshold, the accuracy and security of access control are ensured, and lengthy operations are avoided.
It achieves high efficiency and accuracy in resource management, ensures strict division of permissions, avoids unauthorized or excessive operations, and improves resource management efficiency.
Smart Images

Figure CN120803683A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of computers, in particular to a resource management method and device, a storage medium and an electronic device. BACKGROUND
[0002] In the resource management scenario, resource replacement often needs to be performed through lengthy operations such as refreshing resources. These operations not only consume time, but also may involve multiple steps and links, increasing the complexity of resource management.
[0003] Furthermore, the managed resources may belong to different permission levels. The dispersion of such permissions leads to management barriers, making the management personnel need to cross multiple permission levels when performing resource replacement, further reducing the efficiency of resource management.
[0004] That is, the related art has obvious deficiencies in resource management efficiency. Such deficiencies not only exist in the lengthy operations in the resource replacement process, but also exist in the management barriers caused by the dispersion of permissions. These problems together lead to a reduction in the efficiency of resource management. Therefore, there is a problem of low resource management efficiency.
[0005] In view of the above problems, no effective solutions have been proposed so far. SUMMARY
[0006] Embodiments of the present application provide a resource management method, device, storage medium and electronic device to at least solve the technical problem of low resource management efficiency.
[0007] According to an aspect of the embodiments of the present application, a resource management method is provided, comprising: in response to a resource management request triggered by first resource data, obtaining a first resource identifier corresponding to the first resource data and a first scenario identifier corresponding to the first resource data, wherein the first resource identifier is used to indicate a resource identifier to which the first resource data belongs, the first scenario identifier is used to indicate a service scenario to which the first resource data belongs, and different service scenarios correspond to different resource management permissions; storing the first resource data into a specified database according to the first resource identifier and the first scenario identifier, wherein the specified database is a database matched with the first scenario identifier, data in the specified database is set to be allowed to be managed by an instruction with a specified management permission, and the specified management permission is a resource management permission corresponding to a service scenario indicated by the first scenario identifier; in response to a resource management request triggered by second resource data, obtaining a second resource identifier corresponding to the second resource data and a second scenario identifier corresponding to the second resource data, wherein the second resource identifier is used to indicate a resource identifier to which the second resource data belongs, and the second scenario identifier is used to indicate a service scenario to which the second resource data belongs; and in a case where a similarity between the first resource identifier and the second resource identifier is greater than or equal to a first preset threshold value, and a similarity between the first scenario identifier and the second scenario identifier is greater than or equal to a second preset threshold value, replacing the first resource data in the specified database with the second resource data.
[0008] According to another aspect of the embodiments of the present application, a resource management apparatus is further provided, comprising: a first obtaining unit, configured to obtain a first resource identifier corresponding to first resource data and a first scenario identifier corresponding to the first resource data in response to a resource management request triggered by the first resource data, wherein the first resource identifier is used to indicate a resource identifier to which the first resource data belongs, and the first scenario identifier is used to indicate a service scenario to which the first resource data belongs, and different service scenarios correspond to different resource management permissions; a first management unit, configured to store the first resource data into a specified database according to the first resource identifier and the first scenario identifier, wherein the specified database is a database matched with the first scenario identifier, data in the specified database is set to be allowed to be managed by an instruction with a specified management permission, and the specified management permission is a resource management permission corresponding to the service scenario indicated by the first scenario identifier; a second obtaining unit, configured to obtain a second resource identifier corresponding to second resource data and a second scenario identifier corresponding to the second resource data in response to a resource management request triggered by the second resource data, wherein the second resource identifier is used to indicate a resource identifier to which the second resource data belongs, and the second scenario identifier is used to indicate a service scenario to which the second resource data belongs; and a second management unit, configured to replace the first resource data in the specified database with the second resource data when an identifier similarity between the first resource identifier and the second resource identifier is greater than or equal to a first preset threshold value and an identifier similarity between the first scenario identifier and the second scenario identifier is greater than or equal to a second preset threshold value.
[0009] As an optional solution, the apparatus further comprises a first encryption unit, configured to encrypt a specified resource locator by using the first resource identifier, the first scenario identifier and a content hash value corresponding to the first resource data after the first resource data is stored into the specified database according to the first resource identifier and the first scenario identifier, wherein the specified resource locator is used to locate a storage position of specified resource data, and the specified resource data belongs to the service scenario indicated by the first resource identifier and the first scenario identifier.
[0010] As an optional solution, the apparatus further comprises a second encryption unit, configured to update encrypted data of the specified resource locator by using the second resource identifier, the second scenario identifier and a content hash value corresponding to the second resource data after the first resource data in the specified database is replaced with the second resource data.
[0011] As an optional solution, the apparatus further comprises a processing unit configured to, before storing the first resource data into the specified database according to the first resource identifier and the first scene identifier, pre-process the first resource data according to a processing manner corresponding to a specified service scene to obtain pre-processed first resource data, wherein the specified service scene is a service scene corresponding to the first scene identifier; and the first management unit comprises a first management module configured to store the pre-processed first resource data into the specified database according to the first resource identifier and the first scene identifier.
[0012] As an optional solution, the first management unit comprises a second management module configured to, in a case where a remaining storage space of the specified database is greater than a safe data amount, store the first resource data into the specified database by using a lossless compression manner, wherein the safe data amount is in a positive correlation with a data amount of the first resource data, and the pre-processing comprises the lossless compression manner; and a third management module configured to, in a case where the remaining storage space of the specified database is less than or equal to the safe data amount, display a storage prompt information, wherein the storage prompt information is used to prompt to store the first resource data into the specified database by using a lossy compression manner, and the pre-processing comprises the lossy compression manner.
[0013] As an optional solution, the apparatus further comprises a third acquisition unit configured to, before storing the first resource data into the specified database according to the first resource identifier and the first scene identifier, acquire a maximum resource number allowed to be stored in the specified database and a current resource number stored in the specified database; and the first management unit comprises a fourth management module configured to, in a case where the current resource number is less than the maximum resource number, store the first resource data into the specified database according to the first resource identifier and the first scene identifier.
[0014] As an optional solution, the first management unit comprises a first storage module configured to store the first resource data into a hot data bucket in the specified database, wherein the hot data bucket is configured to store resource data that is more frequently used or updated in the specified database; the apparatus further comprises a second storage module configured to, after storing the first resource data into the specified database, in a case that the first resource data is in an idle state for a time duration greater than or equal to a preset time duration, store the first resource data into a cold data bucket in the specified database, wherein the cold data bucket is configured to store resource data that is less frequently used or updated in the specified database; and the second management unit comprises a third storage module configured to replace the first resource data in the cold data bucket with the second resource data, and store the second resource data into the hot data bucket.
[0015] According to yet another aspect of embodiments of the present application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the electronic device to perform the above resource management method.
[0016] According to yet another aspect of embodiments of the present application, an electronic device is also provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor performs the above resource management method through the computer program.
[0017] In the embodiment of the present application, in response to a resource management request triggered for first resource data, a first resource identifier corresponding to the first resource data and a first scenario identifier corresponding to the first resource data are acquired, wherein the first resource identifier is used to indicate a resource identifier to which the first resource data belongs, and the first scenario identifier is used to indicate a business scenario to which the first resource data belongs, different business scenarios correspond to different resource management permissions; the first resource data is stored in a specified database according to the first resource identifier and the first scenario identifier, wherein the specified database is a database matched with the first scenario identifier, data in the specified database is set to be managed by an instruction with a specified management permission, and the specified management permission is a resource management permission corresponding to a business scenario indicated by the first scenario identifier; in response to a resource management request triggered for second resource data, a second resource identifier corresponding to the second resource data and a second scenario identifier corresponding to the second resource data are acquired, wherein the second resource identifier is used to indicate a resource identifier to which the second resource data belongs, and the second scenario identifier is used to indicate a business scenario to which the second resource data belongs; in a case where an identifier similarity between the first resource identifier and the second resource identifier is greater than or equal to a first preset threshold, and an identifier similarity between the first scenario identifier and the second scenario identifier is greater than or equal to a second preset threshold, the first resource data in the specified database is replaced by the second resource data.
[0018] When a resource management request for first resource data is triggered, the embodiment acquires a first resource identifier and a first scenario identifier corresponding to the resource data. The two identifiers are respectively used to indicate the attribution of the resource data and the business scenario to which the resource data belongs. Different business scenarios correspond to different resource management permissions, ensuring strict division of permissions and accuracy of management.
[0019] Further, according to the acquired first resource identifier and first scenario identifier, the system stores the first resource data in a specified database. The specified database is a database matched with the first scenario identifier, and data in the specified database is only allowed to be managed by an instruction with a specified management permission. This permission setting effectively avoids unauthorized or overstepping operation, and guarantees the security of resource data.
[0020] When second resource data needs to be managed, the embodiment also acquires a second resource identifier and a second scenario identifier corresponding to the second resource data. Then, the embodiment compares the similarity between the first resource identifier and the second resource identifier, and the similarity between the first scenario identifier and the second scenario identifier. Only in a case where both similarities are greater than or equal to a preset threshold, the first resource data in the specified database is replaced by the second resource data.
[0021] The replacement mechanism not only avoids lengthy refreshing operations, but also ensures the accuracy and rationality of the replacement through the similarity comparison. Meanwhile, since the replacement operation is performed in the database with corresponding management authority, it is unnecessary to cross multiple authority levels, thereby achieving the purpose of ensuring the strict division and management precision of the authority and avoiding lengthy operations in the resource replacement process, thereby realizing the technical effect of improving the resource management efficiency, and further solving the technical problem of low resource management efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0022] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and serve to explain the principles of the application, and do not limit the application. In the drawings:
[0023] Figure 1 is a schematic diagram of an application environment of an optional resource management method according to an embodiment of the application;
[0024] Figure 2 is a schematic diagram of a flow of an optional resource management method according to an embodiment of the application;
[0025] Figure 3 is a schematic diagram of an optional resource management method according to an embodiment of the application;
[0026] Figure 4 is a schematic diagram of another optional resource management method according to an embodiment of the application;
[0027] Figure 5 is a schematic diagram of another optional resource management method according to an embodiment of the application;
[0028] Figure 6 is a schematic diagram of another optional resource management method according to an embodiment of the application;
[0029] Figure 7 is a schematic diagram of another optional resource management method according to an embodiment of the application;
[0030] Figure 8 is a schematic diagram of another optional resource management method according to an embodiment of the application;
[0031] Figure 9 is a schematic diagram of another optional resource management method according to an embodiment of the application;
[0032] Figure 10 is a schematic diagram of an optional resource management device according to an embodiment of the application;
[0033] Figure 11is a structural schematic diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0034] In order to enable persons skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the 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. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative work should fall within the scope of protection of the present application.
[0035] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to the process, method, product or device.
[0036] According to an aspect of an embodiment of the present application, a resource management method is provided. Optionally, as an optional implementation, the above-mentioned resource management method can be applied in an environment as shown in Figure 1 , but is not limited thereto. Wherein, the environment can include, but is not limited to, a user device 102 and a server 112, the user device 102 can include, but is not limited to, a display 104, a processor 106 and a memory 108, and the server 112 includes a database 114 and a processing engine 116.
[0037] The specific process can be as follows:
[0038] Step S102, the user device 102 acquires a resource management request;
[0039] Step S104, the resource management request is sent to the server 112 through the network 110;
[0040] Steps S106-S108, the server 112 responds to the resource management request, acquires the resource identifier and the scene identifier of the to-be-managed resource from the database 114, and further stores the to-be-managed resource into the corresponding database according to the resource identifier and the scene identifier through the processing engine 116, to obtain a resource management result;
[0041] In step S110 , the resource management result is sent to the user device 102 via the network 110 . The user device 102 displays the resource management result on the display 104 via the processor 106 and stores the resource management result in the memory 108 .
[0042] remove Figure 1 In addition to the examples shown, the above-mentioned terminal device can be a terminal device configured with a target client, which can include but is not limited to at least one of the following: a mobile phone (such as an Android phone, an iOS phone, etc.), a laptop computer, a tablet computer, a PDA, an MID (Mobile Internet Devices), a PAD, a desktop computer, a smart TV, etc. The target client can be a video client, an instant messaging client, a browser client, an education client, etc. The above-mentioned network can include but is not limited to: a wired network, a wireless network, wherein the wired network includes: a local area network, a metropolitan area network and a wide area network, and the wireless network includes: Bluetooth, WIFI and other networks that realize wireless communication. The above-mentioned server can be a single server, or it can be a server cluster composed of multiple servers, or a cloud server. The above is only an example, and no limitation is made to this in this embodiment.
[0043] Alternatively, as an optional implementation, as Figure 2 As shown, the resource management method can be executed by an electronic device, which can be, for example, Figure 1 The user device or server shown in the figure includes the following steps:
[0044] S202: In response to a resource management request triggered by first resource data, obtain a first resource identifier corresponding to the first resource data and a first scenario identifier corresponding to the first resource data, wherein the first resource identifier is used to indicate a resource identifier to which the first resource data belongs, and the first scenario identifier is used to indicate a business scenario to which the first resource data belongs, and different business scenarios correspond to different resource management permissions;
[0045] S204: storing the first resource data in a designated database according to the first resource identifier and the first scenario identifier, wherein the designated database is a database that matches the first scenario identifier, and the data in the designated database is set to allow management by instructions with designated management authority, where the designated management authority is the resource management authority corresponding to the business scenario indicated by the first scenario identifier;
[0046] S206, in response to the resource management request triggered by the second resource data, obtaining a second resource identifier corresponding to the second resource data and a second scenario identifier corresponding to the second resource data, wherein the second resource identifier is used to indicate a resource identifier to which the second resource data belongs, and the second scenario identifier is used to indicate a business scenario to which the second resource data belongs;
[0047] S208, in the case that the identity similarity between the first resource identifier and the second resource identifier is greater than or equal to a first preset threshold, and the identity similarity between the first scene identifier and the second scene identifier is greater than or equal to a second preset threshold, replacing the first resource data in the designated database with the second resource data.
[0048] Optionally, in the present embodiment, the above-mentioned resource management method can be applied in, but is not limited to, the resource management scenario of a content delivery network (CDN). A large amount of content resources, including web pages, pictures, videos, and other static and dynamic data, are stored in a CDN network. These resources are distributed in various nodes of the CDN according to different business scenarios and requirements.
[0049] By applying the above-mentioned resource management method, the CDN system can automatically allocate a unique resource identifier and a scene identifier to each resource. The resource identifier is used to identify the uniqueness of the resource, while the scene identifier is used to indicate the business scenario to which the resource belongs, such as video streaming media, e-commerce, online games, etc.
[0050] When the CDN system receives a data management request for a certain resource, it will first locate the designated database that stores the resource according to the resource identifier and the scene identifier. This database is matched according to the scene identifier, so the data in it is only allowed to be managed by instructions with corresponding business scenario management authority. This mechanism ensures that only authorized management personnel can operate resources in a specific business scenario, greatly enhancing the security of resource management.
[0051] In the CDN scenario, resource replacement is a common operation. When a resource needs to be updated or replaced, the CDN system compares the similarity of the resource identifier and the scene identifier between the new resource (second resource data) and the old resource (first resource data). Only when the similarity reaches the preset threshold, the system will perform the replacement operation. This replacement mechanism based on the similarity of the identifier avoids unnecessary refreshing operations and ensures the accuracy of the replacement.
[0052] In addition, due to the distributed nature of the CDN network, resource data may be distributed in different nodes and databases. By applying the above-mentioned resource management method, the CDN system can realize cross-node resource management, ensuring data synchronization and consistency between different nodes. At the same time, the system can also dynamically adjust the distribution strategy of resources according to the load situation and network status of the nodes, improving the performance and stability of the CDN network.
[0053] In addition to being applied in CDN resource management scenarios, the above resource management method can also be applied in cloud resource management, big data resource management, Internet of Things device management, and other scenarios, but is not limited to these. For example, in a cloud computing environment, the above resource management method can be used to manage cloud resources such as virtual machines, containers, and storage volumes. Through resource identification and scenario identification, precise control and on-demand allocation of cloud resources can be achieved, improving resource utilization and management efficiency. In big data processing and analysis scenarios, the above resource management method can be used to manage massive data resources such as distributed file systems and data warehouses. Through resource identification and scenario identification, effective organization, storage, and access control of data resources can be achieved, ensuring data security and consistency.
[0054] Optionally, in this embodiment, the first resource data can refer to a specific resource in the system that needs to be managed, and can be any form of data such as a file, a database record, or a network service.
[0055] Optionally, in this embodiment, the first resource identifier can be a unique identifier used to distinguish and locate the specific location or attributes of the first resource data in the system.
[0056] Optionally, in this embodiment, the first scenario identifier can be used to identify a specific business scenario or application environment to which the first resource data belongs, and can be associated with specific business logic, management policies, or security requirements.
[0057] Optionally, in this embodiment, the resource management permission can refer to the permission to perform various operations (such as reading, modifying, deleting, etc.) on resources in a specific business scenario. Different business scenarios have different permission settings due to different needs and security levels.
[0058] Specifically, after receiving a management request for a certain resource (first resource data), this embodiment first obtains two key identifiers corresponding to the resource: the resource identifier and the scenario identifier. The resource identifier is used to uniquely determine the identity of the resource in the system, while the scenario identifier is used to indicate the business category or application environment to which the resource belongs. Different business scenarios may have different resource management needs and security levels, so they will correspond to different management permissions.
[0059] Further, for example, assume that there are a large number of video files stored and managed as resource data in an online video platform. Each video file has a unique resource identifier, such as a video ID. At the same time, these videos can belong to different business scenarios, such as "premium member area videos", "free public course videos", and the like. When the system receives a request to manage a certain video (such as updating video information), it first looks up the resource identifier (video ID) corresponding to the video, and then determines which business scenario it belongs to (such as "premium member area videos"). Next, the system determines whether the request is legal according to the management permissions corresponding to the business scenario, and executes the corresponding management operation.
[0060] By introducing resource identifiers and scenario identifiers, and combining resource management permissions in different business scenarios, more refined and flexible resource management can be achieved. Not only can the accurate positioning and fast access of resources in the system be ensured, but also targeted management strategies can be implemented according to the needs and security levels of business scenarios. This not only improves the efficiency of resource management, but also effectively protects the security and integrity of resources, preventing unauthorized access and modification.
[0061] Optionally, in this embodiment, the specified database can be a database matched and selected according to the first scenario identifier, for storing and managing resource data associated with the scenario identifier.
[0062] Optionally, in this embodiment, the specified management permissions can be resource management permissions corresponding to the business scenario indicated by the first scenario identifier, which determine which operations can be performed on the data in the specified database.
[0063] Specifically, according to the obtained first resource identifier and first scenario identifier, the first resource data is stored in the specified database matching the scenario identifier of the first resource data. Moreover, the data in this specified database can only be managed and operated by instructions with specific management permissions, which correspond to the business scenario indicated by the first scenario identifier.
[0064] Further, for example, assume that there are a large number of video files stored and managed as resource data in an online video platform. Each video file has a unique resource identifier, such as a video ID. At the same time, these videos can belong to different business scenarios, such as "premium member area videos", "free public course videos", and the like. When the system receives a request to manage a certain video (such as updating video information), it first looks up the resource identifier (video ID) corresponding to the video, and then determines which business scenario it belongs to (such as "premium member area videos"). Next, the system determines whether the request is legal according to the management permissions corresponding to the business scenario, and executes the corresponding management operation.
[0065] By storing resource data into a designated database matching the scene identification and limiting only instructions with specific management permissions can manage these data, it can ensure that the storage and access of resource data meet the needs and security requirements of business scenarios. This not only can improve the pertinence and efficiency of resource management, but also can effectively protect the security and integrity of resource data, prevent unauthorized access and operation. At the same time, it is also helpful to realize the fine-grained management and control of resources, and provides strong support for the business development and operation of enterprises.
[0066] Optionally, in the present embodiment, the second resource data can refer to another resource that needs to be managed in the present embodiment, which can be data of different types or the same type as the first resource data.
[0067] Optionally, in the present embodiment, the second resource identification can be a unique identifier used to distinguish and locate the specific location or attribute of the second resource data in the system.
[0068] Optionally, in the present embodiment, the second scene identification can be used to identify the specific business scenario or application environment to which the second resource data belongs, which determines the management and use of resources in the system.
[0069] Specifically, when the present embodiment receives a management request for another resource (second resource data), it will take similar processing steps as the first resource data. Specifically, the present embodiment will obtain the resource identification (second resource identification) and scene identification (second scene identification) corresponding to the second resource data. These two identifiers are used to determine the unique identity of the resource in the system and the business scenario to which the resource belongs.
[0070] Further illustration, optionally, assume that an online education platform needs to manage course videos. When the administrator requests to update a specific course video (second resource data), the system will first obtain the second resource identification (such as video ID) and the second scene identification (such as "paid course" or "free public class") of the video. These identification information will be used for subsequent resource positioning and management operations.
[0071] By responding to resource management requests and obtaining the resource identification and scene identification of the second resource data, the present embodiment can accurately locate the resource that needs to be managed, and take appropriate management strategies according to the business scenario to which it belongs. This identification-based resource management method can improve the accuracy and flexibility of management, and also helps to protect the security and integrity of resources. In addition, by continuously optimizing the identification design and management strategy, enterprises can better meet the business needs, improve user experience and operational efficiency.
[0072] Optionally, in this embodiment, the similarity identification can be used to quantify the degree of similarity between two resource identifiers or scene identifiers, calculated by a specific algorithm.
[0073] Optionally, in this embodiment, the first preset threshold can be understood as a standard value set in advance, used to determine whether the similarity between the first resource identifier and the second resource identifier is high enough to perform a replacement operation.
[0074] Optionally, in this embodiment, the second preset threshold can be understood as another standard value set in advance, used to determine whether the similarity between the first scene identifier and the second scene identifier is high enough to perform a replacement operation.
[0075] Specifically, when comparing the resource identifiers of the first resource data and the second resource data, this embodiment finds that the similarity between them reaches or exceeds a preset standard (the first preset threshold), and the similarity between the scene identifiers to which they belong also reaches or exceeds another preset standard (the second preset threshold). This embodiment will perform a replacement operation: replacing the first resource data stored in the designated database with the second resource data.
[0076] For further illustration, optionally, assume that a news website has two news article resources, created by different editors but with highly similar content. These two news articles have different resource identifiers (such as article IDs), but their titles, abstracts, or body content may be very similar. When the system detects that the similarity between the two resource identifiers exceeds the first preset threshold (such as 90% text similarity), and they both belong to the "current affairs news" scene identifier (the similarity between them is naturally 100% because they are identical), the system may decide to replace the old article (first resource data) with the latest article (second resource data) to avoid duplicate content.
[0077] By comparing the similarity of resource identifiers and scene identifiers and performing a replacement operation when certain conditions are met, automatic updating and optimization of resources can be achieved. It can ensure that the resource data in the system remains up-to-date and consistent, while reducing duplicate and redundant content. This has a positive significance for improving the efficiency of resource management.
[0078] It should be noted that when a resource management request for the first resource data is triggered, this embodiment will obtain the first resource identifier and the first scene identifier corresponding to the resource data. These two identifiers are used to indicate the ownership and belonging of the resource data to the business scene. Different business scenes correspond to different resource management permissions, ensuring strict division of permissions and precision of management.
[0079] Further, according to the acquired first resource identifier and first scene identifier, the system stores the first resource data into a specified database in the embodiment. The specified database is a database matched with the first scene identifier, and the data in the database is only allowed to be managed by an instruction with specified management authority. The authority setting effectively avoids the occurrence of unauthorized or unauthorized operation, and guarantees the security of the resource data.
[0080] When the second resource data needs to be managed, the embodiment will also acquire the corresponding second resource identifier and second scene identifier. Then, the embodiment will compare the similarity between the first resource identifier and the second resource identifier, and the similarity between the first scene identifier and the second scene identifier. Only when both similarities are greater than or equal to a preset threshold, the embodiment will replace the first resource data in the specified database with the second resource data.
[0081] The replacement mechanism not only avoids lengthy refreshing operation, but also ensures the accuracy and reasonableness of replacement through similarity comparison. At the same time, since the replacement operation is carried out in the database with corresponding management authority, it is not necessary to cross multiple authority levels, thereby realizing the technical effect of improving resource management efficiency.
[0082] Further, for example, the optional Figure 3As shown, in response to a resource management request triggered by the first resource data 302, a first resource identifier 304 corresponding to the first resource data 302 and a first scene identifier 306 corresponding to the first resource data 302 are acquired, wherein the first resource identifier 304 is used to indicate a resource identifier to which the first resource data 302 belongs, and the first scene identifier 306 is used to indicate a service scene to which the first resource data 302 belongs, different service scenes correspond to different resource management permissions; according to the first resource identifier 304 and the first scene identifier 306, the first resource data 302 is stored in a specified database 308, wherein the specified database 308 is a database matched with the first scene identifier 306, and the data in the specified database 308 is set to be allowed to be managed by an instruction with a specified management permission, and the specified management permission is a resource management permission corresponding to the service scene indicated by the first scene identifier 306; in response to a resource management request triggered by the second resource data 310, a second resource identifier 312 corresponding to the second resource data 310 and a second scene identifier 314 corresponding to the second resource data 310 are acquired, wherein the second resource identifier 312 is used to indicate a resource identifier to which the second resource data 310 belongs, and the second scene identifier 314 is used to indicate a service scene to which the second resource data 310 belongs; in a case where the similarity between the first resource identifier 304 and the second resource identifier 312 is greater than or equal to a first preset threshold, and the similarity between the first scene identifier 306 and the second scene identifier 314 is greater than or equal to a second preset threshold, the first resource data 302 in the specified database 308 is replaced by the second resource data 310.
[0083] According to the embodiments provided in the present application, in response to a resource management request triggered by the first resource data, a first resource identifier corresponding to the first resource data and a first scene identifier corresponding to the first resource data are obtained, wherein the first resource identifier is used to indicate a resource identifier to which the first resource data belongs, and the first scene identifier is used to indicate a business scene to which the first resource data belongs, different business scenes correspond to different resource management permissions; the first resource data is stored in a specified database according to the first resource identifier and the first scene identifier, wherein the specified database is a database matched with the first scene identifier, data in the specified database is set to be managed by an instruction with a specified management permission, and the specified management permission is a resource management permission corresponding to the business scene indicated by the first scene identifier; in response to a resource management request triggered by the second resource data, a second resource identifier corresponding to the second resource data and a second scene identifier corresponding to the second resource data are obtained, wherein the second resource identifier is used to indicate a resource identifier to which the second resource data belongs, and the second scene identifier is used to indicate a business scene to which the second resource data belongs; in a case where an identifier similarity between the first resource identifier and the second resource identifier is greater than or equal to a first preset threshold, and an identifier similarity between the first scene identifier and the second scene identifier is greater than or equal to a second preset threshold, the first resource data in the specified database is replaced by the second resource data, thereby achieving the purposes of ensuring strict division and management accuracy of permissions and avoiding lengthy operations in the resource replacement process, so as to realize the technical effect of improving resource management efficiency.
[0084] As an optional solution, after the first resource data is stored in the specified database according to the first resource identifier and the first scene identifier, the method further includes:
[0085] The specified resource locator is encrypted by using the first resource identifier, the first scene identifier, and a content hash value corresponding to the first resource data, wherein the specified resource locator is used to locate a storage position of the specified resource data, the specified resource data belongs to the business scene indicated by the first resource identifier and the first scene identifier.
[0086] Optionally, in the present embodiment, the content hash value can be a unique identifier calculated based on the content of the first resource data, which is used to ensure the integrity and authenticity of the data. By comparing the hash value of the original data and the hash value of the stored data, it can be detected whether the data is tampered.
[0087] Optionally, in the present embodiment, the specified resource locator can be an identifier used to uniquely identify and locate the position of the specific resource data in the storage system, which can be a uniform resource locator (URL), a file path or other forms of identifiers.
[0088] It should be noted that after storing the first resource data into the specified database, the embodiment further adds a step of encrypting the specified resource locator using the first resource identifier, the first scene identifier, and the content hash value corresponding to the first resource data. The specified resource locator here is used to locate the specific location of the specified resource data in the storage system. Through this encryption step, the security of the resource data can be increased to prevent unauthorized access and tampering.
[0089] Further, for example, it is assumed that there is an e-commerce platform that needs to store product pictures as resource data on a server. Each product picture has a unique resource identifier and scene identifier (for example, a "clothing" scene). When a new product picture (first resource data) is uploaded and stored in the specified database, the embodiment will encrypt the specified resource locator (such as the URL of the picture) using the resource identifier, scene identifier, and calculated content hash value of the picture. In this way, even if someone knows the resource locator of the picture, they cannot directly access or tamper with the picture data without the correct decryption method.
[0090] Through the embodiments provided by the present application, the first resource identifier, the first scene identifier, and the content hash value are used to encrypt the specified resource locator, which can greatly improve the security of the resource data. It not only prevents unauthorized access and tampering, but also ensures the integrity and authenticity of the data. At the same time, this encryption method also provides a more flexible and controllable resource data access mechanism, only users with the correct decryption capability can access the corresponding resource data, thereby improving the security of the resource.
[0091] As an optional solution, after replacing the first resource data in the specified database with the second resource data, the method further includes:
[0092] Updating the encrypted data of the specified resource locator using the second resource identifier, the second scene identifier, and the content hash value corresponding to the second resource data.
[0093] Optionally, in the embodiment, the content hash value can be a unique identifier calculated based on the content of the resource data, used to verify the integrity and authenticity of the data.
[0094] Optionally, in the embodiment, the encrypted data of the specified resource locator can be data obtained by encrypting the resource identifier, the scene identifier, and the content hash value, used to protect the security of the resource locator and prevent unauthorized access.
[0095] For example, the specified resource locator is encrypted by using the first resource identifier, the first scene identifier, and the content hash value corresponding to the first resource data. Then, the encrypted data is updated by using the second resource identifier, the second scene identifier, and the content hash value corresponding to the second resource data.
[0096] It should be noted that after the operation of replacing the first resource data in the specified database with the second resource data is completed, the embodiment further includes a step of updating the encrypted data of the existing specified resource locator by using the second resource identifier, the second scene identifier, and the content hash value corresponding to the second resource data. This means that as the resource data is updated, the encrypted data of the corresponding resource locator is also updated synchronously, ensuring that the encrypted data always keeps consistent with the latest resource data.
[0097] For further illustration, it is assumed that an online education platform updates the video resource (second resource data) of a course. After the original video (first resource data) is replaced by the new video, the platform updates the encrypted data of the video link (specified resource locator) of the course by using the resource identifier (second resource identifier) of the new video, the scene identifier (for example, "paid course video"), and the content hash value of the new video. In this way, even if the link is leaked, it cannot be directly accessed to the new video resource without the correct decryption method.
[0098] Through the embodiments provided in the present application, the encrypted data of the resource locator is updated synchronously when the resource data is updated. This not only protects the security of the resource data and prevents unauthorized access and tampering, but also improves the flexibility and reliability of resource management. Even if the resource data changes, the new resource can be accurately located through the updated encrypted data, ensuring that users can access the latest and most accurate resource content.
[0099] As an optional solution, before storing the first resource data into the specified database according to the first resource identifier and the first scene identifier, the method further includes: preprocessing the first resource data according to a processing mode corresponding to a specified business scenario, to obtain preprocessed first resource data, wherein the specified business scenario is a business scenario corresponding to the first scene identifier.
[0100] Optionally, in the embodiment, preprocessing can be understood as a series of operations on data before storage, such as cleaning, conversion, compression, etc., to meet the requirements of storage and processing.
[0101] As an optional solution, storing the first resource data into the specified database according to the first resource identifier and the first scene identifier includes: storing the preprocessed first resource data into the specified database according to the first resource identifier and the first scene identifier.
[0102] Optionally, in the embodiment, the specified business scenario can be understood as a specific scenario determined according to business requirements and context, and different business scenarios can correspond to different data processing methods and storage requirements.
[0103] It should be noted that before storing the first resource data into the specified database, the embodiment will first preprocess the first resource data according to the processing method corresponding to the specified business scenario (i.e., the business scenario corresponding to the first scene identifier). The preprocessing can include data cleaning, format conversion, compression, etc. The purpose is to make the data more suitable for subsequent storage and processing requirements. After preprocessing, the preprocessed first resource data is obtained, and then the preprocessed data is stored into the specified database according to the first resource identifier and the first scene identifier.
[0104] Further, for example, optionally, it is assumed that an e-commerce platform needs to store user-uploaded product pictures (first resource data). Before storage, the platform will preprocess the pictures according to the processing method corresponding to the business scenario of "product picture upload" (first scene identifier). The preprocessing can include adjusting the picture size, compressing the picture quality, adding a watermark, etc. After preprocessing, the platform will store the preprocessed pictures into the specified database according to the resource identifier and scene identifier of the product pictures.
[0105] According to the embodiments provided in the present application, the first resource data is preprocessed according to the processing method corresponding to the specified business scenario, which can obtain data that is more suitable for storage and processing requirements. This will help to improve the efficiency and quality of data storage, reduce errors and exceptions in subsequent processing. At the same time, by storing the preprocessed data into the specified database, the accuracy and consistency of the data can be ensured, providing a reliable basis for subsequent data analysis and application.
[0106] As an optional solution, storing the first resource data into the specified database comprises:
[0107] S1-1, in the case that the remaining storage space of the specified database is greater than the safe data amount, storing the first resource data into the specified database by using a lossless compression method, wherein the safe data amount is in a positive correlation with the data amount of the first resource data, and the preprocessing includes the lossless compression method;
[0108] S1-2, in the case that the remaining storage space of the specified database is less than or equal to the safe data amount, displaying a storage prompt information, wherein the storage prompt information is used to prompt to store the first resource data into the specified database by using a lossy compression method, and the preprocessing includes the lossy compression method.
[0109] Optionally, in the embodiment, the lossless compression mode can be understood as a data compression method that does not lose any information of the original data in the compression process, and the compressed data can be completely restored to the original state.
[0110] Optionally, in the embodiment, the lossy compression mode can be understood as a data compression method that loses part of the information of the original data in the compression process to achieve a higher compression ratio, but the compressed data cannot be completely restored to the original state.
[0111] Optionally, in the embodiment, the safe data amount can be understood as a threshold value calculated according to the data amount of the first resource data, used to determine whether the remaining storage space of the database is sufficient to store data using the lossless compression mode.
[0112] It should be noted that in the process of storing the first resource data into the specified database, the embodiment will determine which compression mode to use according to the remaining storage space in the database. When the remaining storage space of the database is greater than a certain safe data amount, the lossless compression mode will be selected to store the first resource data. There is a positive correlation between the safe data amount and the data amount of the first resource data, which means that as the amount of the first resource data increases, the safe data amount required will also increase. When the remaining storage space of the database is less than or equal to the safe data amount, a storage prompt information will be displayed, suggesting the user to store data using the lossy compression mode. Whether it is lossless compression or lossy compression, it can be part of the preprocessing step.
[0113] Further, for example, optionally, it is assumed that a user needs to store a large video file (first resource data) into a specified database. If the remaining storage space of the database is large enough (greater than the safe data amount), the system will use the lossless compression mode to compress the video file and then store it in the database. In this way, the user can retrieve and play the video from the database at any time without losing the video quality. However, if the remaining storage space of the database is small (less than or equal to the safe data amount), the system will pop up a storage prompt information, suggesting the user to store the video file using the lossy compression mode. Although this will lose part of the video quality, it can save storage space and ensure that the video file can be successfully stored in the database.
[0114] Through the embodiments provided in the present application, the appropriate compression mode is dynamically selected to store the first resource data according to the relationship between the remaining storage space of the database and the data amount. This not only ensures the safety and integrity of the data in the storage process (uses lossless compression when the remaining space is sufficient), but also provides an alternative solution when the storage space is insufficient (displays a prompt information suggesting to use lossy compression), thereby improving the flexibility and reliability of data storage.
[0115] As an optional solution, before storing the first resource data into the specified database according to the first resource identifier and the first scene identifier, the method further comprises: obtaining the maximum resource number allowed to be stored in the specified database and the current resource number stored in the specified database;
[0116] As an optional solution, storing the first resource data into the specified database according to the first resource identifier and the first scene identifier comprises: storing the first resource data into the specified database according to the first resource identifier and the first scene identifier when the current resource number is less than the maximum resource number.
[0117] Optionally, in the embodiment, the maximum resource number can be the maximum number of resource data that can be stored when the specified database is designed or configured.
[0118] Optionally, in the embodiment, the current resource number can be the number of resource data currently stored in the specified database.
[0119] It should be noted that before storing the first resource data into the specified database, the embodiment will first obtain the maximum resource number allowed to be stored in the database and the current resource number stored in the database. Only when the current resource number is less than the maximum resource number allowed to be stored, the first resource data will be stored into the database according to the first resource identifier and the first scene identifier.
[0120] Further, for example, it is assumed that a picture storage system (specified database) is designed to store a maximum of 1000 pictures (maximum resource number). Currently, the system has stored 900 pictures (current resource number). Now a new picture (first resource data) needs to be stored in the system. Since the current number of stored pictures is 900, which is less than the maximum number of allowed pictures 1000, the new picture can be stored in the system and stored according to its resource identifier and scene identifier.
[0121] Through the embodiments provided in the present application, the maximum resource number and the current resource number of the specified database are obtained and compared, which can ensure that the new resource data is effectively stored in the database without exceeding the storage capacity of the database. This method helps to avoid database overload or storage errors, thereby ensuring the reliability of data storage and the stability of the system. At the same time, by storing data according to resource identifier and scene identifier, the data can be conveniently managed and retrieved, and the use efficiency of the data is improved.
[0122] As an optional solution, the storing the first resource data into the specified database comprises: storing the first resource data into a hot data bucket in the specified database, wherein the hot data bucket is used to store frequently used or updated resource data in the specified database.
[0123] As an optional solution, after the storing the first resource data into the specified database, the method further comprises: in the case that the time length of the idle state of the first resource data is greater than or equal to a preset time length, transferring the first resource data to a cold data bucket in the specified database, wherein the cold data bucket is used to store less frequently used or updated resource data in the specified database.
[0124] As an optional solution, the replacing the first resource data in the specified database with the second resource data comprises: replacing the first resource data in the cold data bucket with the second resource data, and transferring the second resource data to the hot data bucket.
[0125] Optionally, in the embodiment, the hot data bucket can be a storage area in the database used to store frequently used or updated resource data.
[0126] Optionally, in the embodiment, the cold data bucket can be a storage area in the database used to store less frequently used or updated resource data.
[0127] Optionally, in the embodiment, for the determination of the idle state, when a certain resource data (such as the first resource data) is not accessed or used for a period of time, it is considered to be in an idle state. For example, if the preset time length is 30 days, when a certain resource data is not accessed or used for 30 days, it is determined to be in an idle state.
[0128] It should be noted that in the process of storing the first resource data into the specified database, the first resource data is first stored into the hot data bucket. The hot data bucket is a place in the database specially used to store frequently used or updated resource data. When the first resource data is in an idle state for a period of time (preset time length), i.e. not used or updated, the embodiment will transfer it from the hot data bucket to the cold data bucket. The cold data bucket is used to store less frequently used or updated resource data. When the first resource data needs to be replaced, the replacement operation will be performed in the cold data bucket, and the new resource data (i.e. the second resource data) after replacement will be stored into the hot data bucket.
[0129] For further illustration, it is assumed that a video platform needs to store a newly uploaded video (first resource data) in a database. Initially, the video is stored in the hot data bucket, because the new video is usually frequently accessed by users. However, over time, if the video gradually ceases to be watched or updated by users, the system will determine whether it is in an idle state according to a preset time length (for example, 30 days). Once the time length is exceeded, the video is automatically transferred to the cold data bucket.
[0130] When the platform needs to update the video (for example, replace it with a high-definition version), the replacement operation is performed in the cold data bucket. After the replacement is completed, the new high-definition video (second resource data) is re-stored in the hot data bucket, so that users can conveniently access it.
[0131] Through the embodiments provided in the present application, the hot and cold data buckets are divided and dynamically managed according to the usage frequency and update frequency of the resource data, which can significantly improve the performance and storage efficiency of the database. By storing frequently used data in the hot data bucket, the access speed of the data can be accelerated, and the user experience can be improved. At the same time, by transferring infrequently used data to the cold data bucket, valuable storage space can be saved, and storage costs can be reduced. In addition, by performing the replacement operation of the data in the cold data bucket, interference to normal business can be avoided, and smooth data replacement can be ensured.
[0132] As an optional solution, for the convenience of understanding, the above resource management method is applied to the management of CDN materials. In user-oriented businesses, there are generally a large number of CDN materials that need to be hosted. The present embodiment proposes a way of classifying CDN resources by use scenarios (business scenarios). For logical and rule-fixed operation and maintenance type resources, this classification method is more flat, and the convenience of operation and maintenance for operators is higher. When uploading resources using the device, the system can compress the resource size without changing the original resolution, reducing storage occupation; at the same time, the operator can independently check the file name conversion option to convert and encrypt the file uploaded in plaintext. In the visual operation panel implemented based on the device, there are also practical functions such as batch upload, cross-scene upload, same-name file overwrite upload, etc., which are convenient for operators to operate, speed up and increase efficiency.
[0133] For further illustration, it is assumed that a video platform needs to store a newly uploaded video (first resource data) in a database. Initially, the video is stored in the hot data bucket, because the new video is usually frequently accessed by users. However, over time, if the video gradually ceases to be watched or updated by users, the system will determine whether it is in an idle state according to a preset time length (for example, 30 days). Once the time length is exceeded, the video is automatically transferred to the cold data bucket. Figure 4
[0134] Next, after creation is completed, resources can be uploaded. Optionally, as shown in Figure 5 As shown in the list, find the required scene, click "Upload Resources" to select the local file to be uploaded. After the system automatically completes the basic format check, the operator can click "OK" to upload the file.
[0135] Finally, in order to realize the calling of these CDN resources in specific business functions, the server side will provide an SDK, which will initialize the scene information to the memory when the background service of the business is started. Optionally, as Figure 6 As shown, when the front-end or back-end business needs to use the corresponding resources, it uses the software development kit (SDK) to request the encrypted URL through the scene ID and the original file name of the resource. The actual URL requested by the business function cannot be enumerated or decompiled, ensuring the security of the business resources.
[0136] Optionally, in this embodiment, batch uploading of a single scene can also be performed. Multiple files can be uploaded simultaneously under one scene and processed quickly in batches by the system.
[0137] Optionally, in this embodiment, as Figure 7 As shown, batch uploading of multiple scenes can also be performed. Multiple scenes can be selected at a time in the scene list, and batch uploading can be performed for these scenes. The traditional CDN resource manager directory level is complex, and the steps are cumbersome when processing multi-path batch uploading tasks. The scene concept defined in this embodiment optimizes this interaction method and is more convenient.
[0138] Optionally, in this embodiment, resource same-name cover refresh can also be implemented. When the operator uploads the same file name under the same scene, the original resource will be overwritten, and a new encrypted URL will be generated. At this time, the front-end business does not need to be modified, and the refreshed URL can be obtained through the above-mentioned logic, so as to realize the refresh of the resource on the user side. The traditional CDN resource manager is slow in refreshing resources, and may not be able to notify the business after the CDN is refreshed, so it cannot be reflected on the user side.
[0139] It should be noted that the embodiment independently manages the material, decouples from the business, is not dependent on the business configuration, has high reusability, independent control of permission, and adopts the file MD5 renaming manner to prevent security problems caused by material enumeration. The embodiment also maintains the mapping relationship between the file and the material address separately, and only needs to adjust the mapping when the resource is replaced, thereby avoiding the problem of invalid resource caused by CDN refresh and client-side cache refresh. Through the SDK, the application service supports custom loading and updating of scene files, and quickly obtains the required material. In addition, through unified configuration, custom CDN domain name, data visualization, workflow template, and the like, CDN acceleration, application custom clipping, large image automatic compression, cloud audit, and the like are supported.
[0140] Further, as shown in the optional data operation process Figure 8 , a configuration personnel creates a scene and uploads a file to a material manager, and then the material manager uploads the file to a management system and a database (DB) respectively. Further, after a client-side request, the management system loads CDN material, and the SDK connects the database to provide an interface to issue corresponding function services. At the same time, the data in the database is loaded and updated in a timely manner as needed.
[0141] Optionally, in the embodiment, the scene can be understood as an application scene, such as a hero avatar, a hero large image, a skin poster, an inscription icon, and the like, and can also be equal to a directory of the original CDN. The creation of the scene includes at least one of the following:
[0142] 1) Scene ID: composed of English and characters, as a unique ID of the scene, an important parameter (scene ID + file name) for subsequent program pulling of material, and prohibited from being edited;
[0143] 2) Scene name: prohibited from being edited;
[0144] 3) Description: scene-related introduction and notes can be written here for easy management;
[0145] 4) Tag: wiki tag for easy search management;
[0146] 5) Maximum number of uploads: recommended to be set to avoid file expansion;
[0147] 6) Storage bucket: resource corresponding to the Tencent Cloud bucket for easy file lifecycle management, cost management, and the like, and recommended to be placed in the specified bucket, and the others can be placed in the general bucket;
[0148] 7) File name conversion: by default, the file is uploaded to the cloud after being encrypted, so that the resource is not enumerable;
[0149] 8) Automatic compression: whether to perform local compression;
[0150] 9) Picture width / high, limit size: optional, facilitate the management of file specifications, not allowed to upload if not in line with the specifications;
[0151] 10) Collaborator 1: has scene editing and file management permissions;
[0152] 11) Collaborator 2: only has file management permissions, note that there is no scene permission.
[0153] Optionally, in this embodiment, the file operation includes uploading, editing, deleting, exporting, searching and the like, and specifically:
[0154] 1) Upload: batch is supported, and the file name will be used as an index, which is completely customizable. It is generally recommended to use the format of element ID (such as hero ID, skin ID), prefix + element ID (XXX_hero ID, XXX_skin ID). Before uploading, the management end will perform file name conflict checking (ignore suffix); after uploading, it will be uploaded to Tencent Cloud and written into DB (online service) at the same time, with a maximum delay of 5 minutes. Note that the mapping of file name and URL uses file MD5, that is, if 1.png is uploaded, the actual cloud address is: xxx.qq.com / {path} / {fileMd5}.png;
[0155] 2) Edit: add a description to the file for easy management (when replacing materials, directly upload and overwrite);
[0156] 3) Delete: cloud resources will not be deleted, only the mapping relationship in DB will be deleted, and online resources will not be pulled;
[0157] 4) Export: package and download the files in this scene;
[0158] 5) Search: support file name / address / description search.
[0159] Optionally, in this embodiment, cloud processing technology can also be used, such as image compression, security policy verification, audit callback, etc.
[0160] Optionally, in this embodiment, scene materials can be stored in a structured manner using tdsql-c (Cloud Native Database TDSQL-C), and the data model is as shown in Figure 9 , wherein ImageManageInfo is a scene entity, which contains various configuration information of the scene, such as name, description, tag, administrator, limit, etc., and is associated with subordinate files;
[0161] ImageManageFilesInfo is a material file, which is mainly file information, including file name, address, description, size resolution, operation time, etc.
[0162] ImageManageFileLogInfo is file operation log information;
[0163] ImageManageLabelInfo is scene label management.
[0164] Optionally, in this embodiment, after loading the SDK, the related parameters can be set, the specified scene material is loaded, and the material address is obtained through the API.
[0165] Optionally, in this embodiment, the application can no longer obtain the material address through the splicing of the local resource ID, but return the material through the business interface, and the real-time cutting of the picture can be performed by supplementing the parameters after the material address.
[0166] Optionally, in this embodiment, the core capability of the SDK is to realize the starting loading and timing maintenance of the specified material (to avoid the increase of memory consumption of the unused material, the specified material can be selected to be loaded, instead of loading all the materials), and the application service can quickly obtain the required material through the provision of rich calling means, and specifically:
[0167] Scene: scene ID: string, corresponding to a set of materials, which can be simply understood as a folder, and the scene of the picture resource management of the management end is aligned;
[0168] IndexID: index ID, such as hero ID, skin ID, etc.
[0169] FileUrl: picture address;
[0170] Width: width;
[0171] Height: height;
[0172] Size: size.
[0173] Optionally, in this embodiment, after introducing the SDK, the application can load only the required scene material in the memory according to the scene demand of the application. All subsequent operations are performed in the memory, so as to ensure that the performance is not damaged.
[0174] Further, the material detailed information is indexed according to the resource ID, and the material address is indexed according to the resource ID, and no redundant information is returned, such as an empty link when an error occurs.
[0175] Optionally, in this embodiment, different storage buckets can also be applied according to the business scene, and the life cycle, cold and hot data strategy, etc. of different buckets can be set, and the uploading, pulling, etc. operations are supported.
[0176] Further, the embodiment can also customize the domain name for COS storage to perform CDN acceleration, and set policies, including cache configuration, access control, etc. After accessing CDN acceleration, the cost is greatly reduced and the access performance is improved, and the user can perform trimming according to parameters, which improves the freedom of the user and greatly reduces the complexity of the scene material. The user can also use the workflow and template to automatically compress after uploading, avoiding the waste of traffic caused by uploading large art pictures by the user.
[0177] In addition, in the embodiment, the mapping of the file name to the file address can be produced according to the business in addition to using the file MD5, such as {timestamp} - {scene} - {IP} - {environment} - {random code}, etc.
[0178] For the compression method, in addition to using the cloud workflow for compression, an interface such as tinypng can also be used for compression, or the system can be compressed locally, and the effect and actual cost need to be compared.
[0179] The SDK can also be loaded and pulled in an embedded manner, or can be deployed as a microservice to provide pulling through RPC / HTTP.
[0180] Through the embodiments provided in the application, the material manager can quickly converge and is completely independent of other business configurations. The material configuration editing has high reusability, and the material address cannot be enumerated, avoiding the risk of sensitive material leakage. When the resource is upgraded, the resource ID remains unchanged, and the material can be seamlessly replaced, so that the user experience is more real-time, and the previous upgrade no longer needs to perform CDN refresh, client configuration refresh, and other lengthy operations.
[0181] The SDK provides means for specifying scene loading and updating and specifying material quick acquisition, pure memory operation, high performance, and convenience, and small code invasion. The material storage accesses the cloud, and through workflow templates, cloud functions, and other means, automatic compression is started to prevent the problems of slow pulling and high traffic cost caused by the mis-transmission of large pictures by the operator; by supporting user-defined trimming, the convenience is improved while avoiding the problem of too many scenes. The permissions of the operation personnel who configure the material and the business configuration are independent of each other and do not affect each other.
[0182] It can be understood that in the specific embodiments of the application, user information and other related data are involved, and when the above embodiments of the application are applied to specific products or technologies, user permission or consent needs to be obtained, and the collection, use, and processing of related data need to comply with relevant laws, regulations, and standards of relevant countries and regions.
[0183] It should be noted that, for the foregoing method embodiments, for the purpose of simple description, they are all described as a combination of a series of actions, but those skilled in the art should know that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily necessary for the present application.
[0184] According to another aspect of the embodiments of the present application, a resource management apparatus for implementing the above-mentioned resource management method is also provided. As shown in the figure, the apparatus comprises: Figure 10
[0185] The first acquisition unit 1002 is configured to acquire, in response to a resource management request triggered by the first resource data, a first resource identifier corresponding to the first resource data, and a first scene identifier corresponding to the first resource data, wherein the first resource identifier is used to indicate a resource identifier to which the first resource data belongs, and the first scene identifier is used to indicate a service scene to which the first resource data belongs, different service scenes correspond to different resource management permissions;
[0186] The first management unit 1004 is configured to store the first resource data into a specified database according to the first resource identifier and the first scene identifier, wherein the specified database is a database matched with the first scene identifier, and the data in the specified database is set to be allowed to be managed by an instruction with a specified management permission, and the specified management permission is a resource management permission corresponding to the service scene indicated by the first scene identifier;
[0187] The second acquisition unit 1006 is configured to acquire, in response to a resource management request triggered by the second resource data, a second resource identifier corresponding to the second resource data, and a second scene identifier corresponding to the second resource data, wherein the second resource identifier is used to indicate a resource identifier to which the second resource data belongs, and the second scene identifier is used to indicate a service scene to which the second resource data belongs;
[0188] The second management unit 1008 is configured to replace the first resource data in the specified database with the second resource data in the case that the identifier similarity between the first resource identifier and the second resource identifier is greater than or equal to a first preset threshold, and the identifier similarity between the first scene identifier and the second scene identifier is greater than or equal to a second preset threshold.
[0189] The specific embodiments can refer to the examples shown in the above-mentioned resource management method, which will not be described here in this example.
[0190] As an optional solution, the apparatus further comprises:
[0191] The first encryption unit is configured to encrypt the specified resource locator by using the first resource identifier, the first scene identifier, and a content hash value corresponding to the first resource data after storing the first resource data into the specified database according to the first resource identifier and the first scene identifier, wherein the specified resource locator is used to locate a storage position of the specified resource data, and the specified resource data belongs to a business scenario indicated by the first resource identifier and the first scene identifier.
[0192] The embodiments can refer to the examples shown in the above resource management method, which will not be described herein.
[0193] As an optional solution, the apparatus further includes:
[0194] The second encryption unit is configured to update the encrypted data of the specified resource locator by using the second resource identifier, the second scene identifier, and a content hash value corresponding to the second resource data after replacing the first resource data in the specified database with the second resource data.
[0195] The embodiments can refer to the examples shown in the above resource management method, which will not be described herein.
[0196] As an optional solution, the apparatus further includes a processing unit configured to pre-process the first resource data according to a processing manner corresponding to a specified business scenario to obtain pre-processed first resource data before storing the first resource data into the specified database according to the first resource identifier and the first scene identifier, wherein the specified business scenario is a business scenario corresponding to the first scene identifier.
[0197] The first management unit 1004 includes a first management module configured to store the pre-processed first resource data into the specified database according to the first resource identifier and the first scene identifier.
[0198] The embodiments can refer to the examples shown in the above resource management method, which will not be described herein.
[0199] As an optional solution, the first management unit 1004 includes:
[0200] The second management module is configured to store the first resource data into the specified database by using a lossless compression manner in a case that a remaining storage space of the specified database is greater than a safe data amount, wherein the safe data amount is in a positive correlation relationship with a data amount of the first resource data, and the pre-processing includes the lossless compression manner.
[0201] The third management module is configured to display storage prompt information in a case where the remaining storage space of the specified database is less than or equal to the safe data amount, wherein the storage prompt information is used to prompt to store the first resource data into the specified database by using a lossy compression manner, and the preprocessing includes the lossy compression manner.
[0202] The specific embodiments can refer to the examples shown in the above resource management method, and details are not described herein again in this example.
[0203] As an optional solution, the apparatus further includes a third acquisition unit configured to acquire a maximum number of resources allowed to be stored in the specified database and a current number of resources stored in the specified database before storing the first resource data into the specified database according to the first resource identifier and the first scene identifier.
[0204] The first management unit 1004 includes a fourth management module configured to store the first resource data into the specified database according to the first resource identifier and the first scene identifier in a case where the current number of resources is less than the maximum number of resources.
[0205] The specific embodiments can refer to the examples shown in the above resource management method, and details are not described herein again in this example.
[0206] As an optional solution, the first management unit 1004 includes a first storage module configured to store the first resource data into a hot data bucket in the specified database, wherein the hot data bucket is used to store resource data that is more frequently used or updated in the specified database.
[0207] The apparatus further includes a second storage module configured to store the first resource data into a cold data bucket in the specified database in a case where the first resource data is in an idle state for a time period greater than or equal to a preset time period after storing the first resource data into the specified database, wherein the cold data bucket is used to store resource data that is less frequently used or updated in the specified database.
[0208] The second management unit 1008 includes a third storage module configured to replace the first resource data in the cold data bucket with second resource data and store the second resource data into the hot data bucket.
[0209] The specific embodiments can refer to the examples shown in the above resource management method, and details are not described herein again in this example.
[0210] According to still another aspect of the embodiments of the present application, an electronic device for implementing the above resource management method is further provided, which can be but is not limited to the user equipment 102 or the server 112 shown in Figure 1 The present embodiment takes the user equipment 102 as an example for illustration, and further as shown in Figure 11As shown, the electronic device includes a memory 1102 in which a computer program is stored, and a processor 1104 configured to execute the steps in any of the method embodiments described above through the computer program.
[0211] Optionally, in the present embodiment, the electronic device described above can be located in at least one of a plurality of network devices of a computer network.
[0212] Optionally, in the present embodiment, the processor described above can be configured to execute the following steps through the computer program:
[0213] S1, in response to a resource management request triggered by the first resource data, obtaining a first resource identifier corresponding to the first resource data, and a first scene identifier corresponding to the first resource data, wherein the first resource identifier is used to indicate a resource identifier to which the first resource data belongs, and the first scene identifier is used to indicate a business scene to which the first resource data belongs, different business scenes correspond to different resource management permissions;
[0214] S2, storing the first resource data into a specified database according to the first resource identifier and the first scene identifier, wherein the specified database is a database matched with the first scene identifier, and the data in the specified database is set to be allowed to be managed by an instruction with a specified management permission, and the specified management permission is a resource management permission corresponding to the business scene indicated by the first scene identifier;
[0215] S3, in response to a resource management request triggered by the second resource data, obtaining a second resource identifier corresponding to the second resource data, and a second scene identifier corresponding to the second resource data, wherein the second resource identifier is used to indicate a resource identifier to which the second resource data belongs, and the second scene identifier is used to indicate a business scene to which the second resource data belongs;
[0216] S4, in the case that the identifier similarity between the first resource identifier and the second resource identifier is greater than or equal to a first preset threshold, and the identifier similarity between the first scene identifier and the second scene identifier is greater than or equal to a second preset threshold, replacing the first resource data in the specified database with the second resource data.
[0217] Optionally, those skilled in the art can understand that, Figure 11 The structure shown is only schematic, Figure 11 It does not limit the structure of the electronic device described above. For example, the electronic device can also include more or fewer components (such as network interfaces, etc.) than those shown in the figure, or have a different configuration from that shown in the figure. Figure 11 The structure shown is only schematic, Figure 11 It does not limit the structure of the electronic device described above. For example, the electronic device can also include more or fewer components (such as network interfaces, etc.) than those shown in the figure, or have a different configuration from that shown in the figure.
[0218] The memory 1102 can be used to store software programs and modules, such as program instructions / modules corresponding to the resource management method and device in the embodiments of the present application. The processor 1104 executes various functions and data processing by running the software programs and modules stored in the memory 1102, that is, implements the above-mentioned resource management method. The memory 1102 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 1102 can further include a memory remotely arranged with respect to the processor 1104, which can be connected to the electronic device through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. Specifically, the memory 1102 can be used to store, but is not limited to, first resource data and second resource data and the like. As an example, as shown in the above-mentioned memory 1102, the first acquisition unit 1002, the first management unit 1004, the second acquisition unit 1006, and the second management unit 1008 in the above-mentioned resource management device can be included, but are not limited to. In addition, other module units in the above-mentioned resource management device can also be included, but are not limited to, which will not be described in detail in this example. Figure 11
[0219] Optionally, the transmission device 1106 is used to receive or send data via a network. Specific examples of the above-mentioned network can include wired networks and wireless networks. In one example, the transmission device 1106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers through a network cable to communicate with the Internet or a local area network. In one example, the transmission device 1106 is a radio frequency (Radio Frequency, RF) module, which is used to communicate with the Internet in a wireless manner.
[0220] In addition, the above-mentioned electronic device further includes a display 1108 for displaying the above-mentioned first resource data and second resource data and the like, and a connection bus 1110 for connecting various module components in the above-mentioned electronic device.
[0221] In other embodiments, the above-mentioned user equipment or server can be a node in a distributed system, wherein the distributed system can be a blockchain system, which can be a distributed system formed by the plurality of nodes communicating through a network. Among them, the nodes can form a peer-to-peer network, and any form of computing device, such as a server, a user equipment, and the like, can become a node in the blockchain system by joining the peer-to-peer network.
[0222] According to an aspect of the present application, a computer program product is provided, which includes computer programs / instructions containing program codes for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through a communication section, and / or installed from a removable medium. When the computer program is executed by a central processing unit, various functions provided by the embodiments of the present application are performed.
[0223] The above-mentioned sequence numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0224] It should be noted that the computer system of the electronic device is only an example, and should not bring any limitation to the functions and use range of the embodiments of the present application.
[0225] The computer system includes a central processing unit (CPU) which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) or programs loaded from a storage section into a random access memory (RAM). Various programs and data required for system operation are also stored in the random access memory. The central processing unit, the read-only memory and the random access memory are connected to each other through a bus. An input / output interface (I / O interface) is also connected to the bus.
[0226] The following components are connected to the input / output interface: an input section including a keyboard, a mouse, etc.; an output section including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section including a hard disk, etc.; and a communication section including a network interface card such as a local area network card, a modem, etc. The communication section performs communication processing via a network such as the Internet. A drive is also connected to the input / output interface as necessary. A removable medium such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is mounted on the drive as necessary, so that a computer program read out therefrom is installed into the storage section as necessary.
[0227] In particular, according to embodiments of the present application, the processes described in the various method flowcharts can be implemented as a computer software program. For example, embodiments of the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for executing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by a communication section, and / or installed from a detachable medium. When the computer program is executed by a central processing unit, various functions defined in the system of the present application are executed.
[0228] According to an aspect of the present application, a computer readable storage medium is provided, from which a processor of a computer device reads computer instructions, the processor executes the computer instructions, so that the computer device executes the method provided in the various optional implementation manners described above.
[0229] Optionally, in the present embodiment, the computer readable storage medium described above can be configured to store a computer program for executing the following steps:
[0230] S1, in response to a resource management request triggered by first resource data, obtaining a first resource identifier corresponding to the first resource data, and a first scene identifier corresponding to the first resource data, wherein the first resource identifier is used to indicate a resource identifier to which the first resource data belongs, and the first scene identifier is used to indicate a business scene to which the first resource data belongs, different business scenes correspond to different resource management permissions;
[0231] S2, storing the first resource data into a specified database according to the first resource identifier and the first scene identifier, wherein the specified database is a database matched with the first scene identifier, and the data in the specified database is set to be allowed to be managed by an instruction with a specified management permission, and the specified management permission is a resource management permission corresponding to the business scene indicated by the first scene identifier;
[0232] S3, in response to a resource management request triggered by second resource data, obtaining a second resource identifier corresponding to the second resource data, and a second scene identifier corresponding to the second resource data, wherein the second resource identifier is used to indicate a resource identifier to which the second resource data belongs, and the second scene identifier is used to indicate a business scene to which the second resource data belongs;
[0233] S4, in the case that the identifier similarity between the first resource identifier and the second resource identifier is greater than or equal to a first preset threshold, and the identifier similarity between the first scene identifier and the second scene identifier is greater than or equal to a second preset threshold, replacing the first resource data in the specified database with the second resource data.
[0234] Optionally, in the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined target, and can be implemented entirely or partially by using software, hardware (such as a processing circuit or a memory) or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an integral module or unit that includes the functions of the module or unit.
[0235] Optionally, in the embodiments, a person of ordinary skill in the art can understand that all or part of the steps of the various methods in the above embodiments can be completed by instructing the hardware related to the electronic device through a program, and the program can be stored in a computer readable storage medium, and the storage medium can include a flash disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0236] The serial numbers of the embodiments of the present application described above are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0237] The integrated units in the above embodiments, if implemented in the form of software function units and sold or used as independent products, can be stored in the above computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that make contributions to the related art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing one or more computer devices (which can be personal computers, servers or network devices, etc.) to execute all or part of the steps of the embodiments of the present application.
[0238] In the above embodiments of the present application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0239] In the several embodiments provided by the present application, it should be understood that the disclosed user equipment can be implemented in other ways. Of course, the device embodiment described above is only illustrative, and for example, the division of units is only a logical function division, and there can be another division manner in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed mutual parts can be indirect coupling or communication connection through some interfaces, units or modules, and can be electrical or other forms.
[0240] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0241] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0242] The above is only the preferred embodiment of the present application, and it should be pointed out that for ordinary skilled persons in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which should be considered as the protection scope of the present application.
Claims
1. A resource management method, characterized in that: include: In response to a resource management request triggered by first resource data, obtaining a first resource identifier corresponding to the first resource data and a first scenario identifier corresponding to the first resource data, wherein the first resource identifier is used to indicate a resource identifier to which the first resource data belongs, and the first scenario identifier is used to indicate a business scenario to which the first resource data belongs, and different business scenarios correspond to different resource management permissions; According to the first resource identifier and the first scenario identifier, storing the first resource data in a designated database, wherein the designated database is a database that matches the first scenario identifier, and the data in the designated database is set to allow management by instructions with designated management authority, where the designated management authority is a resource management authority corresponding to the business scenario indicated by the first scenario identifier; In response to a resource management request triggered by second resource data, obtaining a second resource identifier corresponding to the second resource data and a second scenario identifier corresponding to the second resource data, wherein the second resource identifier is used to indicate a resource identifier to which the second resource data belongs, and the second scenario identifier is used to indicate a business scenario to which the second resource data belongs; When the identification similarity between the first resource identifier and the second resource identifier is greater than or equal to a first preset threshold, and the identification similarity between the first scene identifier and the second scene identifier is greater than or equal to a second preset threshold, the first resource data in the designated database is replaced with the second resource data.
2. The method according to claim 1, characterized in that After storing the first resource data in a designated database according to the first resource identifier and the first scenario identifier, the method further includes: The specified resource locator is encrypted using the first resource identifier, the first scene identifier, and the content hash value corresponding to the first resource data, wherein the specified resource locator is used to locate the storage location of the specified resource data, and the specified resource data belongs to the business scenario indicated by the first resource identifier and the first scene identifier.
3. The method according to claim 2, characterized in that After replacing the first resource data in the designated database with the second resource data, the method further includes: The encrypted data of the designated resource locator is updated using the second resource identifier, the second scene identifier, and the content hash value corresponding to the second resource data.
4. The method according to claim 1, wherein Before storing the first resource data in a designated database according to the first resource identifier and the first scenario identifier, the method further includes: preprocessing the first resource data according to a processing method corresponding to a designated business scenario to obtain preprocessed first resource data, wherein the designated business scenario is a business scenario corresponding to the first scenario identifier; The storing the first resource data in a designated database according to the first resource identifier and the first scenario identifier includes storing the preprocessed first resource data in the designated database according to the first resource identifier and the first scenario identifier.
5. The method according to claim 4, characterized in that Storing the first resource data in a designated database includes: When the remaining storage space of the designated database is greater than the amount of secure data, storing the first resource data in the designated database using a lossless compression method, wherein there is a positive correlation between the amount of secure data and the amount of the first resource data, and the preprocessing includes the lossless compression method; When the remaining storage space of the designated database is less than or equal to the amount of secure data, storage prompt information is displayed, wherein the storage prompt information is used to prompt the use of a lossy compression method to store the first resource data in the designated database, and the preprocessing includes the lossy compression method.
6. The method according to any one of claims 1 to 5, characterized in that Before storing the first resource data in a designated database according to the first resource identifier and the first scenario identifier, the method further includes: obtaining a maximum number of resources allowed to be stored in the designated database and a current number of resources stored in the designated database; The storing the first resource data in the designated database according to the first resource identifier and the first scenario identifier includes: when the current number of resources is less than the maximum number of resources, storing the first resource data in the designated database according to the first resource identifier and the first scenario identifier.
7. The method according to any one of claims 1 to 5, characterized in that The storing the first resource data into the designated database includes: storing the first resource data into a hot data bucket in the designated database, wherein the hot data bucket is used to store more frequently used or updated resource data in the designated database; After storing the first resource data in the designated database, the method further includes: if the first resource data is in an idle state for a period greater than or equal to a preset period, transferring the first resource data to a cold data bucket in the designated database, wherein the cold data bucket is used to store less frequently used or updated resource data in the designated database; The replacing the first resource data in the designated database with the second resource data includes: replacing the first resource data in the cold data bucket with the second resource data, and transferring the second resource data to the hot data bucket.
8. A resource management device, characterized in that: include: A first acquisition unit is configured to, in response to a resource management request triggered on first resource data, acquire a first resource identifier corresponding to the first resource data and a first scenario identifier corresponding to the first resource data, wherein the first resource identifier is used to indicate a resource identifier to which the first resource data belongs, and the first scenario identifier is used to indicate a business scenario to which the first resource data belongs, and different business scenarios correspond to different resource management permissions; a first management unit, configured to store the first resource data in a designated database according to the first resource identifier and the first scenario identifier, wherein the designated database is a database that matches the first scenario identifier, and the data in the designated database is set to allow management by instructions having designated management authority, where the designated management authority is a resource management authority corresponding to the business scenario indicated by the first scenario identifier; a second acquisition unit, configured to acquire, in response to a resource management request triggered on second resource data, a second resource identifier corresponding to the second resource data and a second scenario identifier corresponding to the second resource data, wherein the second resource identifier is used to indicate a resource identifier to which the second resource data belongs, and the second scenario identifier is used to indicate a business scenario to which the second resource data belongs; The second management unit is used to replace the first resource data in the designated database with the second resource data when the identification similarity between the first resource identifier and the second resource identifier is greater than or equal to a first preset threshold, and the identification similarity between the first scene identifier and the second scene identifier is greater than or equal to a second preset threshold.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program is executed by an electronic device to perform the method according to any one of claims 1 to 7.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.