Data storage method, data array generation method, device and electronic equipment

By using a layered storage and generation method, the problem of modifying the position data of group characters in group animations was solved, enabling rapid generation and flexible adjustment of formations, reducing the professional requirements of production staff, and improving production efficiency.

CN117244251BActive Publication Date: 2026-07-31NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NETEASE (HANGZHOU) NETWORK CO LTD
Filing Date
2023-11-03
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In existing technologies for group animation production, the way group character position data is stored makes subsequent modifications difficult and requires a high level of expertise from the production staff, making it hard to meet the needs for rapid adjustments and flexible modifications.

Method used

A layered storage method is adopted, including formation character type data, basic position data, random offset parameters, overall formation scaling parameters, and user-corrected parameters. Multi-layered formation data is generated through pseudo-random algorithms and transformation matrices, reducing the professional requirements for production personnel.

Benefits of technology

It enables rapid generation and flexible modification of group formations, reduces the professional requirements of production staff, and improves the efficiency and flexibility of group animation production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117244251B_ABST
    Figure CN117244251B_ABST
Patent Text Reader

Abstract

This application provides a data storage method, a data formation generation method, an apparatus, and an electronic device. The method includes: acquiring data formation production information, including formation adjustment parameters, original position data, final position data, and character type data corresponding to each character; the formation adjustment parameters include: overall formation scaling parameters, random offset parameters, and user scaling correction values; generating group character type data based on the character type corresponding to each character; determining basic position data and user correction parameters based on the formation adjustment parameters, the initial position data, and the final position data corresponding to each character; and storing the basic position data, user correction parameters, overall formation scaling parameters, random offset parameters, and formation character type data in a hierarchical manner. Multi-level formation data storage based on group production information enables rapid generation of corresponding data formations, reduces the professional requirements of production personnel, and facilitates subsequent formation modifications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of game technology, and in particular to a data storage method, a data array generation method, an apparatus, and an electronic device. Background Technology

[0002] Currently, when creating group animations, specialized group animation software such as Miarmy, Massive, and Golaem are commonly used, integrated with mainstream 3D software like Maya to achieve high-quality group animation simulations, meet various production needs, and each has its own independent format for storing group formation positions. However, this approach has the following problems: directly storing the final position data of group characters makes subsequent modification of character positions difficult, and generating formations requires a high level of expertise from the production staff. Summary of the Invention

[0003] The purpose of this application is to provide a data storage method, a data formation generation method, an apparatus, and an electronic device that can store multi-level formation data based on the production information of group roles. The stored data can quickly and easily generate the corresponding data formation, reducing the professional requirements of the production personnel and facilitating subsequent modifications to the formation.

[0004] In a first aspect, this application provides a data storage method, the method comprising: acquiring data formation creation information; the creation information comprising: formation adjustment parameters, original position data, final position data, and character type data corresponding to each character; the formation adjustment parameters comprising: overall formation scaling parameters, random offset parameters, and user scaling correction values; generating formation character type data according to the character type corresponding to each character; determining basic position data and user correction parameters according to the formation adjustment parameters, and the initial and final position data of each character; and storing the basic position data, user correction parameters, overall formation scaling parameters, random offset parameters, and formation character type data in a hierarchical manner.

[0005] Secondly, this application also provides a method for generating a data array. The method is applied to a hardware device, which stores data array data stored using the method described in the first aspect. The data array data includes: hierarchically stored basic position data, user correction parameters, overall array scaling parameters, random offset parameters, and array role type data. The method includes: generating a first data array based on the array role type data and the basic position data; adjusting the first data array in a first position according to the random offset parameters to generate a second data array; adjusting the second data array in a second position according to the overall array scaling parameters to generate a third data array; and adjusting the third data array in a third position according to the user correction parameters to generate a final data array.

[0006] Thirdly, this application also provides a data storage device, comprising: an information acquisition module for acquiring data formation creation information; the creation information includes: formation adjustment parameters, original position data, final position data, and character type data corresponding to each character; the formation adjustment parameters include: overall formation scaling parameters, random offset parameters, and user scaling correction values; a type data generation module for generating formation character type data according to the character type corresponding to each character; a parameter determination module for determining basic position data and user correction parameters according to the formation adjustment parameters and the initial and final position data of each character; and a hierarchical storage module for storing the basic position data, user correction parameters, overall formation scaling parameters, random offset parameters, and formation character type data in hierarchical layers.

[0007] Fourthly, this application also provides a data array generation apparatus. The apparatus is applied to a hardware device, which stores data array data stored using the method described in the first aspect. The data array data includes: hierarchically stored basic position data, random offset parameters, overall array scaling parameters, user correction parameters, and array role type data. The apparatus includes: a first array generation module, used to generate a first data array based on the array role type data and the basic position data; a second array generation module, used to perform a first position adjustment on the first data array based on the random offset parameters to generate a second data array; a third array generation module, used to perform a second position adjustment on the second data array based on the overall array scaling parameters to generate a third data array; and a fourth array generation module, used to perform a third position adjustment on the third data array based on the user correction parameters to generate a final data array.

[0008] Fifthly, this application also provides an electronic device, including a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the methods described in the first and second aspects above.

[0009] In a sixth aspect, this application also provides a computer-readable storage medium storing computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the methods described in the first and second aspects above.

[0010] This application provides a data storage method, a data formation generation method, an apparatus, and an electronic device. First, the production information of the data formation is acquired. This production information includes: formation adjustment parameters, original position data, final position data, and character type data for each character. The formation adjustment parameters include: overall formation scaling parameters, random offset parameters, and user scaling correction values. Then, formation character type data is generated based on the character type corresponding to each character. Based on the formation adjustment parameters and the initial and final position data for each character, basic position data and user correction parameters are determined. Finally, the basic position data, user correction parameters, overall formation scaling parameters, random offset parameters, and formation character type data are stored hierarchically. This method enables multi-level formation data storage based on the production information of group characters. The stored data allows for quick and convenient generation of corresponding data formations, reducing the professional requirements of production personnel and facilitating subsequent modifications to the formation. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0012] Figure 1 A flowchart illustrating a data storage method provided in an embodiment of this application;

[0013] Figure 2 A schematic diagram of a data storage structure for a data array provided in an embodiment of this application;

[0014] Figure 3 A schematic diagram illustrating a basic character generation location provided in this application embodiment;

