Cross-platform editing resource management method and device

Through cross-platform resource protocol and component management resources in the editing tool, the problem of the resource still occupying memory when it is no longer referenced is solved, and efficient resource management and the unification of multi-platform processing mechanisms are achieved.

CN119865634AActive Publication Date: 2025-04-22SHANGHAI BILIBILI TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411929099.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-22
Estimated Expiration
2044-12-24

AI Technical Summary

Technical Problem

When the existing editing tool imports the resources referenced by the draft, it will copy the resources to the platform's private sandbox, resulting in the resource being consumed when it is no longer referenced, resulting in wasting memory resources.

Method used

By building cross-platform resource protocols and components, cross-platform management of resources is realized, the reference relationship between drafts and resources is updated for draft editing operations, and the referenceless resources are deleted to avoid memory usage.

Benefits of technology

Effectively manage the reference relationship between drafts and resources, avoid useless resources occupying memory, optimize storage space, and maintain the unity of processing mechanisms in a multi-platform environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119865634A_ABST
    Figure CN119865634A_ABST
Patent Text Reader

Abstract

The invention discloses a cross-platform editing resource management method and device. The method comprises the following steps: constructing a cross-platform resource protocol; for any platform, the resources are imported to the platform based on the cross-platform component according to the cross-platform resource protocol; editing the selected draft, and updating the reference relationship between the draft and the referenced resource according to the editing operation; and according to the updated reference relationship between the draft and the resource, if there is no reference relationship between the resource and each draft, deleting the resource according to a cross-platform resource protocol based on the cross-platform component. The reference relationship between the draft and the resources and the resources are managed, and when the resources are not referenced by the draft any more, the resources are deleted, so that redundant resources can be prevented from occupying memory storage. Furthermore, a cross-platform resource protocol is adopted and is completed based on a cross-platform component, so that unambiguity can be realized on the whole core logic, and mechanism unification during multi-platform processing is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of editing technology, and in particular to a cross-platform editing resource management method and device. Background Art

[0002] When users use editing tools to edit videos, the editing process will be recorded and a corresponding draft will be generated. To ensure the fluency and speed of using the draft, when users import various resources referenced by the draft, the existing editing tools will copy the resources referenced by the draft to the platform's private sandbox. Different platforms have their own private sandboxes, which store a variety of resources and take up memory storage space.

[0003] During the editing process, the same resource may be referenced by multiple drafts, and there is a reference relationship between the drafts and the resources. When deleting a draft, the existing technology only deletes the draft, resulting in the resource still occupying memory when it is no longer referenced, causing a waste of memory resources. Therefore, a method for managing editing resources that can be applied to different platforms is needed. Summary of the invention

[0004] In view of the above problems, embodiments of the present application are proposed to provide a cross-platform clip resource management method and device that overcome the above problems or at least partially solve the above problems.

[0005] According to a first aspect of an embodiment of the present application, a cross-platform clip resource management method is provided, which includes:

[0006] Build a cross-platform resource protocol;

[0007] For any platform, import resources into the platform based on cross-platform components according to the cross-platform resource protocol;

[0008] Perform an editing operation on the selected draft, and update the reference relationship between the draft and the referenced resources according to the editing operation;

[0009] According to the reference relationship between the updated drafts and the resources, if there are resources that have no reference relationship with the drafts, the resources are deleted based on the cross-platform component according to the cross-platform resource protocol.

[0010] Optionally, the method further comprises:

[0011] Construct a draft-resource reference relationship table and a resource table; wherein the draft-resource reference relationship table records the reference relationship between a draft and a resource; a resource has a reference relationship with one or more drafts.

[0012] Optionally, for any platform, importing resources into the platform based on the cross-platform component according to the cross-platform resource protocol further includes:

[0013] For any platform, a platform-specific resource import method is built based on cross-platform components according to the cross-platform resource protocol;

[0014] Call the platform's private resource import method through the platform's internal notification to import resources into the platform's private sandbox.

[0015] Optionally, performing a clipping operation on the selected draft, and updating the reference relationship between the draft and the referenced resource according to the clipping operation further includes:

[0016] According to the selected draft, the draft-resource reference relationship table is searched, and the resources having a reference relationship with the draft are obtained and displayed in the draft;

