Virtual Object Attribute Updates with Parallel Data Fields
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The efficiency of attribute updates for virtual objects in virtual scenes is low due to serial traversal updating, leading to performance issues when a large number of players or virtual objects interact in the same scene, particularly on hardware with limited resources.
Innovation Solution
The attribute data of virtual objects is split into multiple fields, with each field corresponding to a specific dimension, and parallel data update tasks are executed using task threads to update the attributes efficiently.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If serial traversal manner is used to update attributes of virtual objects, then simplicity of implementation is maintained, but attribute update efficiency deteriorates
Solution Approach 1:
The patent divides attribute data into multiple attribute data fields based on different splitting dimensions (e.g., position, rotation, scale). Each field can be updated independently and in parallel, transforming a single sequential update process into multiple concurrent operations, thereby significantly improving attribute update efficiency
Solution Approach 2:
The patent dynamically creates and manages multiple task threads based on the number of splitting dimensions and virtual objects. The system adaptively adjusts the parallel execution structure according to runtime conditions, allowing flexible optimization of update efficiency without fixed implementation constraints
2Productivity
If parallel data update tasks are executed using task threads, then attribute update efficiency is improved, but device complexity increases
Solution Approach 1:
The patent creates a universal task thread pool that can handle multiple types of attribute update tasks simultaneously. Each task thread is designed to be multi-functional, capable of processing different attribute data fields through a unified interface, thereby reducing the complexity of managing specialized threads for each attribute type
Solution Approach 2:
The patent introduces a main thread as an intermediary that coordinates between the task threads and the attribute update system. The main thread manages task distribution, synchronization, and resource allocation, simplifying the complexity of direct thread management by providing a centralized control layer
3Productivity
If attribute data is split into multiple fields and updated in parallel, then update speed increases, but risk of read-write conflicts increases
Solution Approach 1:
By splitting attribute data into distinct fields based on different dimensions, the patent ensures that parallel update operations work on separate data segments. This segmentation minimizes the probability of read-write conflicts between task threads, as each thread operates on its specific attribute field without interfering with others
Solution Approach 2:
The patent implements a feedback mechanism where task threads report their execution status and data field information to the main thread. The main thread monitors for potential conflicts and coordinates updates to maintain data consistency, providing real-time feedback control over the parallel update process
4Loss of time
If serial traversal is used for attribute updates, then resource consumption is low, but processing time increases
Solution Approach 1:
The patent dynamically adjusts the level of parallelism based on available computational resources and the number of virtual objects. When resources are abundant, more task threads are created to reduce processing time. When resources are constrained, the system reduces parallelism to lower resource consumption, achieving adaptive optimization of the time-resource tradeoff
Data Source
AI summary
An attribute update method and apparatus for a virtual object, an electronic device, and a computer-readable storage medium are provided. The method includes: obtaining attribute data of attributes of a plurality of virtual objects in a virtual scene; invoking a main thread corresponding to each attribute, splitting the attribute data of each attribute into at least two attribute data fields, creating a data update task of each attribute data field, where each attribute data field corresponds to one splitting dimension, and the data update task indicates to update the attribute data field; for each attribute, invoking a task thread corresponding to each splitting dimension of the attribute, and executing in parallel the data update task of each attribute data field, to obtain a plurality of updated attribute data fields; and updating an attribute of each of the plurality of virtual objects based on the plurality of updated attribute data fields.