[0015] Figure 4 A flowchart illustrating a method for generating a data array according to an embodiment of this application;

[0016] Figure 5 A schematic diagram illustrating the layered generation process of a data array provided in an embodiment of this application;

[0017] Figure 6 A structural block diagram of a data storage device provided in an embodiment of this application;

[0018] Figure 7 A structural block diagram of a data array generation device provided in an embodiment of this application;

[0019] Figure 8This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0020] The technical solutions of this application will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0021] In animated films, television series, and many AAA games, a large number of group animations are often required to present magnificent scenes and powerful visual impact. Because the movements and interactions of multiple elements must be handled simultaneously, and the scenes are usually quite complex and spectacular, these group animations are often difficult to produce, requiring high-performance hardware, professional software, and technical teams, resulting in significant budget expenditures.

[0022] However, most group shots currently only involve the movement of group characters and the playback of simple character movement motion libraries, with relatively few requiring high-quality processing such as intricate group interactions. Using professional group animation software solutions (such as Miarmy, Massive, and Golaem) is not only expensive and requires highly skilled personnel, but also involves long production iteration cycles and high budgets. Therefore, an efficient and flexible data storage method for group formations will play a crucial role in the subsequent development of formations and motion logic in group animations.

[0023] Miarmy, Massive, and Golaem are currently the most professional software solutions on the market for handling group animation. They can all be integrated with mainstream 3D software such as Maya to achieve high-quality group animation simulation. They can easily perform group animation simulation, and also support multiple output formats and renderers to meet various production needs. They also have their own independent crowd formation position storage format.

[0024] The current approach to using professional group software solutions has the following problems:

[0025] 1. High level of professionalism is required for production staff. Creating group animations requires staff to possess a high level of expertise and skill, as well as proficiency in using specialized group animation software. These software programs have relatively high learning curves and require considerable learning and practical experience to master.

[0026] 2. Currently, after entering the formation animation stage, the crowd formation data storage directly stores the final position of each crowd character, without storing the data of the generation process. This makes it difficult to modify the crowd formation in subsequent major aspects, such as the randomness of the formation and the range of the formation.

[0027] Based on this, embodiments of this application provide a data storage method, a data formation generation method, an apparatus, and an electronic device that can store multi-level formation data based on the production information of group roles. The stored data can quickly and easily generate the corresponding data formation, reducing the professional requirements of production personnel and facilitating subsequent modifications to the formation.

[0028] To facilitate understanding of this embodiment, a data storage method disclosed in this application embodiment will first be described in detail.

[0029] Figure 1 A flowchart of a data storage method provided in this application embodiment, the method specifically includes the following steps:

[0030] Step S102: Obtain the data formation creation information; the creation information includes: formation adjustment parameters, original position data, final position data and character type data for each character.

[0031] The above data array can be a group role matrix; the group role matrix includes: position data corresponding to multiple roles; the position data includes data on both the role's generated position and orientation; the orientation is the rotation value mentioned in the text.

[0032] The above formation adjustment parameters include: overall formation scaling parameters, random offset parameters, and user scaling correction values. The overall formation scaling parameters are used to adjust the size scaling of each character in the overall formation. The random offset parameters include: a random seed and a scaling value for the random offset value. The random seed can be used in a pseudo-random algorithm to generate a vector offset value, which can be one-dimensional, two-dimensional, or three-dimensional, without specific limitations. The scaling value for the random offset value is used to scale the above vector offset value to a certain extent. The user scaling correction value is the scaling correction data provided by the user for the generated position or rotation value of the character.

[0033] The above-mentioned original position data includes: the original generated position and the original rotation value; the final position data includes: the final generated position and the final rotation value; the final generated position and the final rotation value are the character positions expected by the user.

[0034] Step S104: Generate formation character type data according to the character type corresponding to each character;

[0035] By iterating through the character identifiers, a dictionary structure consisting of key-value pairs of character identifiers and character types can be generated.

[0036] Step S106: Determine the basic position data and user-corrected parameters based on the formation adjustment parameters and the initial and final position data of each character.

[0037] The aforementioned basic position data is calculated based on formation adjustment parameters and the initial and final position data for each character, resulting in the position data to be stored. It is ultimately stored in list form, such as a list of generated character positions and a list of character rotation values. User correction parameters include not only the aforementioned user scaling correction values ​​but also user offset correction values; both together constitute the user correction parameters. User offset correction values ​​are offset correction data provided by the user for the generated character position or rotation value.

[0038] Step S108: Store the basic position data, user correction parameters, overall formation scaling parameters, random offset parameters, and formation role type data in layers.

[0039] The aforementioned basic position data, user-corrected parameters, overall formation scaling parameters, and random offset parameters can be regarded as formation character position data, which are ultimately stored in a hierarchical manner.

[0040] This application provides a data storage method that first obtains the data formation's creation information. This creation information includes: formation adjustment parameters, original position data for each character, final position data, and character type data. The formation adjustment parameters include: overall formation scaling parameters, random offset parameters, and user scaling correction values. Then, formation character type data is generated based on the character type corresponding to each character. Based on the formation adjustment parameters and the initial and final position data for each character, basic position data and user correction parameters are determined. Finally, the basic position data, user correction parameters, overall formation scaling parameters, random offset parameters, and formation character type data are stored hierarchically. This method enables multi-level formation data storage based on the creation information of group characters. The stored data allows for quick and convenient generation of corresponding data formations, reducing the professional requirements for creators and facilitating subsequent modifications to the formation.

[0041] This application also provides another data array data storage method, which is implemented based on the above embodiments; this embodiment focuses on describing the data hierarchical storage structure and the specific storage process.

[0042] To facilitate the explanation of the embodiments of this application, the following description uses a mass formation created using Unreal Engine software as an example. First, some terms involved will be explained:

[0043] 1. CharType: Character type, the type of group characters.

[0044] 2. IdTypeInfo: A dictionary structure with group role ID and CharType as key-value pairs. Notably, it must contain the key 0, which is the initial ID. For example, {0: CharA, 30: CharB, 50: CharC} means that roles 0-29 are all CharA, roles 30-49 are CharB, and roles 50 and above are all CharC.

[0045] 3. Yaw: Yaw refers to the angle of rotation of an object or vehicle around its vertical axis. It is commonly used to describe changes in direction of vehicles such as aircraft, ships, and cars. Yaw usually refers to rotation around the vertical axis of an object, changing its horizontal orientation.