[0017] The draft is edited, and the draft-resource reference relationship table is updated according to the resources referenced by the edited draft.

[0018] Optionally, performing a clipping operation on the draft and updating the draft-resource reference relationship table according to the resources referenced by the clipped draft further includes:

[0019] Perform resource modification operations on the draft to obtain an edited draft; the resource modification operations include resource addition operations, resource attribute modification operations and / or resource deletion operations;

[0020] The resource reference difference information before and after the draft editing is calculated using a differential algorithm, and the reference relationship in the draft-resource reference relationship table is updated based on the resource reference difference information; the resource reference difference information includes: new reference resources and / or deleted resources; the update includes: generating a reference relationship between the draft and the new reference resources and / or deleting the reference relationship between the draft and the deleted resources.

[0021] Optionally, performing a clipping operation on the draft and updating the draft-resource reference relationship table according to the resources referenced by the clipped draft further includes:

[0022] Delete the draft and delete the reference relationship between the draft and each resource in the draft-resource reference relationship table.

[0023] Optionally, according to the reference relationship between the updated draft and the resource, if there is a resource that has no reference relationship with each draft, deleting the resource based on the cross-platform component according to the cross-platform resource protocol further includes:

[0024] For any resource in the resource table, determine whether there is a reference relationship between the resource and the draft in the updated draft-resource reference relationship table;

[0025] If not, delete the resources in the resource table, build a platform-private resource deletion method based on the cross-platform resource protocol and the cross-platform component, and call the platform-private resource deletion method through the platform's internal notification to delete the resources.

[0026] According to a second aspect of an embodiment of the present application, a cross-platform clip resource management device is provided, comprising:

[0027] Protocol module, suitable for building cross-platform resource protocols;

[0028] An import module, suitable for any platform, importing resources into the platform based on the cross-platform component according to the cross-platform resource protocol;

[0029] The editing module is adapted to perform editing operations on the selected draft and update the reference relationship between the draft and the referenced resources according to the editing operation;

[0030] The deletion module is suitable for deleting resources according to the reference relationship between the updated drafts and resources. If there are resources that have no reference relationship with each draft, the resources are deleted according to the cross-platform resource protocol based on the cross-platform component.

[0031] According to a third aspect of an embodiment of the present application, there is provided a computing device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;

[0032] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the above-mentioned cross-platform clip resource management method.

[0033] According to a fourth aspect of an embodiment of the present application, a computer storage medium is provided, wherein at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to perform operations corresponding to the above-mentioned cross-platform clip resource management method.

[0034] According to a fifth aspect of an embodiment of the present application, a computer program product is provided, comprising at least one executable instruction, wherein the executable instruction enables a processor to perform operations corresponding to the above-mentioned cross-platform clip resource management method.

[0035] According to the cross-platform editing resource management method and device provided by the present application, the reference relationship between the draft and the resource and the resource are managed. When the resource is no longer referenced by the draft, the resource is deleted, which can avoid redundant resources occupying memory storage. Furthermore, the cross-platform resource protocol is adopted and completed based on the cross-platform component, which can achieve unambiguity in the overall core logic and ensure the unified mechanism when processing multiple platforms.

[0036] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0038] Figure 1 A flowchart of a cross-platform clip resource management method according to an embodiment of the present application is shown;

[0039] Figure 2 A flowchart of a cross-platform clip resource management method according to another embodiment of the present application is shown;

[0040] Figure 3 A schematic diagram showing the process from resource import to resource deletion is shown;

[0041] Figure 4 A schematic diagram of the structure of a cross-platform clip resource management device according to an embodiment of the present application is shown;

[0042] Figure 5 A schematic diagram of the structure of a computing device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0043] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0044] First, the terms involved in one or more embodiments of the present application are explained.

[0045] KMP: Kotlin Multiplatform, allows developers to use the Kotlin language to share code between multiple platforms (such as Android, iOS, Web, servers, etc.), which can reduce the workload of writing and maintaining the same code for different platforms while retaining the flexibility and advantages of native programming.

[0046] Diff algorithm: An algorithm for computing the differences between two sequences (usually strings or files) by finding the minimum number of editing operations required to transform one sequence into the other, including insertions, deletions, and substitutions.

