Multi-video resource control method and system based on UE5
By using the multi-video resource control method using double collision box and resource control logic in 3D scenes, the problems of frequent triggering and performance bottlenecks in traditional methods are solved, and efficient management and stable playback of video resources in complex scenes are achieved, improving the user experience.
Patent Information
- Application Number
- CN202510299639.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2045-03-14
AI Technical Summary
Traditional video resource control methods are difficult to adapt to in complex scenarios, resulting in frequent triggering of playback and closing, resulting in performance bottlenecks and logical performance errors.
Using a multi-video resource control method based on UE5, the download, loading and playback of video resources is controlled by using a double collision box and corresponding resource control logic in a 3D scene. The outer frame collision detection component is used to determine whether the user enters or leaves the outer frame, and the inner frame collision detection component is used to finely control the playback status of video resources.
It effectively solves the problems of frequent triggering and performance bottlenecks, optimizes the use of system resources, improves user experience, and is especially suitable for video resource control in complex scenarios.
Smart Images

Figure CN119815122B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of video resource control, and in particular relates to a multi-video resource control method and system based on UE5. Background Art
[0002] In modern 3D application scenarios, video playback is often used to enhance user immersion. As the complexity of scene content increases, the downloading, loading, and playing of multiple video resources may place a significant burden on system performance, especially on low-performance devices or with limited resources. In order to avoid performance bottlenecks, some control measures are usually required to optimize the use process of video resources and ensure that only necessary video resources are downloaded, loaded, and played.
[0003] Currently, traditional methods often download video resources when the program starts, play multiple videos at the same time, or trigger the loading, playing, or unloading of videos based on a single collision detection box. For example, when a character touches a certain area, the video starts playing; when the character leaves the area, the video stops playing. However, this control method based on a single collision box has the following problems:
[0004] 1. Frequent triggering: When the character is at the edge of the collision box, slight changes in the edge position may cause frequent switching of video playback and closing, which may lead to performance problems or logical performance errors.
[0005] 2. Scene complexity: As the number of videos in a scene increases, traditional methods are difficult to adapt to various complex scene requirements and cannot flexibly adjust the playback strategy.
[0006] Therefore, it is necessary to provide a new multi-video playback control method that can achieve efficient management of resources while avoiding frequent triggering of playback and closing, so as to optimize performance and improve user experience. Summary of the invention
[0007] In order to solve the problems in the prior art, the present invention aims to provide a multi-video resource control method and system based on UE5, which can effectively solve the performance bottlenecks and problems caused by frequent triggering in traditional video playback control methods by using double collision boxes in 3D scenes and cooperating with corresponding resource control logic.
[0008] In order to achieve the above object, the present invention provides a multi-video resource control method based on UE5, comprising the steps of:
[0009] S1: Add corresponding outer frame collision detection components and inner frame collision detection components in at least one blueprint Actor; each of the blueprint Actor is associated with a video resource;
[0010] S2: when the outer frame collision detection component is triggered, determine whether the current triggering situation is the user entering the outer frame or the user leaving the outer frame, and when it is determined that the current triggering situation is the user entering the outer frame, control the video resource corresponding to the blueprint Actor according to the first preset rule; when it is determined that the current triggering situation is the user leaving the outer frame, control the video resource corresponding to the blueprint Actor according to the second preset rule;
[0011] When the inner frame collision detection component is triggered, it is determined whether the current trigger situation is the user entering the inner frame or the user leaving the inner frame. When it is determined that the current trigger situation is the user entering the inner frame, the video resource corresponding to the blueprint Actor is controlled according to the third preset rule. When it is determined that the current trigger situation is the user leaving the inner frame, the video resource corresponding to the blueprint Actor is controlled according to the fourth preset rule.
[0012] As an implementation manner, in the step S1, the detection area of the outer frame collision detection component completely encloses the detection area of the inner frame collision detection component.
[0013] As an implementation manner, the detection area is a two-dimensional area and / or a three-dimensional space.
[0014] As an implementation manner, the first preset rule includes the steps of:
[0015] S211: Determine whether the user enters the outer frame for the first time, if yes, continue with the subsequent steps, otherwise, end the steps of the first preset rule;
[0016] S212: Downloading the video resource corresponding to the blueprint Actor;
[0017] S213: triggering a callback event after the downloading of the video resource is completed.
[0018] As an implementation manner, the second preset rule includes the steps of:
[0019] Detect whether the video resource corresponding to the blueprint Actor has been loaded or is in a paused state; if so, close and unload the video resource; otherwise, end the steps of the second preset rule.
[0020] As an implementation manner, the third preset rule includes the steps of:
[0021] S231: Determine whether the video resource corresponding to the blueprint Actor has been downloaded, if yes, proceed to step S232, if not, jump to step S233;
[0022] S232: Load and play the video resource, and then end the step;
[0023] S233: registering the event of playing the video resource to the download completion callback event, and automatically triggering the operation of playing the video resource when the download of the video resource is completed.
[0024] As an implementation manner, the fourth preset rule includes the steps of:
[0025] S241: Determine whether the video resource corresponding to the blueprint Actor is being played, if so, pause the video resource, otherwise continue with the subsequent steps;
[0026] S242: Clear the download completion callback event.
[0027] A multi-video resource control system of the present invention for implementing the multi-video resource control method based on UE5 of the present invention comprises:
[0028] A collision detection component adding module, used to add corresponding outer frame collision detection components and inner frame collision detection components in the blueprint Actor;
[0029] The outer frame collision detection component trigger module is used to determine whether the current trigger situation is the user entering the outer frame or the user leaving the outer frame, and when the current trigger situation is determined to be the user entering the outer frame, the video resource corresponding to the blueprint Actor is controlled according to the first preset rule; when the current trigger situation is determined to be the user leaving the outer frame, the video resource corresponding to the blueprint Actor is controlled according to the second preset rule;
[0030] The inner frame collision detection component trigger module is used to determine whether the current trigger situation is the user entering the inner frame or the user leaving the inner frame. When the current trigger situation is determined to be the user entering the inner frame, the video resource corresponding to the blueprint Actor is controlled according to the third preset rule; when the current trigger situation is determined to be the user leaving the inner frame, the video resource corresponding to the blueprint Actor is controlled according to the fourth preset rule.
[0031] As an implementation manner, the outer frame collision detection component triggering module includes:
[0032] The first trigger situation execution module is used to perform the following steps when it is determined that the current trigger situation is that the user enters the outer frame:
[0033] S211: Determine whether the user enters the outer frame for the first time, if yes, continue with the subsequent steps, otherwise, end the steps of the first preset rule;
[0034] S212: Downloading the video resource corresponding to the blueprint Actor;
[0035] S213: triggering a callback event after the download of the video resource is completed;
[0036] The second trigger situation execution module is used to detect whether the video resource corresponding to the blueprint Actor has been loaded or is in a paused state when it is determined that the current trigger situation is that the user leaves the outer frame; if so, close and unload the video resource; otherwise, end the steps of the second preset rule.
[0037] As an implementation manner, the inner frame collision detection component triggering module includes:
[0038] The third trigger situation execution module is used to perform the following steps when it is determined that the current trigger situation is that the user enters the inner frame:
[0039] S231: Determine whether the video resource corresponding to the blueprint Actor has been downloaded, if yes, proceed to step S232, if not, jump to step S233;
[0040] S232: Load and play the video resource, and then end the step;
[0041] S233: registering the event of playing the video resource to the download completion callback event, and automatically triggering the operation of playing the video resource when the video resource is downloaded;
[0042] The fourth trigger situation execution module is used to perform the following steps when it is determined that the current trigger situation is that the user leaves the inner frame:
[0043] S241: Determine whether the video resource corresponding to the blueprint Actor is being played, if so, pause the video resource, otherwise continue with the subsequent steps;
[0044] S242: Clear the download completion callback event.
[0045] The present invention adopts the above technical solution, so it has the following beneficial effects:
[0046] By using double collision boxes in 3D scenes and coordinating corresponding resource control logic, the performance bottlenecks and problems caused by frequent triggering in traditional video playback control methods can be effectively solved; and while ensuring the stability of video playback, the use of system resources can be optimized and the user experience can be improved. It is especially suitable for video resource control in complex scenes.
[0047] The detection area of the outer frame collision detection component completely encloses the detection area of the inner frame collision detection component, and clarifies the triggering sequence logic between the outer frame and the inner frame.
[0048] Video resources are downloaded in the outer frame only when the user enters the outer frame for the first time, which ensures the video playback experience when the user enters the inner frame and prevents frequent downloading of video resources, saving system resources and ensuring smooth operation of the system.
[0049] The video resource is closed and unloaded only when the user leaves the outer frame. This ensures the effective use of system resources and prevents frequent loading and unloading of video resources, thus preventing performance problems or logical errors that may be caused by frequent triggering.
[0050] When the user enters the inner frame, first determine whether the video resource has been downloaded. If so, load and play. If not, register to the callback event to ensure that the video resource is played as soon as possible, improving the user experience.
[0051] When the user leaves the inner frame, the download completion callback event is cleared to save system resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0053] Figure 1 This is a flowchart of a multi-video resource control method based on UE5 according to an embodiment of the present application. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0055] See also Figure 1 , a multi-video resource control method based on UE5 in the first embodiment of the present invention comprises the steps of:
[0056] S1: Add corresponding outer frame collision detection components and inner frame collision detection components in at least one blueprint Actor; each of the blueprint Actor is associated with a video resource;
[0057] The detection area of the outer frame collision detection component completely encloses the detection area of the inner frame collision detection component, and clarifies the triggering sequence logic between the outer frame and the inner frame.
[0058] The detection area is a two-dimensional area and / or a three-dimensional space.
[0059] In this embodiment, the detection area is a three-dimensional space of a cube. In other embodiments, the detection area may also be in other shapes.
[0060] The detection area of the outer frame collision detection component is used as a preliminary detection area, which usually covers the potential playback area of the entire video resource, and is used to prepare for subsequent video playback. The detection area of the outer frame collision detection component is set to a larger size to completely wrap the detection area of the inner frame collision detection component. The specific size should be reasonably configured according to factors such as the size of the scene, the distribution of the video position, and the movement speed of the character.
[0061] The inner frame is used as a fine trigger area, mainly for actual video playback control. The detection area of the inner frame collision detection component is set to a smaller size, which should be wrapped in the detection area of the outer frame collision detection component. It can be reasonably configured according to factors such as the size of the video display and the person's observation distance.
[0062] In this embodiment, the system includes multiple blueprint Actors, and each blueprint Actor is associated with a video resource.
[0063] S2: when the outer frame collision detection component is triggered, determine whether the current triggering situation is the user entering the outer frame or the user leaving the outer frame, and when it is determined that the current triggering situation is the user entering the outer frame, control the video resource corresponding to the blueprint Actor according to the first preset rule; when it is determined that the current triggering situation is the user leaving the outer frame, control the video resource corresponding to the blueprint Actor according to the second preset rule;
[0064] When the inner frame collision detection component is triggered, it is determined whether the current trigger situation is the user entering the inner frame or the user leaving the inner frame. When it is determined that the current trigger situation is the user entering the inner frame, the video resource corresponding to the blueprint Actor is controlled according to the third preset rule. When it is determined that the current trigger situation is the user leaving the inner frame, the video resource corresponding to the blueprint Actor is controlled according to the fourth preset rule.
[0065] The first preset rule comprises the steps of:
[0066] S211: Determine whether the user enters the outer frame for the first time, if yes, continue with the subsequent steps, otherwise, end the steps of the first preset rule;
[0067] S212: Downloading the video resource corresponding to the blueprint Actor;
[0068] S213: triggering a callback event after the downloading of the video resource is completed.
[0069] Video resources are downloaded in the outer frame only when the user enters the outer frame for the first time, which ensures the video playback experience when the user enters the inner frame and prevents frequent downloading of video resources, saving system resources and ensuring smooth operation of the system.
[0070] The second preset rule comprises the steps of:
[0071] Detect whether the video resource corresponding to the blueprint Actor has been loaded or is in a paused state; if so, close and unload the video resource; otherwise, end the steps of the second preset rule.
[0072] The video resource is closed and unloaded only when the user leaves the outer frame. This ensures the effective use of system resources and prevents frequent loading and unloading of video resources, thus preventing performance problems or logical errors that may be caused by frequent triggering.
[0073] The third preset rule comprises the steps of:
[0074] S231: Determine whether the video resource corresponding to the blueprint Actor has been downloaded, if yes, proceed to step S232, if not, jump to step S233;
[0075] S232: Load and play the video resource, and then end the step;
[0076] S233: registering the event of playing the video resource to the download completion callback event, and automatically triggering the operation of playing the video resource when the download of the video resource is completed.
[0077] When the user enters the inner frame, first determine whether the video resource has been downloaded. If so, load and play. If not, register to the callback event to ensure that the video resource is played as soon as possible, improving the user experience.
[0078] The fourth preset rule comprises the steps of:
[0079] S241: Determine whether the video resource corresponding to the blueprint Actor is being played, if so, pause the video resource, otherwise continue with the subsequent steps;
[0080] S242: Clear the download completion callback event.
[0081] When the user leaves the inner frame, the download completion callback event is cleared to save system resources.
[0082] A multi-video resource control system of this embodiment for implementing the multi-video resource control method based on UE5 described in this embodiment includes:
[0083] A collision detection component adding module, used to add corresponding outer frame collision detection components and inner frame collision detection components in the blueprint Actor;
[0084] The outer frame collision detection component trigger module is used to determine whether the current trigger situation is the user entering the outer frame or the user leaving the outer frame, and when the current trigger situation is determined to be the user entering the outer frame, the video resource corresponding to the blueprint Actor is controlled according to the first preset rule; when the current trigger situation is determined to be the user leaving the outer frame, the video resource corresponding to the blueprint Actor is controlled according to the second preset rule;
[0085] The inner frame collision detection component trigger module is used to determine whether the current trigger situation is the user entering the inner frame or the user leaving the inner frame. When the current trigger situation is determined to be the user entering the inner frame, the video resource corresponding to the blueprint Actor is controlled according to the third preset rule; when the current trigger situation is determined to be the user leaving the inner frame, the video resource corresponding to the blueprint Actor is controlled according to the fourth preset rule.
[0086] In this embodiment, the outer frame collision detection component trigger module includes:
[0087] The first trigger situation execution module is used to perform the following steps when it is determined that the current trigger situation is that the user enters the outer frame:
[0088] S211: Determine whether the user enters the outer frame for the first time, if yes, continue with the subsequent steps, otherwise, end the steps of the first preset rule;
[0089] S212: Downloading the video resource corresponding to the blueprint Actor;
[0090] S213: triggering a callback event after the download of the video resource is completed;
[0091] The second trigger situation execution module is used to detect whether the video resource corresponding to the blueprint Actor has been loaded or is in a paused state when it is determined that the current trigger situation is that the user leaves the outer frame; if so, close and unload the video resource; otherwise, end the steps of the second preset rule.
[0092] In this embodiment, the inner frame collision detection component triggering module includes:
[0093] The third trigger situation execution module is used to perform the following steps when it is determined that the current trigger situation is that the user enters the inner frame:
[0094] S231: Determine whether the video resource corresponding to the blueprint Actor has been downloaded, if yes, proceed to step S232, if not, jump to step S233;
[0095] S232: Load and play the video resource, and then end the step;
[0096] S233: registering the event of playing the video resource to the download completion callback event, and automatically triggering the operation of playing the video resource when the video resource is downloaded;
[0097] The fourth trigger situation execution module is used to perform the following steps when it is determined that the current trigger situation is that the user leaves the inner frame:
[0098] S241: Determine whether the video resource corresponding to the blueprint Actor is being played, if so, pause the video resource, otherwise continue with the subsequent steps;
[0099] S242: Clear the download completion callback event.
[0100] See also Figure 1 The steps of a multi-video resource control method based on UE5 in the second embodiment of the present invention are basically the same as those in the first embodiment, except that the detection area is a spherical three-dimensional space.
[0101] See also Figure 1 The steps of a multi-video resource control method based on UE5 in the third embodiment of the present invention are basically the same as those in the first embodiment, except that the system includes multiple blueprint Actors, and only some of the blueprint Actors are associated with a video resource.
[0102] It should be noted that the steps in the UE5-based multi-video resource control method provided by the present invention can be implemented using the corresponding modules in the multi-video resource control system. Those skilled in the art can refer to the technical solution of the system to implement the step flow of the method, that is, the embodiments in the system can be understood as preferred examples for implementing the method, which will not be elaborated here.
[0103] It should be noted that the preferred embodiments of the present invention are given in the specification and drawings of the present invention. However, the present invention can be implemented in many different forms and is not limited to the embodiments described in this specification. These embodiments are not intended to be additional limitations on the content of the present invention. The purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive. In addition, the above-mentioned technical features continue to be combined with each other to form various embodiments not listed above, which are all considered to be within the scope of the present invention; further, for ordinary technicians in this field, they can be improved or transformed according to the above description, and all these improvements and transformations should belong to the scope of protection of the claims attached to the present invention.
[0104] The present invention is described in detail above in conjunction with the embodiments of the accompanying drawings. A person skilled in the art can make various variations of the present invention according to the above description. Therefore, certain details in the embodiments should not constitute a limitation of the present invention, and the scope of protection of the present invention shall be defined by the scope of the attached claims.
Claims
1. A multi-video resource control method based on UE5, comprising the steps of: S1: Add corresponding outer frame collision detection components and inner frame collision detection components in at least one blueprint Actor; each of the blueprint Actor is associated with a video resource; S2: when the outer frame collision detection component is triggered, determine whether the current triggering situation is the user entering the outer frame or the user leaving the outer frame, and when it is determined that the current triggering situation is the user entering the outer frame, control the video resource corresponding to the blueprint Actor according to the first preset rule; when it is determined that the current triggering situation is the user leaving the outer frame, control the video resource corresponding to the blueprint Actor according to the second preset rule; When the inner frame collision detection component is triggered, it is determined whether the current triggering situation is that the user enters the inner frame or the user leaves the inner frame. When it is determined that the current triggering situation is that the user enters the inner frame, the video resource corresponding to the blueprint Actor is controlled according to the third preset rule. When it is determined that the current triggering situation is that the user leaves the inner frame, the video resource corresponding to the blueprint Actor is controlled according to the fourth preset rule. The first preset rule comprises the steps of: S211: Determine whether the user enters the outer frame for the first time, if yes, continue with the subsequent steps, otherwise, end the steps of the first preset rule; S212: Downloading the video resource corresponding to the blueprint Actor; S213: triggering a callback event after the download of the video resource is completed; The third preset rule comprises the steps of: S231: Determine whether the video resource corresponding to the blueprint Actor has been downloaded, if so, proceed to step S232, if not, jump to step S233; S232: Load and play the video resource, and then end the step; S233: registering the event of playing the video resource to the download completion callback event, and automatically triggering the operation of playing the video resource when the video resource is downloaded; The fourth preset rule comprises the steps of: S241: Determine whether the video resource corresponding to the blueprint Actor is being played, if so, pause the video resource, otherwise continue with the subsequent steps; S242: Clear the download completion callback event.
2. The UE5-based multi-video resource control method according to claim 1, characterized in that: In the step S1, the detection area of the outer frame collision detection component completely surrounds the detection area of the inner frame collision detection component.
3. The UE5-based multi-video resource control method according to claim 2, characterized in that: The detection area is a two-dimensional area and / or a three-dimensional space.
4. The multi-video resource control method based on UE5 according to claim 1, characterized in that: The second preset rule comprises the steps of: Detect whether the video resource corresponding to the blueprint Actor has been loaded or is in a paused state; If yes, close and uninstall the video resource; otherwise, end the steps of the second preset rule.
5. A multi-video resource control system for implementing the multi-video resource control method based on UE5 according to any one of claims 1 to 4, characterized in that: include: A collision detection component adding module, used to add corresponding outer frame collision detection components and inner frame collision detection components in the blueprint Actor; The outer frame collision detection component trigger module is used to determine whether the current trigger situation is the user entering the outer frame or the user leaving the outer frame, and when the current trigger situation is determined to be the user entering the outer frame, the video resource corresponding to the blueprint Actor is controlled according to the first preset rule; when the current trigger situation is determined to be the user leaving the outer frame, the video resource corresponding to the blueprint Actor is controlled according to the second preset rule; The inner frame collision detection component trigger module is used to determine whether the current trigger situation is the user entering the inner frame or the user leaving the inner frame. When the current trigger situation is determined to be the user entering the inner frame, the video resource corresponding to the blueprint Actor is controlled according to the third preset rule; when the current trigger situation is determined to be the user leaving the inner frame, the video resource corresponding to the blueprint Actor is controlled according to the fourth preset rule.
6. The multi-video resource control system according to claim 5, characterized in that: The outer frame collision detection component trigger module includes: The first trigger situation execution module is used to perform the following steps when it is determined that the current trigger situation is that the user enters the outer frame: S211: Determine whether the user enters the outer frame for the first time, if yes, continue with the subsequent steps, otherwise, end the steps of the first preset rule; S212: Downloading the video resource corresponding to the blueprint Actor; S213: triggering a callback event after the download of the video resource is completed; The second trigger situation execution module is used to detect whether the video resource corresponding to the blueprint Actor has been loaded or is in a paused state when it is determined that the current trigger situation is that the user leaves the outer frame; if so, close and unload the video resource; otherwise, end the steps of the second preset rule.
7. The multi-video resource control system according to claim 6, characterized in that: The inner frame collision detection component trigger module includes: The third trigger situation execution module is used to perform the following steps when it is determined that the current trigger situation is that the user enters the inner frame: S231: Determine whether the video resource corresponding to the blueprint Actor has been downloaded, if so, proceed to step S232, if not, jump to step S233; S232: Load and play the video resource, and then end the step; S233: registering the event of playing the video resource to the download completion callback event, and automatically triggering the operation of playing the video resource when the video resource is downloaded; The fourth trigger situation execution module is used to perform the following steps when it is determined that the current trigger situation is that the user leaves the inner frame: S241: Determine whether the video resource corresponding to the blueprint Actor is being played, if so, pause the video resource, otherwise continue with the subsequent steps; S242: Clear the download completion callback event.
Citation Information
Patent Citations
Display equipment control method and device, computer readable medium and display system
CN114071102A
Video resource processing method and apparatus, and computer device, storage medium and program
WO2022166173A1