[0046] 4. BornLocs: A data list of the Locations of characters within the group. It is a three-dimensional vector data list and belongs to the basic data layer.

[0047] 5. BornYaws: A data list of yaw rotations for characters within the group. It belongs to the basic data layer. Since the characters are only standing on the ground and only have a horizontal orientation, pitch and roll rotations can be ignored.

[0048] 6. RandomLocSeed: The random seed integer value for the character's position offset, used in pseudo-random algorithms to generate the same random two-dimensional vector array each time. It belongs to the random data layer.

[0049] 7. RandomLocScale: The scaling value for the random offset. It is a two-dimensional vector used to scale the randomly generated offset vector in both the X and Y directions. The default value is <1,1>, which belongs to the random data layer. (<0,0> can disable random offsets for group roles.)

[0050] 8. RandomYawSeed: The random seed integer value for the character's rotation offset, used in a pseudo-random algorithm. It generates the same random floating-point array each time, representing the offset value the character is facing. It belongs to the random data layer.

[0051] 9. RandomYawScale: The scaling value of random rotation yaw. It is a floating-point number with a default value of 1. It belongs to the random data layer.

[0052] 10. MainScale: Overall scaling value for the group formation. It is a two-dimensional vector and belongs to the overall scaling data layer. The default value is <1,1>, which means no scaling is applied to the formation.

[0053] 11. ModLocInfo: User-modified Location offset value. It is a dictionary structure with the character ID and the Location offset value of the three-dimensional vector as key-value pairs, and belongs to the user-modified data layer.

[0054] 12. ModYawInfo: User-modified Yawation offset value. It is a dictionary structure with the character ID and rotation Yaw offset value as key-value pairs, belonging to the user-modified data layer.

[0055] 13. ModLocScale: The scaling value of the user-corrected Location. It is a two-dimensional vector with a default value of <1,1>. It scales the user-corrected Location offset value in both the X and Y directions.

[0056] 14. ModYawScale: The scaling value of the user-corrected Yawation. It is a floating-point number and the default value is 1. It scales the user-corrected Location offset value in both the X and Y directions.

[0057] 15. Pseudo-random algorithm: Pseudo-random numbers are generated using deterministic algorithms to produce a uniformly distributed sequence of random numbers. They are not truly random, but possess statistical characteristics similar to random numbers, such as uniformity and independence. When calculating pseudo-random numbers, if the initial value (seed) remains unchanged, the order of the pseudo-random numbers also remains unchanged (the output list of random numbers remains the same).

[0058] 16. CharTempLoc*: Represents the position of a group role in a certain stage. The * sign represents the stage number. For example, 1 and 4 represent the position data of the first stage and the fourth stage, respectively.

[0059] 17. CharTempYaw*: Represents the rotation value of a group of characters at a certain stage. The * sign represents the stage number. For example, 1 and 4 represent the position data of the first stage and the fourth stage, respectively.

[0060] 18. CharLoc: The final position of a character in a group. CharLoc = CharTempLoc1 + CharTempLoc2 + CharTempLoc3 + CharTempLoc4.

[0061] 19. CharYaw: The final rotation value of a character in a group. CharYaw = CharTempYaw1 + CharTempYaw2 + CharTempYaw3 + CharTempYaw4.

[0062] 20. N: Number of extras, determined by the number of elements in the BornLocs list.

[0063] 21. Vector * operation: Multiply the elements of two vectors together to obtain a new vector. For example, v3 =<v1.xX v2.x,v1.y X v2.y> =<v3.x,v3.y> .

[0064] 22. Vector / Operation: Divide each element of two vectors to obtain a new vector. For example, v3 =<v1.x / v2.x,v1.y / v2.y> =<v3.x,v3.y> .

[0065] 23. Transformation matrix M containing only scaling:

[0066]

[0067] The matrix M described above contains only the transformation matrix for 3D scaling. It can be represented as a diagonal matrix, where each diagonal element corresponds to a scaling factor along a coordinate axis. Here, Sx, Sy, and Sz represent the scaling factors along the x, y, and z axes, respectively. This matrix can be used to scale a 3D point; simply multiply the point by this matrix.

[0068] 24. Transformation inverse matrix Minv: is the inverse matrix of the transformation matrix, i.e., M×MInv=I.

[0069] 25. LocThreshold (YawThreshold): Position (rotation) deviation threshold. For example, if the absolute value is less than this threshold, it means there is a calculation error and it will not be recorded.

[0070] The data hierarchical storage structure provided in this application embodiment is as follows: Figure 2 As shown.

[0071] The storage of formation data is divided into two main layers. The first layer is the character type data layer, which stores formation character type data. The second layer is the character position data layer, which stores formation character position data.

[0072] The character position data layer is divided into four sub-layers: the basic data layer, the random offset data layer, the overall scaling data layer, and the user-corrected data layer. The basic data layer stores basic position data, including BornLocs and BornYaws. The random offset data layer stores random offset parameters, such as the random seed (RandomLocSeed and RandomYawSeed) and the scaling values ​​of the offset (RandomLocScale and RandomYawScale). The overall scaling data layer stores the overall scaling parameter of the formation (MainScale). The user-corrected data layer stores user-corrected parameters, including user scaling correction values ​​(ModLocScale and ModYawScale) and user offset correction values ​​(ModLocInfo and ModYawInfo).

[0073] Formation character type data: Recorded using the IdTypeInfo dictionary, similar to {0:CharA,10:CharB,30:CharC,35:CharA}. This indicates that characters 0-9 are CharA, characters 10-29 are CharB, and characters 30-34 are CharA.

[0074] Base Data Layer: Contains the local coordinate system positions (BornLocs) and rotation values ​​(BornYaws) of all characters in the group formation. When initially creating a group formation, basic patterns such as rectangles, circles, and triangles are generated on the floor, spaced at intervals in the X and Y directions. This data records the most basic character spawn positions. (e.g.) Figure 3 As shown, BornLocs records the local coordinates of all triangles, while BornYaws records their horizontal rotation values.

[0075] Random Offset Data Layer: This layer contains two numerical values, RandomLocSeed and RandomLocScale, which process the random offset of the character's position. It also contains two numerical values, RandomYawSeed and RandomYawScale, which process the random offset of the character's yaw rotation. Using a pseudo-random algorithm, when RandomLocSeed and RandomYawSeed are the same, the character's position offset and yaw rotation offset values ​​will remain consistent with each data generation. (That is, regardless of how many times the array list is generated, each element of the list will be identical. For example, if RandomYawSeed is 1, no matter how many times the list is regenerated, the values ​​in the list will remain unchanged at [0.1, 0.8, 3.2, 6.2...].)