[0047] Figure 1 A flowchart of a cross-platform clip resource management method according to an embodiment of the present application is shown. Figure 1 As shown, the method comprises the following steps:

[0048] Step S101, constructing a cross-platform resource protocol.

[0049] In this embodiment, the draft is a video draft, and various resources can be added to the draft, such as audio, textures, special effects, etc. The draft can be edited in editors of different platforms, such as adding resources to the draft, modifying resources, or deleting resources. For resource management, in order to ensure the unified processing mechanism of each platform, a cross-platform universal method is used for resource management.

[0050] Build a cross-platform resource protocol that can be applied to various platforms, such as standardizing the interfaces for calling various functions when using resources on each platform, and unifying the processing mechanisms of each platform.

[0051] Step S102: for any platform, resources are imported into the platform based on the cross-platform component according to the cross-platform resource protocol.

[0052] For any platform, such as Android platform, IOS platform, Hongmeng platform, web platform and other platforms, cross-platform components can be used to build the implementation of each platform according to the definition of cross-platform protocol. Therefore, when editing drafts, the resources needed can be imported into each platform, and each platform can import resources into the platform's private sandbox, which is convenient when editing drafts. It can significantly improve the efficiency of the editor and the performance at runtime.

[0053] Cross-platform components can be KMP cross-platform components. Cross-platform components developed based on the Kotlin language can be applied to various platforms, so that multiple platforms can implement common and unified functions based on KMP cross-platform components and ensure the unification of operating mechanisms among platforms.

[0054] Importing resources into the platform means copying and importing the resources into the platform privately. When the platform starts the editor and performs editing operations, it can quickly obtain resources from the platform locally, thereby improving the operating efficiency of the editor.

[0055] Step S103, performing a clipping operation on the selected draft, and updating the reference relationship between the draft and the referenced resources according to the clipping operation.

[0056] In the editor, you can perform various editing operations on the selected draft. The editing operation may or may not affect the reference relationship between the draft and the resource. This embodiment mainly manages resources, and operations that will not affect the reference relationship between the draft and the resource do not need to be processed. For example, during the editing operation, you can modify the resources that have been referenced in the draft, such as modifying the properties and position of the resources; or, when performing an editing operation on the draft, do not modify the resources in the draft, etc. The above editing operations will not affect the reference relationship between the draft itself and the resources, and the impact of the editing operation does not need to be processed. Editing operations also include deleting referenced resources or newly citing other resources, which affect the reference relationship between the draft and the resource. Deleting referenced resources will cause the reference relationship between the draft and the resource to disappear, and newly citing other resources requires the construction of a reference relationship between the draft and the resource.

[0057] Take draft A as an example. The resources it references include resource 1, resource 2, and resource 3. The editing operations on draft A may include modifying the position of resource 1, deleting resource 2, and newly referencing resource 4. The modification of the position of resource 1 by the editing operation does not affect the reference relationship between draft A and resource 1. Deleting resource 2 and newly referencing resource 4 will affect the reference relationship between draft A and resources 2 and 4. Therefore, after the editing operation is performed on draft A, the reference relationship between the draft and the referenced resources needs to be updated according to the editing operation.

[0058] Step S104: based on the reference relationship between the updated drafts and the resources, if there are resources that have no reference relationship with the drafts, the resources are deleted according to the cross-platform resource protocol based on the cross-platform component.

[0059] According to the reference relationship between the draft and the resource, a new reference relationship between the draft and the resource may be generated, such as adding a reference relationship between draft A and resource 4, or a reference relationship between the draft and the resource may be deleted, such as deleting the reference relationship between draft A and resource 2.

[0060] Deleting the reference relationship may result in no reference relationship between a certain resource and any draft. For example, resource 2 is only referenced by draft A. After deleting the reference relationship between draft A and resource 2, resource 2 may not be referenced by any draft. Resource 2 is a useless resource for each draft. If the platform continues to store resource 2, the memory is occupied by useless resources. At this time, resource 2 can be deleted to reduce the useless memory occupation. When deleting resource 2, the platform resources are deleted according to the cross-platform resource protocol to ensure the unified mechanism of resource deletion for each platform. For example, a common deletion interface for each platform can be built based on cross-platform components. Each platform implements its own resource deletion implementation. By calling the platform's resource deletion implementation, useless resources are deleted, thereby preventing redundant resources from occupying storage space and optimizing space resource storage.

