Method, system and equipment for processing picture video with authority authentication in rich text and medium
By adding permission metadata during the rich text editing stage and performing real-time authentication during client-side parsing, combined with a multi-factor evaluation model, and dynamically selecting content processing strategies, the problem of separating permission control and display of multimedia content in rich text is solved, achieving fine-grained protection and user-friendly multimedia content display.
Patent Information
- Application Number
- CN202511454191.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-13
- Publication Date
- 2026-02-03
AI Technical Summary
In existing rich text processing solutions, access control for multimedia content is separated from content display, lacking dynamic adaptability. This leads to unauthorized access and impaired user experience, resulting in high system complexity and difficulty in achieving fine-grained, high-strength multimedia content protection.
During the rich text editing stage, image and video resources are automatically identified, permission metadata tags are added, and real-time permission authentication is performed during client-side parsing. A multi-factor weight evaluation model is used to dynamically select content processing strategies, including original resource display, downgraded display, or watermark addition. The HMAC-SHA256 algorithm ensures the immutability of metadata.
It achieves fine-grained, high-strength multimedia content protection, maintains the integrity of rich text content and user experience, reduces system load, improves response speed, prevents URL forgery access, and provides tiered access control.
Smart Images

Figure CN121456854A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of rich text processing and digital rights management, specifically to a method, system, device, and medium for processing images and videos with access control authentication within rich text. Background Technology
[0002] With the development of internet technology, rich text content has become one of the main forms of information dissemination. Among them, images and videos, as important multimedia elements, have increasingly highlighted the need for copyright protection and security control.
[0003] Currently, mainstream rich text processing solutions (such as HTML5-based editors and various CMS systems) primarily focus on content editing and display functions, with relatively weak access control for embedded multimedia content. Common methods include: ① Basic access control: Returning the entire rich text content after server-side permission verification, but lacking fine-grained control over multimedia resources. ② Simple resource isolation: Storing restricted resources in a specific directory or using obfuscated URLs, but this method has low security and is easily bypassed. ③ External DRM systems: Using digital rights management technology for individual video or image files, but failing to deeply integrate with the rich text environment, disrupting content continuity.
[0004] In existing technologies, the processing of multimedia content in rich text mainly suffers from the following problems and shortcomings:
[0005] ① Separation of access control and content display: Access verification is usually completed before content is obtained. Once the rich text content contains multimedia resources and is sent to the client, the embedded multimedia resources lack continuous access control, which can easily lead to unauthorized access and content leakage.
[0006] ② Lack of dynamic adaptability: Existing solutions are unable to dynamically adjust the display format and processing method of multimedia content based on user identity, time factors, environmental factors, etc.
[0007] ③ Redundant and complex technical solutions: To achieve access control, it is often necessary to introduce complex system architectures, such as separate resource servers and permission verification servers, which increases system complexity and maintenance costs.
[0008] ④ Degraded user experience: Traditional access control schemes often directly deny access to restricted resources, failing to provide tiered alternatives, such as how to display downgraded content or prompts to unauthorized users.
[0009] Therefore, how to achieve fine-grained, high-strength multimedia content protection while maintaining the integrity of rich text content and user experience is a technical problem that urgently needs to be solved. Summary of the Invention
[0010] The technical objective of this invention is to provide a method, system, device, and medium for processing images and videos with access control authentication within rich text, in order to address the problem of how to achieve fine-grained, high-strength multimedia content protection while maintaining the integrity of rich text content and user experience.
[0011] The technical objective of this invention is achieved as follows: a method for processing images and videos with authentication permissions within rich text, the specific method of which is as follows:
[0012] During the rich text editing and saving stage, the system automatically identifies image and video media resources in the rich text, extracts and parses the media resources, performs permission authentication on the parsed media resources and uploads them, and adds metadata tags containing permission policies to each media resource after uploading.
[0013] When parsing rich text on the client side, extract and validate metadata tags;
[0014] Based on the permission information contained in the metadata tag, the permission authentication service initiates a permission authentication request. The permission authentication service performs a multi-factor evaluation based on user identity, resource permission policy and context environment, and returns a tiered permission level.
[0015] Based on the authorization authentication results, the content processing strategy is dynamically selected. The content processing strategies include displaying the original resource, downgrading the display, adding a watermark, or replacing the content display.
[0016] The processed content is rendered and output to the rich text display area.
[0017] As a preferred approach, the metadata tags combine structured annotation tags with digital signatures to embed access control information into rich text, ensuring that the metadata neither affects content display nor is difficult to tamper with. The metadata tags include resource identifiers, access policy identifiers, and digital signatures. The digital signature is generated using the HM AC-SHA256 algorithm to ensure that the metadata is immutable. The signature key is rotated periodically, and the digital signature is used to verify the integrity and authenticity of the metadata.
[0018] More preferably, the metadata tag should take the following form:
[0019] <! --{tagContent:" <img alt=\"\"data-href=\"\"style=\"width:619.00px;height:412.25px;\"> ",tagIndex:15,resourceId:"abc123",policyId:"p1",sign:"md5hash"}-->;
[0020] Among them, tagContent represents the original settings of media resource tags in the rich text, saving image tags, video tags, and audio tags; tagIndex represents the position of the media tag; resourceId represents the media resource number; policyId represents the rich text number; and sign represents the signature.
[0021] Better still, the authorization service uses a multi-factor weighted evaluation model, which calculates a weight score by combining the weight of user role, time factor, environmental risk, and behavioral history, and determines different authorization levels based on the score range.
[0022] Even better, the content processing strategy is dynamically selected as follows:
[0023] When the permission level is fully authorized, the original high-quality media resources are displayed directly, which is the highest level of processing.
[0024] When the permission level is partial authorization, the resources are displayed after being downgraded, including reducing the resolution, compressing the quality, or shortening the duration, so that users can see the resources but their usage permissions are restricted.
[0025] When the permission level is restricted, resources with visible watermarks or copyright information are displayed, and users see restricted resources that are obscured by the watermark.
[0026] When the permission level is "No authorization", alternative content or permission prompts are displayed, such as a "No permission to view" prompt image or a gray placeholder box replacing the original resource, to prevent users from seeing unauthorized content.
[0027] More preferably, the multi-factor weighted evaluation model dynamically calculates the user's access authorization level to resources by defining a permission evaluation function `permission_evaluate`, as follows:
[0028] Calculate the base permission weight: Based on the user role, call the get_role_weight function to get the role weight value get_role_weight(user.role), multiply it by a coefficient of 40% to get the base weight base_weight t, the formula is: base_weight=get_role_weight(user.role)*0.4;
[0029] Calculate the time factor weight: Based on the resource's time policy (such as access time restrictions), calculate the time compliance weight using the `calculate_time_factor(resource.time_policy)` function, multiply it by a 20% coefficient to obtain the time weight `time_weight`. The formula is: `time_weight = calculate_time_factor(resource.time_policy) * 0.2`.
[0030] Calculate the environmental risk weight: Combine the current context (such as access environment, network location, device security status), evaluate the environmental risk level using the assess_environment_risk function assess_environment_risk(context), and multiply by a 20% coefficient to obtain the environmental risk weight env_weight. The formula is: env_weight = assess_environment_risk(context) * 0.2;
[0031] Calculate historical behavior weight: Analyze users' historical behavior records (such as access frequency, abnormal operations), generate a behavior credibility score evaluate_user_behavior(user.history) using the evaluate_user_behavior function, and multiply it by a 20% coefficient to obtain the historical behavior weight behavior_weight. The formula is: behavior_weight = evaluate_user_behavior(user.history) * 0.2;
[0032] Calculate the overall score: The overall score, total_score, is obtained by adding the four weights: basic permission weight, time factor weight, environmental risk weight, and behavior history weight. The formula is: total_score = basic permission weight + time_weight + environmental_weight + behavior_weight;
[0033] The permission level is determined based on the range of the total score.
[0034] More preferably, the permission level is determined based on the range of the total score, as follows:
[0035] When the total score is ≥90, the permission level is full access.
[0036] When the total score is 70-89, the access level is restricted downgraded access.
[0037] When the total score is 50-69, the access level is limited access with watermark (watermarked termark_access);
[0038] When the total score is less than 50, the access level is denied (no_access).
[0039] A rich text image and video processing system with access control authentication is provided. This system implements the rich text image and video processing method with access control authentication as described above. The system includes:
[0040] The permission metadata injection module is used to automatically identify image and video media resources in rich text during the rich text editing and saving stage, and add invisible metadata tags containing resource identifiers, permission policy IDs and integrity verification values to them.
[0041] A rich text parsing engine is used to identify multimedia resource metadata when parsing rich text content on the client side and to intercept the direct loading behavior of traditional browsers.
[0042] The authorization service module provides a lightweight RESTful API interface to receive user credentials and resource permission information submitted by the client and return detailed access authorization results.
[0043] The dynamic content processing module is used to select the appropriate content processing strategy based on the authorization authentication result, including displaying the original resource, downgrading the display, adding watermarks, or replacing the content display.
[0044] An electronic device includes: a memory and at least one processor;
[0045] The memory contains computer programs;
[0046] The at least one processor executes the computer program stored in the memory, causing the at least one processor to perform the image and video processing method with authorization authentication in rich text as described above.
[0047] A computer-readable storage medium storing a computer program that can be executed by a processor to implement the image and video processing method with authentication in rich text as described above.
[0048] The image and video processing method, system, device, and medium with access authentication in rich text of the present invention have the following advantages:
[0049] (I) This invention achieves fine-grained permission control of multimedia content in rich text by parsing resources and performing permission authentication during the rich text editing stage, embedding permission metadata after uploading, performing real-time permission authentication during the parsing stage, and dynamically selecting content processing strategies based on the authentication results. This solves the technical problem of separating permission control from content display, provides a tiered authorization experience, and significantly reduces system load and response latency. It can be widely used in scenarios that require rich text content security control, such as content management systems, online document editing platforms, digital education resource distribution, and enterprise knowledge bases.
[0050] (II) This invention introduces a real-time permission authentication mechanism during the rich text parsing and rendering process, and dynamically selects content processing strategies based on the authentication results to achieve fine-grained and high-strength multimedia content protection, while maintaining the integrity of the rich text content and user experience. It solves the problem of dynamic permission authentication and adaptive processing of embedded image and video content in rich text.
[0051] (III) This invention achieves seamless integration of permission authentication and rich text rendering process through metadata injection and dynamic parsing technology, solves the technical problem of separation of permission control and content display in traditional solutions, improves the overall system and security, and thus achieves deep integration of permission control and rich text content.
[0052] (iv) The present invention dynamically selects different content processing strategies based on the permission authentication results, which can provide multi-level and gradient permission control effects. It protects content security while taking into account user experience, which is something that traditional "all or nothing" permission control schemes cannot achieve. It improves the adaptive content processing capabilities.
[0053] (V) This invention adopts a combination of client-side parsing and lightweight API calls, which avoids the server bandwidth pressure and response delay caused by a large number of resource forwarding in traditional solutions. Experimental data shows that, in typical application scenarios, this invention reduces server load by about 40% and improves response speed by about 30% compared with traditional resource proxy solutions, significantly optimizing system performance.
[0054] (vi) This invention effectively prevents common bypass methods such as URL forgery and direct link access by combining digital signature, integrity verification and dynamic authentication, thereby improving the security of multimedia content and making it more resistant to bypass.
[0055] (vii) This invention does not rely on specific browser plugins or client software. It is implemented based on standard HTML and JavaScript technology and can be smoothly integrated with existing rich text editing systems and content management systems. At the same time, it supports flexible expansion of new permission policies and content processing methods, giving it good compatibility and scalability.
[0056] (viii) The permission authentication service of the present invention adopts a batch authentication method, which sends all resources in the rich text that require permission control to the authentication service at one time, reducing the number of network requests and improving processing efficiency. Attached Figure Description
[0057] The invention will be further described below with reference to the accompanying drawings.
[0058] Appendix Figure 1 A flowchart illustrating the process of saving to rich text;
[0059] Appendix Figure 2 A flowchart illustrating the process of rich text parsing;
[0060] Appendix Figure 3 A flowchart illustrating the process of embedding metadata tags;
[0061] Appendix Figure 4 This is a diagram illustrating a dynamic content processing strategy. Detailed Implementation
[0062] The following detailed description of the image and video processing method, system, device, and medium with access authentication in rich text, based on the accompanying drawings and specific embodiments of the present invention, is provided with reference to the accompanying drawings.
[0063] Example 1:
[0064] As attached Figure 1 and 2 As shown in the figure, this embodiment provides a method for processing images and videos with permission authentication in rich text. The method is as follows:
[0065] S1. During the rich text editing and saving stage, automatically identify image and video media resources in the rich text, extract the parsed media resources, perform permission authentication on the parsed media resources and upload them, and add metadata tags containing permission policies to each media resource after uploading.
[0066] S2. When parsing rich text on the client side, extract and verify metadata tags;
[0067] S3. Initiate an authorization authentication request based on the authorization information contained in the metadata tag. The authorization authentication service performs multi-factor evaluation based on user identity, resource authorization policy and context environment, and returns a tiered authorization level.
[0068] S4. Based on the authorization authentication result, dynamically select the content processing strategy. The content processing strategy includes displaying the original resource, downgrading the display, adding a watermark, or replacing the content display.
[0069] S5. Render the processed content and output it to the rich text display area.
[0070] As attached Figure 3 As shown, the metadata tags in this embodiment combine structured annotation tags with digital signatures to embed access control information into rich text, ensuring that the metadata neither affects content display nor is easily tampered with. The metadata tags include resource identifiers, access policy identifiers, and digital signatures. The digital signature is generated using the HMAC-SHA256 algorithm to ensure the metadata is immutable. The signature key is rotated periodically, and the digital signature is used to verify the integrity and authenticity of the metadata. The specific form of the metadata tags is as follows:
[0071] <! --{tagContent:" <img alt=\"\"data-href=\"\"style=\"width:619.00px;height:412.25px;\"> ",tagIndex:15,resourceId:"abc123",policyId:"p1",sign:"md5hash"}-->;
[0072] Among them, tagContent represents the original settings of media resource tags in the rich text, saving image tags, video tags, and audio tags; tagIndex represents the position of the media tag; resourceId represents the media resource number; policyId represents the rich text number; and sign represents the signature.
[0073] In this embodiment, the authorization service adopts a multi-factor weight evaluation model, which calculates a weight score by comprehensively considering the weight of user role, time factor, environmental risk, and behavioral history, and determines different authorization levels based on the score range.
[0074] As attached Figure 4 As shown, the dynamic content selection processing strategy in this embodiment is as follows:
[0075] When the permission level is fully authorized, the original high-quality media resources are displayed directly, which is the highest level of processing.
[0076] When the permission level is partial authorization, the resources are displayed after being downgraded, including reducing the resolution, compressing the quality, or shortening the duration, so that users can see the resources but their usage permissions are restricted.
[0077] When the permission level is restricted, resources with visible watermarks or copyright information are displayed, and users see restricted resources that are obscured by the watermark.
[0078] When the permission level is "No authorization", alternative content or permission prompts are displayed, such as a "No permission to view" prompt image or a gray placeholder box replacing the original resource, to prevent users from seeing unauthorized content.
[0079] The multi-factor weighted evaluation model in this embodiment dynamically calculates the user's access authorization level to resources by defining a permission evaluation function permission_evaluate, as follows:
[0080] ① Calculate the base permission weight: Based on the user role, call the get_role_weight function to get the role weight value get_role_weight(user.role), multiply it by a coefficient of 40% to get the base weight base_weight, the formula is: base_weight=get_role_weight(user.role)*0.4;
[0081] ② Calculate the time factor weight: Based on the resource's time policy (such as access time restrictions), calculate the time compliance weight using the calculate_time_factor function (calculate_time_factor(resource.time_policy)). Multiply this weight by a 20% coefficient to obtain the time weight (time_weight). The formula is: time_weight = calculate_time_factor(resource.time_policy) * 0.2.
[0082] ③ Calculate the environmental risk weight: Combine the current context (such as access environment, network location, device security status), evaluate the environmental risk level using the assess_environment_risk function assess_environment_risk(context), and multiply by a 20% coefficient to obtain the environmental risk weight env_weight. The formula is: env_weight = assess_environment_risk(context) * 0.2;
[0083] ④ Calculate historical behavior weight: Analyze users' historical behavior records (such as access frequency, abnormal operations), generate a behavior credibility score evaluate_user_behavior(user.history) using the evaluate_user_behavior function, and multiply it by a 20% coefficient to obtain the historical behavior weight behavior_weight. The formula is: behavior_weight = evaluate_user_behavior(user.history) * 0.2;
[0084] ⑤ Calculate the overall score: Add the four weights, namely base_weight, time_weight, environmental_risk_weight and behavior_weight, to obtain the overall score total_score. The formula is: total_score = base_weight + time_weight + environmental_weight + behavior_weight;
[0085] ⑥ Determine the permission level based on the score range of the total_score.
[0086] In this embodiment, step ⑥, determining the permission level based on the range of the total_score, is as follows:
[0087] When the total score is ≥90, the permission level is full access.
[0088] When the total score is 70-89, the access level is restricted downgraded access.
[0089] When the total score is 50-69, the access level is limited access with watermark (watermarked termark_access);
[0090] When the total score is less than 50, the access level is denied (no_access).
[0091] The access control service uses a multi-factor weighted evaluation model to calculate access scores based on factors such as user role, time range, access frequency, and security environment. Different authorization levels are returned according to the score range. Key code snippets are as follows:
[0092]
[0093]
[0094] Example 2:
[0095] This embodiment provides a rich text image and video processing system with access control authentication. This system implements the rich text image and video processing method with access control authentication as described in Embodiment 1. The system includes:
[0096] The permission metadata injection module is used to automatically identify image and video media resources in rich text during the rich text editing and saving stage, and add invisible metadata tags containing resource identifiers, permission policy IDs and integrity verification values to them.
[0097] A rich text parsing engine is used to identify multimedia resource metadata when parsing rich text content on the client side and to intercept the direct loading behavior of traditional browsers.
[0098] The authorization service module provides a lightweight RESTful API interface to receive user credentials and resource permission information submitted by the client and return detailed access authorization results.
[0099] The dynamic content processing module is used to select the appropriate content processing strategy based on the authorization authentication result, including displaying the original resource, downgrading the display, adding watermarks, or replacing the content display.
[0100] The working process of this system is as follows:
[0101] (1) During the rich text saving process, as shown in the attached document... Figure 1 As shown, the media resources in the rich text are first parsed, the parsed media resources are extracted, and permission authentication is performed before uploading. After successful upload, the metadata is processed in the following form: <!--{tagContent:" <img alt=\"\"data-href=\"\"style=\"width:619.00px;height:412.25px;\"> The rich text editor uses a digital signature (`tagContent:tagIndex:15,resourceId:"abc123",policyId:"p1",sign:"md5hash"`) to store the media resource tags. `tagContent` represents the original settings for media resource tags in the rich text editor, which can save image tags, video tags, and other tags such as audio. `tagIndex` represents the media tag position, `resourceId` represents the media resource number, `policyId` represents the rich text editor number, and `sign` represents the signature. The digital signature is generated using the HMAC-SHA256 algorithm to ensure the metadata is immutable, and the signature key is rotated periodically. After processing, the signature is inserted into the rich text editor to complete the saving of the rich text content.
[0102] (2) When displaying rich text content, as shown in the attached document... Figure 2 As shown, the process first initiates rich text loading and parses resource and permission information. After loading, all multimedia resources (such as a specific image or video) are identified from the rich text, and the "permission metadata" inherent in these resources is extracted to prepare for subsequent permission verification.
[0103] (3) Initiate an authentication request and wait for the server to make a judgment. After completing the resource parsing, the system will initiate an authentication request to the authentication server, that is, send the extracted permission metadata and the current user's information (such as user identity and existing permissions) to the authentication server so that the server can determine whether the user has permission to access these multimedia resources.
[0104] (4) Process resources corresponding to different permissions based on the authentication results: The authentication server will return different verification results, as shown in the attached figure. Figure 4 As shown, the system will perform different resource processing for each result:
[0105] Verification passed (full permissions): The system will directly obtain the original high-definition images and complete, watermark-free videos. This is the highest level of processing permission.
[0106] Partial authorization (low privileges): The system will display downgraded resources, including reduced resolution, compressed quality, or shortened duration, allowing users to see the resources while restricting their usage rights;
[0107] Restricted authorization (low privileges): The system will display resources with visible watermarks or copyright information, allowing users to see restricted resources that are obscured by the watermark;
[0108] Verification failed (no permission): The system will replace the original resource with a "No permission to view" prompt image and a gray placeholder box to prevent users from seeing unauthorized content.
[0109] (5) Unify rendering resources to present the final rich text interface. Regardless of whether the previous step obtained the original resources, downgraded resources, or replacement content, the processed resources will eventually be rendered to the rich text interface. That is, these processed contents (high-definition images / low-definition images / placeholder images, etc.) are integrated into the rich text to form the complete interface that the user finally sees, ensuring the closed loop of the entire loading process.
[0110] Example 3:
[0111] This embodiment also provides an electronic device, including: a memory and a processor;
[0112] The memory stores the instructions executed by the computer.
[0113] The processor executes computer execution instructions stored in the memory, causing the processor to perform the image and video processing method with authorization authentication in rich text in any embodiment of the present invention.
[0114] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor can be a microprocessor or any conventional processor.
[0115] Memory can be used to store computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory, and by accessing data stored in the memory. Memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, at least one application program required for a function, etc.; the data storage area can store data created based on the use of the terminal, etc. In addition, memory can also include high-speed random access memory, and can also include non-volatile memory, such as hard disks, RAM, plug-in hard disks, smart memory cards (SMC), secure digital cards (SD cards), flash memory cards, at least one disk storage device, flash memory device, or other volatile solid-state storage devices.
[0116] Example 4:
[0117] This embodiment also provides a computer-readable storage medium storing multiple instructions, which are loaded by a processor to cause the processor to execute the image and video processing method with authentication in rich text as described in any embodiment of the present invention. Specifically, a system or apparatus equipped with a storage medium may be provided, on which software program code implementing the functions of any of the above embodiments is stored, and the computer (or CPU or MPU) of the system or apparatus may read and execute the program code stored in the storage medium.
[0118] In this case, the program code read from the storage medium can itself implement the function of any of the above embodiments, and therefore the program code and the storage medium storing the program code constitute part of the present invention.
[0119] Storage media embodiments for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RYM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer via a communication network.
[0120] Furthermore, it should be clear that not only can the program code read by the computer be executed, but also the operating system or other components operating on the computer can be instructed based on the program code to perform some or all of the actual operations, thereby realizing the function of any of the embodiments described above.
[0121] Furthermore, it is understood that the program code read from the storage medium is written to the memory set in the expansion board inserted into the computer or to the memory set in the expansion unit connected to the computer. Then, based on the instructions of the program code, the CPU or other components installed on the expansion board or expansion unit execute some and all of the actual operations, thereby realizing the function of any of the embodiments described above.
[0122] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for processing images and videos with permission authentication in rich text, characterized in that, The method is as follows: During the rich text editing and saving stage, the system automatically identifies image and video media resources in the rich text, extracts and parses the media resources, performs permission authentication on the parsed media resources and uploads them, and adds metadata tags containing permission policies to each media resource after uploading. When parsing rich text on the client side, extract and validate metadata tags; Based on the permission information contained in the metadata tag, the permission authentication service initiates a permission authentication request. The permission authentication service performs a multi-factor evaluation based on user identity, resource permission policy and context environment, and returns a tiered permission level. Based on the authorization authentication results, the content processing strategy is dynamically selected. The content processing strategies include displaying the original resource, downgrading the display, adding a watermark, or replacing the content display. The processed content is rendered and output to the rich text display area.
2. The method for processing images and videos with authentication in rich text as described in claim 1, characterized in that, Metadata tags combine structured annotation tags with digital signatures to embed access control information into rich text, ensuring that metadata does not affect content display and is difficult to tamper with. Metadata tags include resource identifiers, access policy identifiers, and digital signatures. The digital signature is generated using the HMAC-SHA 256 algorithm to ensure that the metadata is immutable. The signature key is rotated periodically, and the digital signature is used to verify the integrity and authenticity of the metadata.
3. The method for processing images and videos with authentication in rich text as described in claim 1 or 2, characterized in that, The specific form of metadata tags is as follows: <!--{tagContent:" <img alt=\"\"data-href=\"\"style=\"width:619.00px;height:412.25px;\"> ",tagIndex:15,resourceId:"abc123",policyId:"p1",sign:"md5hash"}-->; Among them, tagContent represents the original settings of media resource tags in the rich text, saving image tags, video tags, and audio tags; tagIndex represents the position of the media tag; resourceId represents the media resource number; policyId represents the rich text number; and sign represents the signature.
4. The method for processing images and videos with authentication in rich text as described in claim 3, characterized in that, The authorization service uses a multi-factor weighted evaluation model, which calculates a weight score by combining the weight of user role, time factor, environmental risk, and behavioral history. Different authorization levels are determined based on the score range.
5. The method for processing images and videos with authentication in rich text as described in claim 4, characterized in that, The dynamic content processing strategy is as follows: When the permission level is fully authorized, the original high-quality media resources are displayed directly. When the permission level is partial authorization, the resources are displayed after being downgraded, including reducing the resolution, compressing the quality, or shortening the duration, so that users can see the resources but their usage permissions are restricted. When the permission level is restricted, resources with visible watermarks or copyright information are displayed, and users see restricted resources that are obscured by the watermark. When the permission level is "no authorization", alternative content or permission prompts are displayed, such as a "no permission to view" prompt image or a gray placeholder box replacing the original resource, to prevent users from seeing unauthorized content.
6. The method for processing images and videos with authentication in rich text as described in claim 4, characterized in that, The multi-factor weighted evaluation model dynamically calculates the user's access authorization level to resources by defining a permission evaluation function `permission_evaluate`, as follows: Calculate the base permission weight: Based on the user role, call the get_role_weight function to get the role weight value get_role_weight(user.role), multiply it by a coefficient of 40% to get the base weight base_weight t, the formula is: base_weight=get_role_weight(user.role)*0.4; Calculate the time factor weight: Based on the resource's time policy, calculate the time compliance weight using the function calculate_time_factor(resource.time_policy), and multiply it by a 20% coefficient to obtain the time weight time_weight. The formula is: time_weight = calculate_time_factor(resource.time_policy) * 0.2; Calculate the environmental risk weight: Combine the current context environment, evaluate the environmental risk level using the assess_environment_risk(context) function, and multiply it by a 20% coefficient to obtain the environmental risk weight env_weight. The formula is: env_weight = assess_environment_risk(context) * 0.2; Calculate historical behavior weight: Analyze users' historical behavior records, generate a behavior credibility score of evaluate_user_behavior(user.history) using the evaluate_user_behavior function, and multiply it by a 20% coefficient to obtain the historical behavior weight behavior_weight. The formula is: behavior_weight = evaluate_user_behavior(user.history) * 0.2; Calculate the overall score: The overall score, total_score, is obtained by adding the four weights: basic permission weight, time factor weight, environmental risk weight, and behavior history weight. The formula is: total_score = basic permission weight + time_weight + environmental_weight + behavior_weight; The permission level is determined based on the range of the total score.
7. The method for processing images and videos with authentication in rich text as described in claim 6, characterized in that, The permission level is determined based on the total score range as follows: When the total score is ≥ 90, the permission level is full access. When the total score is 70-89, the access level is restricted and downgraded. When the total score is 50-69, the access level is limited access with watermark. If the total score is less than 50, the access level is denied.
8. A rich text image and video processing system with permission authentication, characterized in that, This system is used to implement the image and video processing method with permission authentication in rich text as described in any one of claims 1 to 7; the system includes: The permission metadata injection module is used to automatically identify image and video media resources in rich text during the rich text editing and saving stage, and add invisible metadata tags containing resource identifiers, permission policy IDs and integrity verification values to them. A rich text parsing engine is used to identify multimedia resource metadata when parsing rich text content on the client side and to intercept the direct loading behavior of traditional browsers. The authorization service module provides a lightweight RESTful API interface to receive user credentials and resource permission information submitted by the client and return detailed access authorization results. The dynamic content processing module is used to select the appropriate content processing strategy based on the authorization authentication result, including displaying the original resource, downgrading the display, adding watermarks, or replacing the content display.
9. An electronic device, characterized in that, include: Memory and at least one processor; The memory contains computer programs; The at least one processor executes the computer program stored in the memory, causing the at least one processor to perform the image and video processing method with authorization authentication in rich text as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that can be executed by a processor to implement the image and video processing method with access authentication in rich text as described in any one of claims 1 to 7.