[0076] Overall scaling data layer: Contains a two-dimensional vector MainScale, which controls the overall position of the crowd characters.

[0077] User-modified data layer: Contains ModLocInfo and ModLocScale, which record character position modification data, and ModYawInfo and ModYawScale, which record character rotation modification data.

[0078] In a group formation that has been determined by the creators, the following parameters can be immediately recorded through the creation settings: RandomLocSeed, RandomLocScale, RandomYawSeed, RandomYawScale, MainScale, ModLocScale, and ModYawScale. Meanwhile, when the group formation is initially generated, the original positions of OriBornLocs and OriBornYaws, and the final positions of CharLoc and CharYaw, are known. The data to be stored, BornLocs and BornYaws, can be determined through calculation (OriBornLocs or OriBornYaws are not necessarily equal to the final recorded values ​​of BornLocs and BornYaws. For example, for a formation of 4 characters generated from a square, <-50,-50,0>,<-50,50,0>,<50,-50,0>,<50,50,0> are the values ​​of OriBornLocs, but after the formation is generated, the production team may adjust this value again, that is, BornLocs may become <-60,-50,0>,<-50,90,0>,<50,-50,0>,<50,50,0>).

[0079] Therefore, in order to perform hierarchical data storage, the following data also need to be determined: IdTypeInfo, BornLocs, BornYaws, ModLocInfo, and ModYawInfo.

[0080] The following details the storage process of the formation character type data IdTypeInfo:

[0081] The steps described above for generating group role type data based on the role type corresponding to each role include: obtaining the role identifier and role type corresponding to each role; multiple role identifiers corresponding to a predetermined arrangement order; and traversing the identifier and role type corresponding to each role according to the arrangement order to generate a dictionary structure of key-value pairs composed of role identifiers and role types.

[0082] In practice, the following steps are performed: First, obtain the initial role identifier. Second, based on the initial role identifier and its corresponding initial role type, generate an identifier type key-value pair. Third, use the initial role type as the target role type and the next role identifier of the initial role identifier as the current role identifier, and perform the following judgment steps: First, determine whether the current role type corresponding to the current role identifier is consistent with the target role type. If not, add the key-value pair consisting of the current role identifier and the current role type to the end of the identifier type key-value pair. If yes, use the next role identifier as the current role identifier and continue performing the judgment steps until all role identifiers have been traversed, generating a dictionary structure of key-value pairs consisting of role identifiers and role types.

[0083] For example, first obtain the character type CharType (e.g., CharA) with ID 0, and add a key-value pair 0, CharType(CharA) to IdTypeInfo. Then iterate through all characters in the formation from 0 to N-1. If the character type CurCharType (e.g., 10, CharB) with the current ID is not equal to the original CharType(CharA), then set CharType to the current CurCharType(CharB) and add a key-value pair ID(10), CharType(CharB) to IdTypeInfo. Continue in this manner until the complete IdTypeInfo data is obtained.

[0084] The following details the storage process of formation and character position data:

[0085] Since the random offset parameters and the overall array scaling parameters can be directly recorded from the production information, it is currently necessary to determine the user-corrected parameters and the basic position parameters.

[0086] Specifically, based on the formation adjustment parameters and the initial position data (OriBornLocs and OriBornYaws) and final position data (CharLoc and CharYaw) of each character, the basic position data and user-corrected parameters are determined. The specific implementation process is as follows:

[0087] For each character, the generated position and rotation value are treated as the current objects to be processed, and the following steps are performed:

[0088] (1) Generate scaling position data based on the initial data and random offset parameters and the overall scaling parameters of the array corresponding to the current object to be processed;

[0089] A. Generate offset position data based on the initial data and corresponding random offset parameters of the current object to be processed; the random offset parameters include: random seed and scaling value of random offset value; generate vector offset value based on pseudo-random algorithm and random seed; multiply the vector offset value and the scaling value of random offset value to obtain random offset value; add the initial data and random offset value of the current object to be processed to obtain offset position data.

[0090] B. Generate scaling position data based on offset data and overall array scaling parameters.

[0091] If the offset data corresponds to the generation position, generate a matrix containing only the scaling data according to the overall array scaling parameters; multiply the offset position data with the matrix to obtain the scaling position data; if the offset data corresponds to the rotation value, use the offset position data as the scaling position data.

[0092] (2) Determine the storage location data and user offset correction value based on the final data corresponding to the current object to be processed, the user scaling correction value, and the scaling position data;

[0093] If the user scaling correction value is 0, the product of the final data corresponding to the current object to be processed and the inverse of the matrix is ​​subtracted from the corresponding random offset value to obtain the data to be stored, and the corresponding user offset correction value is 0; if the user scaling correction value is not 0, the original data corresponding to the current object to be processed is used as the data to be stored, and the difference between the final data corresponding to the current object to be processed and the offset data is divided by the user scaling correction value to obtain the user offset correction value.

[0094] Furthermore, before the step of dividing the difference between the final data corresponding to the current object to be processed and the offset position data by the user scaling correction value to obtain the user offset correction value, the method further includes: determining whether the difference between the final data corresponding to the current object to be processed and the offset position data exceeds a preset threshold; if so, continuing to execute the step of dividing the difference between the final data corresponding to the current object to be processed and the offset position data by the user scaling correction value to obtain the user offset correction value; if not, continuing to execute the step when the user scaling correction value is 0.

[0095] (3) A data list consisting of the location data to be stored for each role is used as the basic location data; the user offset correction value and user scaling correction value for each role are used as user correction parameters.

[0096] In practice, the scaling position data CharTempLocs3 and CharTempYaws3 of each character are first calculated based on the OriBornLocs and OriBornYaws of each character, as well as random offset parameters such as random seeds (RandomLocSeed and RandomYawSeed), scaling values ​​of offset values ​​(RandomLocScale and RandomYawScale), and overall formation scaling parameters (MainScale).

[0097] Then, based on each character's ModLocScale and CharLoc, the data to be stored and the user offset correction value are further determined.

[0098] If ModLocScale is 0, it means that all user adjustments are modifying BornLocs. Therefore, BornLoc = Minv × CharLoc - RandomLocScale * LocRandomOffset. All roles' BornLocs are combined into BornLocs for recording, and ModLocInfo is an empty dictionary record.