[0061] According to the cross-platform editing resource management method provided by this application, the reference relationship between the draft and the resource and the resource are managed. When the resource is no longer referenced by the draft, the resource is deleted, which can avoid redundant resources occupying memory storage. Furthermore, the cross-platform resource protocol is adopted and completed based on the cross-platform component, which can achieve unambiguity in the overall core logic and ensure the unified mechanism when processing multiple platforms.

[0062] Figure 2 A flowchart of a cross-platform clip resource management method according to an embodiment of the present application is shown. Figure 2 As shown, the method comprises the following steps:

[0063] Step S201, constructing a draft-resource reference relationship table and a resource table.

[0064] When managing resources, it is necessary to consider whether the resources are referenced by drafts. Therefore, in order to facilitate resource management, this embodiment constructs a draft-resource reference relationship table and a resource table.

[0065] The draft-resource reference relationship table is used to record the reference relationship between drafts and resources. A resource has a reference relationship with one or more drafts. When a draft references a resource, the reference relationship between the draft and the resource can be stored in the draft-resource reference relationship table. When recording, data such as resource 1 and draft A, resource 1 and draft B, resource 2 and draft A, resource 3 and draft B, resource 4 and draft C can be recorded based on the reference relationship between the draft and the resource. Each resource is recorded in the resource table. The resource table manages all current resources to facilitate resource statistics. When recording, it can be recorded according to specific resources, such as resource 1, resource 2, resource 3, resource 4, etc., which is used to manage all resource data.

[0066] Step S202: construct a cross-platform resource protocol.

[0067] The cross-platform resource protocol can unify the processing mechanisms of multiple platforms. Based on the cross-platform protocol, interfaces related to resource processing that are common to multiple platforms can be defined, such as resource import interfaces, resource deletion interfaces, etc. Resource-related data structures can also be defined, such as resource types, resource attributes, etc. The above are examples for explanation, and the specific settings will be based on the implementation situation and are not limited here.

[0068] When building a cross-platform resource protocol, it can be defined according to the cross-platform Kotlin language such as KMP, reducing the workload of writing and maintaining the same code for different platforms, and each platform can complete the interface implementation of its own platform according to the cross-platform resource protocol.

[0069] Step S203, for any platform, a platform-private resource import method is constructed based on the cross-platform component according to the cross-platform resource protocol, the platform-private resource import method is called through the platform internal notification, and the resources are imported into the platform-private sandbox.

[0070] The platforms mentioned in this embodiment include but are not limited to platforms that provide editors for video draft editing, such as Android platform, IOS platform, Hongmeng platform, web platform, etc. Each platform can use cross-platform components to implement their own resource import methods according to the cross-platform resource protocol. For example, the platform resource import interface PlatForm is defined in the cross-platform resource protocol, the resource import method corresponding to the Android platform is implemented as AndroidImp, the resource import method corresponding to the IOS platform is implemented as IOSImp, the resource import method corresponding to the Hongmeng platform is implemented as HarmonyImp, and the resource import method corresponding to the Web platform is implemented as WebImp, etc. When each platform constructs its own interface implementation, it can use components such as KMP to implement the private resource import method of each platform. When the user uses the editor, for the selected resources, the platform's private resource import method is called through the platform's internal notification, and the resources can be imported into the platform's private sandbox. On the one hand, the private sandbox environment ensures the safety of draft editing, and on the other hand, the resources imported into the sandbox can improve the operating performance of the platform's own editor.

[0071] Step S204, according to the selected draft, search the draft-resource reference relationship table, obtain and display the resources that have a reference relationship with the draft in the draft, edit the draft, and update the draft-resource reference relationship table according to the resources referenced by the edited draft.

[0072] Before editing a draft in the editor, you can first search the draft-resource reference relationship table to find the data of resources that have a reference relationship with the draft and determine the resources with a reference relationship. Since the resources have been imported into the platform's private sandbox, you can directly obtain the resources that break the reference relationship from the platform's private sandbox and quickly load them into the editor. These resources can be quickly displayed in the draft to complete the loading of the draft.