[0099] If ModLocScale is not 0, it means all user adjustment data is recorded in ModLocInfo. Therefore, BornLoc = OriBornLoc is recorded. If the magnitude of the vector CharLoc - CharTempLoc3 is less than LocThreshold, the character is not recorded as a user-modified character. Otherwise, Diff = CharLoc - CharTempLoc3. Since the third element Z of the vector is the vertical component, in a group, the numerical direction of a character is generally determined by the ground height. Therefore, the Z element is discarded, resulting in Diff2D =<Diff.X,Diff.Y> ;ModLoc=Diff2D / ModLocScale.

[0100] Add key-value pairs of character IDs and ModLocs to the ModLocInfo dictionary. After iterating through all characters, record the ModLocInfo.

[0101] Similarly, the process for handling rotation values ​​is as follows: Check the value of ModYawScale, iterate through all characters in the formation from 0 to N-1, and obtain the horizontal rotation component CharYaw of the final rotation value of that character.

[0102] If ModYawScale is 0, it means that all user adjustments are adjusting BornYaws. Therefore, BornYaw = CharYaw - RandomYawScale * YawRandomOffset. The BornYaws of all roles are combined into BornYaws and recorded, and ModYawInfo is an empty dictionary record.

[0103] If ModYawScale is not 0, it means all user adjustment data is recorded in ModYawInfo. Therefore, BornYaws is recorded as OriBornYaws. If the magnitude of the vector CharYaw - CharTempYaw3 is less than YawThreshold, the character is not recorded as a character whose rotation has been modified by the user. Otherwise, Diff1D = CharYaw - CharTempYaw3. ModYaw = Diff1D / ModYawScale.

[0104] Add the character ID and ModYaw key-value pairs to the ModYawInfo dictionary. After iterating through all characters, record the ModYawInfo. This yields the recording and storage method for all group formation data.

[0105] In the data storage method for the data formation provided in this application embodiment, the data formation needs to retain both machine-generated random values ​​and values ​​manually modified by the production staff. Based on the formation data stored using the above data storage method, the final formation character positions can be decomposed into multiple data layers, which helps the production staff better understand and grasp the dynamics of the crowd's positions and makes it easier for the production staff to clarify the meaning of each value in subsequent adjustments to the formation.

[0106] Based on the above method embodiments, this application also provides a method for generating a data array. The method is applied to a hardware device, which can be a server or a client terminal. The hardware device stores data array data stored using the method described above. The data array data includes: hierarchically stored basic position data, user correction parameters, overall array scaling parameters, random offset parameters, and array role type data. See also... Figure 4 As shown, the method includes the following steps:

[0107] Step S402: Generate the first data formation based on the formation character type data and basic position data;

[0108] Step S404: Adjust the first position of the first data array according to the random offset parameters to generate the second data array;

[0109] Step S406: Adjust the second position of the second data array according to the overall array scaling parameters to generate the third data array;

[0110] Step S408: Adjust the third position of the third data array according to the user-corrected parameters to generate the final data array.

[0111] The aforementioned data array can include data for multiple characters, which may be a group of characters in the game. The data array includes positional data for each character (including their current position and orientation). The character type data is a dictionary structure of key-value pairs consisting of character identifiers and character types. The basic positional data includes the generated position and rotation value corresponding to each character identifier. Based on the character type data and the basic positional data, a first data array is generated, including:

[0112] Using the first role identifier in the dictionary structure as the current identifier, perform the following role generation steps: find the current role type corresponding to the current identifier in the dictionary structure; find the current generation position and current rotation value corresponding to the current identifier in the basic position data; generate the role corresponding to the current role type according to the position determined by the current generation position and current rotation value; use the next role identifier as the current identifier again, and continue to perform the role generation steps until all role identifiers have been traversed to obtain the first data array.

[0113] In specific implementation, obtain all index keys of IdTypeInfo, i.e. ID, and sort them in ascending order. Obtain the number of elements in the BornLocs list to obtain the number of characters N in the formation. Confirm that the current character type CharType is the character type of IdTypeInfo[0]. Iterate from 0 to N-1 to generate characters of CharType. If the current ID is recorded in IdTypeInfo, set CharType to the new character type IdTypeInfo[ID]. Generate the corresponding character and assign the corresponding ID number to the character. (For example, in the data {0: CharA, 30: CharB, 50: CharC}, the initial CharType is CharA. When iterating to ID 30, CharType will be updated to CharB because IdTypeInfo exists and its value is CharB, and characters will continue to be generated with the CharB type). Iterate BornLocs and BornYaws to obtain CharTempLoc1 and CharTempYaw1 of each character in the group and generate the first data formation, such as Figure 5 The first image in the series is shown.

[0114] Furthermore, the above-mentioned adjustment of the first position of the first data array based on the random offset parameter to generate the second data array includes: for each character in the first data array, performing the following steps: taking the current generated position and current rotation value of the character as the current data to be processed, generating offset position data based on the current data to be processed and the corresponding random offset parameter; adjusting the position of the character according to the offset position data to generate the second data array.

[0115] In practice, RandomLocSeed and the number of group roles N are used to generate a list of group position offset values, LocRandomOffsetList, where the position value of a certain role is CharTempLoc2 = CharTempLoc1 + RandomLocScale * LocRandomOffset.

[0116] Use RandomYawSeed and the number of characters in the group N to generate a list of group position offset values, YawRandomOffsetList, where the position value of a character, CharTempYaw2, is equal to CharTempYaw1 + RandomYawScale * YawRandomOffset. (The plus sign for the rotation value here represents the sum of two rotation values, usually the sum of the rotations of the Yaw values).

[0117] Adjust the roles according to CharTempLoc2 and CharTempYaw2 to obtain the second data formation, such as... Figure 5 The second image in the series is shown.

[0118] Furthermore, the above-mentioned second position adjustment of the second data formation based on the overall formation scaling parameters to generate the third data formation includes: for each character in the second data formation, performing the following steps: applying the offset position data corresponding to the current generated position of the character, multiplying it by the matrix corresponding to the overall formation scaling parameters to obtain the scaling position data; using the offset position data corresponding to the current rotation value of the character as the scaling position data; adjusting the size of the character according to the scaling position data to generate the third data formation.

[0119] Use MainScale to generate a transformation matrix M containing only scaling, CharTempLoc3 = M * CharTempLoc2 (the position of the matrix transformation point), and since scaling does not change the character rotation, CharTempYaw3 = CharTempYaw2.

[0120] Adjust the character positions according to CharTempLoc3 and CharTempYaw3 to obtain the third data formation, such as... Figure 5 The third image in the series is shown.

[0121] Furthermore, the aforementioned user correction parameters include: user offset correction value and user scaling correction value; the step of adjusting the third position of the third data array according to the user correction parameters to generate the final data array includes: for each role in the third data array, performing the following steps: multiplying the user offset correction value and user scaling correction value corresponding to the role to obtain the correction amount; adding the scaling position data of the role to the correction amount to obtain the final position data; adjusting the position of the role according to the final position data to generate the final data array.

[0122] Iterate through all the keys of the user-modified data ModLocInfo, i.e., the role IDs of all modified positions, to obtain the corresponding Loc modification value ModLoc, CharTempLoc4 = CharTempLoc3 + ModLoc * ModLocScale.

[0123] Iterate through all the keys of the user-modified data ModYawInfo, i.e., all the character IDs whose rotations have been modified, to obtain their corresponding Yaw modification value ModYaw, CharTempYaw4 = CharTempYaw3 + ModYaw * ModYawScale.

[0124] This yields the final character positions and rotation values ​​CharLoc and CharYaw. The character positions are then adjusted according to CharLoc and CharYaw to obtain the final data formation, such as... Figure 5 As shown in the fourth picture.

[0125] The data array generation method provided in this application embodiment uses data from each data layer as switches, employs a layered generation approach to gradually reconstruct the data array, and saves this data hierarchy information. The advantages of this application embodiment are as follows:

[0126] 1) Easy to use, efficient and real-time: What you see is what you get, you can immediately adjust the position of the character and record it, and the logic is simple and easy to learn.

[0127] 2) Flexibility: The data is hierarchically independent and can also be used in a collapsed manner. A portion of the data can be replaced and a new group pattern can be regenerated.

[0128] Based on the above method embodiments, this application also provides a data storage device for a data array, see [link to relevant documentation]. Figure 6 As shown, the device includes: an information acquisition module 62, used to acquire data formation creation information; the creation information includes: formation adjustment parameters, original position data, final position data, and character type data corresponding to each character; the formation adjustment parameters include: overall formation scaling parameters, random offset parameters, and user scaling correction values; a type data generation module 64, used to generate formation character type data according to the character type corresponding to each character; a parameter determination module 66, used to determine basic position data and user correction parameters according to the formation adjustment parameters, and the initial and final position data of each character; and a hierarchical storage module 68, used to store the basic position data, user correction parameters, overall formation scaling parameters, random offset parameters, and formation character type data in hierarchical layers.

[0129] Furthermore, the aforementioned data generation module 64 is used to: obtain the character identifier and character type corresponding to each character; multiple character identifiers correspond to a predetermined arrangement order; and according to the arrangement order, traverse the identifier and character type corresponding to each character to generate a dictionary structure of key-value pairs composed of character identifier and character type.

[0130] Furthermore, the aforementioned data generation module 64 is used to: obtain the initial role identifier; generate an identifier type key-value pair based on the initial role identifier and its corresponding initial role type; take the initial role type as the target role type, take the next role identifier of the initial role identifier as the current role identifier, and perform the following judgment steps: determine whether the current role type corresponding to the current role identifier is consistent with the target role type; if not, add the key-value pair composed of the current role identifier and the current role type to the end of the identifier type key-value pair; if yes, take the next role identifier as the current role identifier, continue to perform the judgment steps, until all role identifiers are traversed, and generate a dictionary structure of key-value pairs composed of role identifiers and role types.

[0131] Further, the aforementioned original position data includes: original generated position and original rotation value; the final position data includes: final generated position and final rotation value; the parameter determination module 66 is used to: take the generated position and rotation value corresponding to each role as the current object to be processed, and perform the following steps: generate scaled position data according to the initial data, random offset parameter, and overall scaling parameter corresponding to the current object to be processed; determine the position data to be stored and the user offset correction value according to the final data, user scaling correction value, and scaled position data corresponding to the current object to be processed; use the data list composed of the position data to be stored corresponding to each role as the basic position data; and use the user offset correction value and user scaling correction value corresponding to each role as the user correction parameter.

[0132] Furthermore, the parameter determination module 66 is used to: generate offset position data based on the initial data and the corresponding random offset parameters of the current object to be processed; and generate scaling position data based on the offset data and the overall scaling parameters of the array.

[0133] Furthermore, the aforementioned random offset parameters include: a random seed and a scaling value for the random offset value; the parameter determination module 66 is used to: generate a vector offset value based on a pseudo-random algorithm and a random seed; multiply the vector offset value and the scaling value of the random offset value to obtain a random offset value; and add the initial data corresponding to the current object to be processed and the random offset value to obtain the offset position data.

[0134] Furthermore, the parameter determination module 66 is used to: if the offset data corresponds to the generation position, generate a matrix containing only the scaling data according to the overall array scaling parameters; multiply the offset position data with the matrix to obtain the scaling position data; if the offset data corresponds to the rotation value, use the offset position data as the scaling position data.

[0135] Furthermore, the parameter determination module 66 is used to: if the user scaling correction value is 0, apply the product of the final data corresponding to the current object to be processed and the inverse matrix of the matrix, subtract the corresponding random offset value to obtain the data to be stored, and the corresponding user offset correction value is 0; if the user scaling correction value is not 0, take the original data corresponding to the current object to be processed as the data to be stored, and apply the difference between the final data corresponding to the current object to be processed and the offset position data, divide by the user scaling correction value to obtain the user offset correction value.

[0136] Furthermore, the parameter determination module 66 is used to determine whether the difference between the final data and the offset position data corresponding to the current object to be processed exceeds a preset threshold before the step of dividing the difference between the final data and the offset position data corresponding to the current object to be processed by the user scaling correction value to obtain the user offset correction value. If yes, the step of dividing the difference between the final data and the offset position data corresponding to the current object to be processed by the user scaling correction value to obtain the user offset correction value continues; if no, the step of when the user scaling correction value is 0 continues.

[0137] The device provided in this application embodiment has the same implementation principle and technical effect as the aforementioned method embodiment. For the sake of brevity, any parts of the device embodiment not mentioned can be referred to the corresponding content in the aforementioned method embodiment.