[0073] After the draft is loaded, you can perform resource modification operations on the draft. Resource modification operations include resource addition operations, resource attribute modification operations, resource deletion operations, etc. Resource addition operations include citing new resources in the draft, resource attribute modification operations include modifying various attributes such as the location and format of resources already referenced in the draft, and resource deletion operations include removing resources already referenced in the draft. By performing resource modification operations on the draft, you can get the edited draft. Because resource modification operations may affect the reference relationship between the draft and the resource, it is necessary to update the draft-resource reference relationship table accordingly based on the difference between the draft before and after editing. When updating, you can use a differential algorithm, such as the Diff algorithm, to calculate the resource reference difference information before and after the draft is edited. The focus is on resource reference. If only the resource attribute is modified and does not involve changes in the reference relationship, there is no need to pay attention. Resource reference difference information mainly includes newly referenced resources and deleted resources. Based on the resource reference difference information, the reference relationship in the draft-resource reference relationship table can be updated. For new referenced resources, a reference relationship between the draft and the new referenced resource is generated. For deleted resources, it is necessary to first find the records of the draft and the deleted resource from the draft-resource reference relationship table and delete the record, that is, delete the reference relationship between the draft and the deleted resource.

[0074] In addition to resource modification operations on resources in a draft causing changes in the reference relationship between the draft and the resource, the deletion operation of the draft itself will also cause changes in the reference relationship between the draft and the resource. When deleting a draft, it is necessary to find the draft-resource reference relationship table and delete all the reference relationships between the draft and each resource. For example, if the draft is Draft A, when the platform deletes Draft A, it is necessary to delete all records containing Draft A in the Draft-Resource Reference Relationship Table, thereby deleting the reference relationship between Draft A and all resources.

[0075] Step S205: for any resource in the resource table, determine whether there is a reference relationship between the resource and the draft in the updated draft-resource reference relationship table.

[0076] When the reference relationship between a draft and a resource changes, there may be a situation where a resource is not referenced by any draft. This resource is a useless redundant resource, which causes platform memory storage redundancy. To address the above problem, after the reference relationship between a draft and a resource is updated, a traversal operation can be performed based on the updated draft-resource reference relationship table and resource table.

[0077] Specifically, the resource table is traversed, and for a resource in the resource table, a reference relationship between the resource and the draft is searched in the draft-resource reference relationship table. If the resource table contains resource 1, the draft-resource reference relationship table is searched to see if there is a draft-resource reference relationship related to resource 1. If the draft-resource reference relationship table contains data of resource 1-draft A, it means that there is a reference relationship between the resource and the draft, and there is no need to process resource 1. The resource table is traversed continuously to obtain the next resource for judgment; if the draft-resource reference relationship table does not contain data of resource 1, it means that resource 1 has no reference relationship with any draft, and resource 1 is a useless redundant resource, and step S206 is executed.

[0078] The resource table is traversed, and the draft-resource reference relationship table is queried for any resource in the resource table. If there is a reference relationship between the resource and the draft, no processing is required; if there is no resource data, step S206 is executed.

[0079] Step S206, deleting resources in the resource table, building a platform-private resource deletion method based on the cross-platform component according to the cross-platform resource protocol, and calling the platform-private resource deletion method through the platform internal notification to delete the resources.

[0080] If the resource data does not exist in the draft-resource reference relationship table, the resource will be deleted from the resource table, and the resources imported into the platform will also need to be deleted at the same time. When deleting resources imported into the platform, you need to call the platform's private resource deletion method to complete it. The private resource deletion method is based on the cross-platform resource protocol and is implemented based on cross-platform component construction to ensure the uniformity of the processing mechanisms of each platform. The platform's private resource deletion method is implemented based on the specific implementation situation and is not limited here.

[0081] When deleting resources, after determining the resources to be deleted, the platform's private resource deletion method can be called through the platform's internal notification to delete the resources to be deleted, thereby reducing redundant usage of the platform's memory.

[0082] Optionally, from the import of resources to the deletion of resources, Figure 3As shown, the user operation can select or specify the imported resources. Each platform editor obtains the referenced resource information based on the reference relationship between the draft and the resource, and notifies the loader (BundleLoader) internally to notify the resource to be imported into the platform private sandbox. The loader can first determine the resource type, such as audio, picture, video, etc., call the platform private resource import method, import it into the sandbox, and the resource will be stored in the platform private sandbox. The loader returns the result to the platform editor, and the platform editor can quickly load and display the resources imported from the platform private sandbox. The user performs the draft editing operation based on the platform editor. After the editing is completed, the platform editor notifies to save the draft. At the same time, according to the edited draft, the resource reference difference before and after the editing can be determined by using a differential algorithm, etc., and the corresponding notification database is updated to update the draft-resource reference relationship table and the resource table. The update of the resource table will involve traversing the resource table, finding whether there are resources without draft references, deleting resources without draft references, etc. Here, the deletion of resources is not shown in the figure, and you can refer to the processing of deleting resources by the cache manager after the draft is deleted. Users can also directly delete drafts. When a draft is deleted, the database can directly notify the cache manager (CacheManager) that the reference relationship needs to be deleted based on the deleted draft, delete the draft-resource reference relationship, traverse the resources, and delete the resources that have no draft references. The above operations can first process the draft-resource reference relationship table, delete the reference relationship between the deleted draft and the resources it references, and then further traverse the resource table to determine the resources that have no draft references. The resources that have no draft references are also deleted one by one by calling the platform's private resource deletion method. After deletion, the database can be informed to call back the deletion result. The above process is an example, and it is set according to the implementation situation, and is not limited here.

[0083] Furthermore, in addition to a unified processing mechanism, the cross-platform resource protocol used in this embodiment also facilitates the situation when drafts may be processed by editors of different platforms. Since the processing mechanisms of each platform are unified, the same draft can be displayed normally in editors of different platforms when processed and reviewed by editors of different platforms without being restricted by the platform.

[0084] According to the cross-platform editing resource management method provided by this application, a cross-platform resource protocol is used to unify the functional interfaces of each platform, and the interface implementation of each platform is completed based on the cross-platform component to ensure the unification of the processing mechanism of each platform. When importing resources, they can be imported into the platform's private sandbox through the platform's private resource import method. When the editor is running, the resources can be directly obtained from the platform's private sandbox to improve the operation effect and performance. When performing operations such as editing and deleting on the draft, the draft-resource reference relationship table is updated according to the reference relationship between the draft and the resource, and the resource table is traversed to delete the resources that are not referenced by the draft in time to avoid useless resources from occupying memory and reduce memory redundancy.

[0085] Figure 4 FIG. 1 is a schematic diagram showing the structure of a cross-platform editing resource management device provided by an embodiment of the present application. Figure 4 As shown, the device comprises:

[0086] A protocol module 410, adapted to construct a cross-platform resource protocol;

[0087] An import module 420, adapted to import resources into any platform based on a cross-platform component according to a cross-platform resource protocol;

[0088] The editing module 430 is adapted to perform an editing operation on the selected draft and update the reference relationship between the draft and the referenced resource according to the editing operation;

[0089] The deletion module 440 is adapted to delete the resource according to the cross-platform resource protocol based on the cross-platform component according to the reference relationship between the updated draft and the resource if there is a resource that has no reference relationship with each draft.

[0090] Optionally, the device also includes: a storage table module 450, suitable for constructing a draft-resource reference relationship table and a resource table; wherein the draft-resource reference relationship table records the reference relationship between the draft and the resource; a resource has a reference relationship with one or more drafts.

[0091] Optionally, the import module 420 is further adapted to:

[0092] For any platform, a platform-specific resource import method is built based on cross-platform components according to the cross-platform resource protocol;

[0093] Call the platform's private resource import method through the platform's internal notification to import resources into the platform's private sandbox.

[0094] Optionally, the editing module 430 is further adapted to:

[0095] According to the selected draft, the draft-resource reference relationship table is searched, and the resources having a reference relationship with the draft are obtained and displayed in the draft;

[0096] The draft is edited, and the draft-resource reference relationship table is updated according to the resources referenced by the edited draft.

[0097] Optionally, the editing module 430 is further adapted to:

[0098] Perform resource modification operations on the draft to obtain an edited draft; the resource modification operations include resource addition operations, resource attribute modification operations and / or resource deletion operations;