[0138] Based on the above method embodiments, this application also provides a data array generation apparatus. The apparatus is applied to a hardware device, which stores data array data stored using the method described in the above embodiments. The data array data includes: hierarchically stored basic position data, random offset parameters, overall array scaling parameters, user correction parameters, and array role type data. See also... Figure 7 As shown, the device includes: a first formation generation module 72, used to generate a first data formation based on formation role type data and basic position data; a second formation generation module 74, used to perform a first position adjustment on the first data formation based on random offset parameters to generate a second data formation; a third formation generation module 76, used to perform a second position adjustment on the second data formation based on overall formation scaling parameters to generate a third data formation; and a fourth formation generation module 78, used to perform a third position adjustment on the third data formation based on user-corrected parameters to generate a final data formation.

[0139] Furthermore, the aforementioned formation character type data is a dictionary structure consisting of key-value pairs of character identifiers and character types; the basic position data includes: the generation position and rotation value corresponding to each character identifier; the first formation generation module 72 is used to: take the first character identifier in the dictionary structure as the current identifier, and perform the following character generation steps: find the current character type corresponding to the current identifier in the dictionary structure; find the current generation position and current rotation value corresponding to the current identifier in the basic position data; generate the character corresponding to the current character type according to the position determined by the current generation position and the current rotation value; take the next character identifier as the current identifier again, and continue to perform the character generation steps until all character identifiers are traversed to obtain the first data formation.

[0140] Furthermore, the aforementioned second formation generation module 74 is used to perform the following steps for each character in the first data formation: taking the current generated position and current rotation value corresponding to the character as the current data to be processed, generating offset position data according to the current data to be processed and the corresponding random offset parameters; adjusting the position of the character according to the offset position data to generate the second data formation.

[0141] Furthermore, the aforementioned third formation generation module 76 is used to perform the following steps for each character in the second data formation: multiply the offset position data corresponding to the current generated position of the character by the matrix corresponding to the overall formation scaling parameter to obtain the scaling position data; use the offset position data corresponding to the current rotation value of the character as the scaling position data; adjust the size of the character according to the scaling position data to generate the third data formation.

[0142] Furthermore, the aforementioned user correction parameters include: user offset correction value and user scaling correction value; the fourth formation generation module 78 is used to: perform the following steps for each role in the third data formation: multiply the user offset correction value and user scaling correction value corresponding to each role to obtain the correction amount; add the scaling position data of the role to the correction amount to obtain the final position data; adjust the position of the role according to the final position data to generate the final data formation.

[0143] The device provided in this application embodiment has the same implementation principle and technical effect as the aforementioned method embodiment. For the sake of brevity, any parts of the device embodiment not mentioned can be referred to the corresponding content in the aforementioned method embodiment.

[0144] This application also provides an electronic device, such as... Figure 8 The diagram shows the structure of the electronic device, which includes a processor 81 and a memory 80. The memory 80 stores computer-executable instructions that can be executed by the processor 81, and the processor 81 executes the computer-executable instructions to implement the above-described method.

[0145] exist Figure 8 In the illustrated embodiment, the electronic device further includes a bus 82 and a communication interface 83, wherein the processor 81, the communication interface 83, and the memory 80 are connected via the bus 82.

[0146] The memory 80 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 83 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 82 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 82 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0147] Processor 81 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 81 or by instructions in software form. The processor 81 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the memory, and the processor 81 reads the information in the memory and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.

[0148] This application also provides a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions cause the processor to implement the above-described method. For specific implementation details, please refer to the foregoing method embodiments, which will not be repeated here.

[0149] The computer program products of the methods, apparatus, and electronic devices provided in the embodiments of this application include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementations, please refer to the method embodiments, which will not be repeated here.

[0150] Unless otherwise specifically stated, the relative steps, numerical expressions, and values ​​of the components and steps described in these embodiments do not limit the scope of this application.

[0151] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, hardware device, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0152] In the description of this application, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0153] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the technical scope disclosed in this application. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be covered within the protection scope of this application. Therefore, the protection scope of this application should be determined by the protection scope of the claims.

Claims

1. A data storage method, characterized by, The method includes: Obtain the data formation creation information; the creation information includes: formation adjustment parameters, original position data, final position data, and character type data for each character; the formation adjustment parameters include: overall formation scaling parameters, random offset parameters, and user scaling correction values; Generate formation character type data based on the character type corresponding to each character; Based on the formation adjustment parameters and the initial and final position data of each character, determine the basic position data and user correction parameters; The basic location data, the user correction parameters, the overall formation scaling parameters, the random offset parameters, and the formation role type data are stored in layers.

2. The method of claim 1, wherein, The steps for generating formation character type data based on the character type corresponding to each character include: Retrieve the character identifier and character type for each character; multiple character identifiers are arranged in a predetermined order. Following the stated order, iterate through the identifier and role type corresponding to each role to generate a dictionary structure of key-value pairs consisting of role identifier and role type.

3. The method of claim 2, wherein, Following the aforementioned arrangement, traverse the identifier and role type corresponding to each role to generate a dictionary structure of key-value pairs consisting of role identifiers and role types, including: Obtain the initial character identifier; Based on the initial role identifier and its corresponding initial role type, generate identifier type key-value pairs; Using the initial character type as the target character type and the next character identifier of the initial character identifier as the current character identifier, the following judgment steps are performed; Determine whether the current role type corresponding to the current role identifier is consistent with the target role type; If not, append the key-value pair consisting of the current role identifier and the current role type to the end of the identifier type key-value pair; If so, the next role identifier is used as the current role identifier, and the judgment steps are continued until all role identifiers are traversed, generating a dictionary structure of key-value pairs consisting of role identifiers and role types.

4. The method of claim 1, wherein, The original position data includes: the original generated position and the original rotation value; the final position data includes: the final generated position and the final rotation value; the steps of determining the basic position data and user-corrected parameters based on the formation adjustment parameters and the initial and final position data of each character include: For each character, the generated position and rotation value are treated as the current objects to be processed, and the following steps are performed: Based on the initial data corresponding to the current object to be processed, the random offset parameter, and the overall scaling parameter, scale position data is generated; Based on the final data corresponding to the current object to be processed, the user scaling correction value, and the scaling position data, determine the storage position data and the user offset correction value; The data list consisting of the location data to be stored for each role is used as the basic location data; the user offset correction value and user scaling correction value for each role are used as user correction parameters.