[0099] The resource reference difference information before and after the draft editing is calculated using a differential algorithm, and the reference relationship in the draft-resource reference relationship table is updated based on the resource reference difference information; the resource reference difference information includes: new reference resources and / or deleted resources; the update includes: generating a reference relationship between the draft and the new reference resources and / or deleting the reference relationship between the draft and the deleted resources.

[0100] Optionally, the editing module 430 is further adapted to:

[0101] Delete the draft and delete the reference relationship between the draft and each resource in the draft-resource reference relationship table.

[0102] Optionally, the deletion module 440 is further adapted to:

[0103] For any resource in the resource table, determine whether there is a reference relationship between the resource and the draft in the updated draft-resource reference relationship table;

[0104] If not, delete the resources in the resource table, build a platform-private resource deletion method based on the cross-platform resource protocol and the cross-platform component, and call the platform-private resource deletion method through the platform's internal notification to delete the resources.

[0105] The description of each module above refers to the corresponding description in the method embodiment and will not be repeated here.

[0106] According to the cross-platform editing resource management device provided by the present application, the reference relationship between the draft and the resource and the resource are managed. When the resource is no longer referenced by the draft, the resource is deleted, which can avoid redundant resources occupying memory storage. Furthermore, the cross-platform resource protocol is adopted and completed based on the cross-platform component, which can achieve unambiguity in the overall core logic and ensure the unified mechanism when processing multiple platforms.

[0107] The present application also provides a non-volatile computer storage medium, which stores at least one executable instruction, and the executable instruction can execute operations corresponding to the cross-platform clip resource management method in any of the above method embodiments.

[0108] The present application also provides a computer program product, which includes at least one executable instruction or computer program, and the executable instruction or computer program can enable a processor to perform operations corresponding to the cross-platform clip resource management method in any of the above method embodiments.

[0109] Figure 5 A schematic diagram of the structure of a computing device according to an embodiment of the present application is shown. The specific embodiment of the present application does not limit the specific implementation of the computing device.

[0110] like Figure 5 As shown, the computing device may include: a processor (processor) 502 , a communications interface (Communications Interface) 504 , a memory (memory) 506 , and a communication bus 508 .

[0111] in:

[0112] The processor 502 , the communication interface 504 , and the memory 506 communicate with each other via a communication bus 508 .

[0113] The communication interface 504 is used to communicate with other devices such as clients or other servers.

[0114] The processor 502 is used to execute the program 510, and specifically can execute the relevant steps in the above-mentioned cross-platform clip resource management method embodiment.

[0115] Specifically, the program 510 may include program codes, which include computer operation instructions.

[0116] The processor 502 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the present application. The one or more processors included in the computing device may be processors of the same type, such as one or more CPUs; or may be processors of different types, such as one or more CPUs and one or more ASICs.

[0117] The memory 506 is used to store the program 510. The memory 506 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0118] The program 510 can be specifically used to enable the processor 502 to execute the cross-platform clip resource management method in any of the above-mentioned method embodiments. The specific implementation of each step in the program 510 can refer to the corresponding descriptions in the corresponding steps and units in the above-mentioned cross-platform clip resource management embodiments, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-mentioned devices and modules can refer to the corresponding process description in the above-mentioned method embodiments, which will not be repeated here.

[0119] The algorithm or display provided here is not inherently related to any specific computer, virtual system or other device. Various general systems can also be used together with the teaching based on this. According to the above description, it is obvious to construct the structure required for this type of system. In addition, the application is not directed to any specific programming language either. It should be understood that various programming languages ​​can be utilized to realize the content of the application described here, and the above description of specific languages ​​is to disclose the preferred embodiment of the application.

[0120] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0121] Similarly, it should be understood that in order to streamline the present application and help understand one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be interpreted as reflecting the following intention: the claimed application requires more features than the features clearly stated in each claim. More specifically, as reflected in the claims below, the inventive aspects are less than all the features of the single embodiment disclosed above. Therefore, the claims following the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the present application.

[0122] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0123] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present application and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.

[0124] The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components of the present application. The present application can also be implemented as a device or apparatus program (e.g., computer program and computer program product) for executing a part or all of the methods described herein. Such a program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0125] It should be noted that the above embodiments illustrate the present application rather than limit the present application, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be constructed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of multiple such elements. The present application may be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim that lists several devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.