5. The method of claim 4, wherein, The step of generating scaling position data based on the initial data corresponding to the current object to be processed, the random offset parameter, and the overall scaling parameter of the formation includes: Based on the initial data and the corresponding random offset parameters of the current object to be processed, offset position data is generated; Based on the offset position data and the overall array scaling parameters, scaled position data is generated.

6. The method of claim 5, wherein, The random offset parameters include: a random seed and a scaling value for the random offset value; the step of generating offset position data based on the initial data corresponding to the current object to be processed and the corresponding random offset parameters includes: Based on the pseudo-random algorithm and the random seed, a vector offset value is generated; Multiply the vector offset value and the scaling value of the random offset value to obtain the random offset value; The initial data corresponding to the current object to be processed is added to the random offset value to obtain the offset position data.

7. The method of claim 5, wherein, The step of generating scaled position data based on the offset position data and the overall array scaling parameters includes: If the offset position data corresponds to the generated position, a matrix containing only scaling data is generated according to the overall scaling parameters of the array; the offset position data is multiplied by the matrix to obtain the scaling position data; If the offset position data corresponds to a rotation value, the offset position data is used as the scaling position data.

8. The method of claim 7, wherein, The step of determining the storage location data and the user offset correction value based on the final data corresponding to the current object to be processed, the user scaling correction value, and the scaling position data includes: If the user scaling correction value is 0, apply the product of the final data corresponding to the current object to be processed and the inverse of the matrix, subtract the corresponding random offset value, and obtain the data to be stored, with the corresponding user offset correction value being 0. If the user scaling correction value is not 0, the original data corresponding to the current object to be processed is used as the data to be stored, and the difference between the final data corresponding to the current object to be processed and the offset position data is divided by the user scaling correction value to obtain the user offset correction value.

9. The method of claim 8, wherein, Before the step of applying the difference between the final data corresponding to the current object to be processed and the offset position data, and dividing it by the user scaling correction value to obtain the user offset correction value, the method further includes: Determine whether the difference between the final data corresponding to the current object to be processed and the offset position data exceeds a preset threshold. If so, continue to execute the step of applying the difference between the final data corresponding to the current object to be processed and the offset position data, dividing it by the user scaling correction value, to obtain the user offset correction value. If not, continue with the steps for when the user scaling correction value is 0.

10. A method of generating a data array, characterized by The method is applied to a hardware device that stores data array data stored by the data storage method as described in any one of claims 1-9; The data formation data includes: hierarchically stored basic position data, user-corrected parameters, overall formation scaling parameters, random offset parameters, and formation role type data; the method includes: A first data formation is generated based on the formation role type data and the basic position data; The first data array is adjusted in the first position according to the random offset parameter to generate the second data array. The second data array is adjusted in a second position according to the overall scaling parameters of the array to generate a third data array; The third data array is adjusted in the third position according to the user-corrected parameters to generate the final data array.

11. The method of claim 10, wherein, The formation character type data is a dictionary structure of key-value pairs consisting of character identifiers and character types; the basic position data includes: the generation position and rotation value corresponding to each character identifier; based on the formation character type data and the basic position data, a first data formation is generated, including: Using the first role identifier in the dictionary structure as the current identifier, perform the following role generation steps: Find the current role type corresponding to the current identifier from the dictionary structure; Find the current generated position and current rotation value corresponding to the current identifier from the basic position data; Generate a character corresponding to the current character type according to the current generation position and the position determined by the current rotation value; The next character identifier is used as the current identifier, and the character generation steps are continued until all character identifiers have been traversed to obtain the first data array.

12. The method of claim 11, wherein, The first data array is adjusted in a first position according to the random offset parameter to generate a second data array, including: For each role in the first data array, perform the following steps: The current generated position and the current rotation value of the character are used as the current data to be processed. Based on the current data to be processed and the corresponding random offset parameters, offset position data is generated. The position of the character is adjusted according to the offset position data to generate the second data formation.

13. The method of claim 10, wherein, The second data array is adjusted in a second position according to the overall scaling parameters of the array to generate a third data array, including: For each role in the second data array, perform the following steps: The offset position data corresponding to the current generated position of the character is multiplied by the matrix corresponding to the overall scaling parameter of the formation to obtain the scaling position data; Use the offset position data corresponding to the current rotation value of the character as the scaling position data; Adjust the size of the character according to the scaling position data to generate a third data formation.

14. The method of claim 10, wherein, The user correction parameters include: user offset correction value and user scaling correction value; the step of adjusting the third position of the third data array according to the user correction parameters to generate the final data array includes: For each role in the third data array, the following steps are performed: Multiply the user offset correction value corresponding to each character by the user scaling correction value to obtain the correction amount; add the scaling position data of the character to the correction amount to obtain the final position data; adjust the position of the character according to the final position data to generate the final data array.

15. A data storage device, characterized by The device includes: The information acquisition module is used to acquire the data formation creation information; the creation information includes: formation adjustment parameters, original position data, final position data and character type data for each character; the formation adjustment parameters include: overall formation scaling parameters, random offset parameters and user scaling correction values; The type data generation module is used to generate formation character type data based on the character type corresponding to each character; The parameter determination module is used to determine the basic position data and user-corrected parameters based on the formation adjustment parameters, the initial position data and the final position data of each role; The hierarchical storage module is used to store the basic position data, the user correction parameters, the overall formation scaling parameters, the random offset parameters, and the formation role type data in a hierarchical manner.

16. An apparatus for generating a data array, comprising: The device is applied to a hardware device that stores data array data stored by the data storage method as described in any one of claims 1-9; The data array data includes: hierarchically stored basic position data, random offset parameters, overall array scaling parameters, user correction parameters, and array role type data; the device includes: The first formation generation module is used to generate a first data formation based on the formation role type data and the basic position data; The second formation generation module is used to adjust the first position of the first data formation according to the random offset parameter to generate the second data formation. The third formation generation module is used to adjust the second position of the second data formation according to the overall formation scaling parameters to generate the third data formation. The fourth formation generation module is used to adjust the third position of the third data formation according to the user-corrected parameters to generate the final data formation.

17. An electronic device, comprising: The method includes a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the method of any one of claims 1 to 14.

18. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions that, when invoked and executed by a processor, cause the processor to perform the method according to any one of claims 1 to 14.