Claims

1. A cross-platform editing resource management method, comprising: Build a cross-platform resource protocol; For any platform, importing resources into the platform based on the cross-platform component according to the cross-platform resource protocol; Performing a clipping operation on the selected draft, and updating a reference relationship between the draft and the referenced resource according to the clipping operation; According to the reference relationship between the updated drafts and the resources, if there are resources that have no reference relationship with the drafts, the resources are deleted according to the cross-platform resource protocol based on the cross-platform component.

2. The method according to claim 1, wherein: The method further comprises: A draft-resource reference relationship table and a resource table are constructed; wherein the draft-resource reference relationship table records the reference relationship between a draft and a resource; a resource has a reference relationship with one or more drafts.

3. The method according to claim 1 or 2, wherein: For any platform, importing resources into the platform based on the cross-platform component according to the cross-platform resource protocol further includes: For any platform, a platform-private resource import method is constructed based on the cross-platform components according to the cross-platform resource protocol; Call the platform's private resource import method through the platform's internal notification to import resources into the platform's private sandbox.

4. The method according to any one of claims 1 to 3, wherein: The performing of a clipping operation on the selected draft and updating the reference relationship between the draft and the referenced resource according to the clipping operation further comprises: According to the selected draft, searching the draft-resource reference relationship table, obtaining and displaying in the draft the resources having a reference relationship with the draft; The draft is edited, and the draft-resource reference relationship table is updated according to the resources referenced by the edited draft.

5. The method according to claim 4, wherein: The editing operation on the draft and updating the draft-resource reference relationship table according to the resources referenced by the edited draft further comprises: Performing a resource modification operation on the draft to obtain an edited draft; the resource modification operation includes a resource adding operation, a resource attribute modifying operation and / or a resource deleting operation; A differential algorithm is used to calculate the resource reference difference information before and after the draft is edited, and the reference relationship in the draft-resource reference relationship table is updated according to the resource reference difference information; the resource reference difference information includes: new reference resources and / or deleted resources; the update includes: generating a reference relationship between the draft and the new reference resources and / or deleting the reference relationship between the draft and the deleted resources.

6. The method according to claim 4, wherein: The editing operation on the draft and updating the draft-resource reference relationship table according to the resources referenced by the edited draft further comprises: A manuscript deletion operation is performed on the draft, and the reference relationship between the draft and each resource in the draft-resource reference relationship table is deleted.

7. The method according to any one of claims 1 to 6, wherein: According to the reference relationship between the updated draft and the resource, if there is a resource with no reference relationship between the drafts, deleting the resource according to the cross-platform resource protocol based on the cross-platform component further includes: For any resource in the resource table, determine whether there is a reference relationship between the resource and the draft in the updated draft-resource reference relationship table; If not, delete the resources in the resource table, build a platform-private resource deletion method based on the cross-platform component according to the cross-platform resource protocol, and call the platform-private resource deletion method through platform internal notification to delete the resources.

8. A cross-platform editing resource management device, comprising: Protocol module, suitable for building cross-platform resource protocols; An import module, adapted to import resources into any platform based on the cross-platform component according to the cross-platform resource protocol; A clipping module, adapted to perform a clipping operation on the selected draft, and update a reference relationship between the draft and the referenced resource according to the clipping operation; The deletion module is adapted to delete the resource according to the cross-platform resource protocol based on the cross-platform component, according to the reference relationship between the updated draft and the resource, if there is a resource that has no reference relationship with each draft.

9. A computing device comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the cross-platform clip resource management method according to any one of claims 1-7.

10. A computer storage medium, wherein at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to execute operations corresponding to the cross-platform clip resource management method according to any one of claims 1-7.

11. A computer program product, comprising at least one executable instruction, wherein the executable instruction enables a processor to execute operations corresponding to the cross-platform clip resource management method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device based on web cross-platform and splicing wall interaction

    CN103152429A

  • Resource updating method and system for mixed APP application program

    CN108304207A

  • Redundant resource removal method and device

    CN110147237A

  • Material management method and system based on file direct connection technology

    CN115623240A

  • Material management method and device, computing equipment and computer storage medium

    CN118102020A