CN111966844A - Object loading method and device and storage medium - Google Patents
Object loading method and device and storage medium Download PDFInfo
- Publication number
- CN111966844A CN111966844A CN202010828699.6A CN202010828699A CN111966844A CN 111966844 A CN111966844 A CN 111966844A CN 202010828699 A CN202010828699 A CN 202010828699A CN 111966844 A CN111966844 A CN 111966844A
- Authority
- CN
- China
- Prior art keywords
- objects
- loading
- queue
- grouped
- adjusted
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/51—Indexing; Data structures therefor; Storage structures
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/45—Controlling the progress of the video game
- A63F13/48—Starting a game, e.g. activating a game device or waiting for other players to join a multiplayer session
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/53—Querying
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/58—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
- G06F16/583—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Databases & Information Systems (AREA)
- Library & Information Science (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Computation (AREA)
- Evolutionary Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Software Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Artificial Intelligence (AREA)
- Stored Programmes (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The application provides a method and a device for loading an object and a storage medium. The method comprises the following steps: acquiring M objects to be loaded, and arranging the M objects into an initial queue, wherein M is an integer greater than 1; randomly exchanging the positions of the M objects in the initial queue to obtain an adjusted queue; and simultaneously loading the M objects according to the adjusted sequence of the queue. Due to the fact that the objects needing to be loaded are reordered in a random mode, the sequence of the ordered objects can meet the loading requirement. Therefore, the M objects are loaded simultaneously according to the sequence of the adjusted queue, so that the multiple objects are loaded simultaneously under the random condition, the condition that the waiting time of a user is not uniform is avoided, and the use experience of the user is improved.
Description
Technical Field
The present application relates to the field of computers, and in particular, to a method and an apparatus for loading an object, and a storage medium.
Background
At present, in some application scenarios, objects need to be loaded from an object pool to a next scenario at random to ensure the randomness of the scenario. For example, in a game scene, players (i.e., players) of a game are randomly selected from a player pool, and the randomly selected players are loaded into a battle scene to battle.
However, at present, a sequential random mode is generally adopted, that is, objects are sequentially and randomly selected, and then the selected objects are sequentially loaded into a scene of the next step. For example, in a game scene, two or even a plurality of players are randomly selected from a player pool, and then the players are loaded into a battle scene. The pool of players then continues to randomly draw two or even more players and continue loading, and so on until all players have loaded.
It can be understood that, although this way can complete loading of all objects, if an object is selected first, it is perceived by the user that it is loaded to the next scene in a short time, for example, it is loaded to the next scene after waiting for 1 second; however, if the object is selected too far back, it is perceived by the user to wait a long time before being loaded into the next scene, for example, 1 minute before being loaded into the next scene. This non-uniformity of duration may result in a poor user experience.
Disclosure of Invention
An object of the embodiments of the present application is to provide an object loading method and apparatus, and a storage medium, so as to implement loading multiple objects simultaneously under a random condition, avoid uneven waiting time of a user, and improve user experience.
In a first aspect, an embodiment of the present application provides an object loading method, where the method includes: acquiring M objects to be loaded, and arranging the M objects into an initial queue, wherein M is an integer greater than 1; randomly exchanging the positions of the M objects in the initial queue to obtain an adjusted queue; and simultaneously loading the M objects according to the adjusted sequence of the queue.
In the embodiment of the application, the objects to be loaded are reordered in a random manner, so that the order of the ordered objects can meet the loading requirement. Therefore, the M objects are loaded simultaneously according to the sequence of the adjusted queue, so that the multiple objects are loaded simultaneously under the random condition, the condition that the waiting time of a user is not uniform is avoided, and the use experience of the user is improved.
With reference to the first aspect, in a first possible implementation manner, the number of times of the random swapping is multiple, and each step of the random swapping includes: randomly determining M objects to be exchanged from the initial queue, wherein M is an integer which is greater than 1 and less than M; adjusting the positions of the m objects in the initial queue.
In the embodiment of the present application, since the random swapping is performed multiple times according to the same logic, it can be ensured that the sequence of the objects in the adjusted queue is completely random and unordered.
With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner, randomly determining M objects to be exchanged from the M objects includes: randomly determining a first object to be exchanged from a first object to an M-M +1 object of the initial queue, randomly determining a second object to be exchanged from an object behind the first object to be exchanged to the M-M +2 object of the initial queue, and repeating the steps until the mth object is determined.
In the embodiment of the application, because the range of each query is gradually reduced, the objects needing to be exchanged can be determined in order and effectively.
With reference to the first aspect, in a third possible implementation manner, the loading the M objects simultaneously according to the adjusted sequence of the queue includes: limiting the number of the objects according to a preset scene, and grouping the M objects for N times according to the sequence to obtain N +1 groups of objects, wherein N is an integer greater than or equal to 1; and simultaneously loading the N +1 groups of objects into respective corresponding scenes.
In the embodiment of the application, the number of each group of objects in grouping is in accordance with the requirements of the scene, so that each group of objects can be correctly loaded into the corresponding scene.
With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation manner, i takes any one of values 1 to N, and the grouping for the ith time includes: determining the objects grouped for the ith time from the objects which are not grouped according to the limitation of the scene on the number of the objects and the sequence; if the number of the objects grouped at the ith time is multiple, judging whether similar objects exist in the multiple objects or not; if so, replacing the similar objects in the plurality of objects with other objects in the objects which are not grouped yet, and ending the grouping for the ith time when the plurality of objects have no similar objects, wherein the objects which are not grouped yet are the objects in the M objects.
In the embodiment of the application, similar objects can be prevented from being grouped into one group through similar object replacement, so that the grouping is more random and reasonable.
With reference to the fourth possible implementation manner of the first aspect, in a fifth possible implementation manner, the determining whether there is a similar object in the multiple objects includes: and judging whether the objects have objects with adjacent ranks, wherein the objects with adjacent ranks are the similar objects.
In the embodiment of the application, the ranking of the objects is intuitive and objective, so that similar objects can be intuitively and objectively determined through adjacent rankings.
With reference to the fourth possible implementation manner of the first aspect, in a sixth possible implementation manner, the other objects are objects, which are sorted to be adjacent to the multiple objects, in the objects that have not been grouped.
In the embodiment of the application, the other objects are objects which are sequenced and adjacent to the plurality of objects in the objects which are not grouped, so that the other objects can be quickly found by sequencing and adjacent to each other, and the objects can be efficiently replaced.
With reference to the fourth possible implementation manner of the first aspect, in a seventh possible implementation manner, i takes N, and the grouping for the ith time further includes: and when grouping is performed for the ith time, if the number of objects which are not grouped is less than the limit of the scene on the number of objects, the objects which are not grouped are separately grouped into one group.
In the embodiment of the application, the objects which are finally less than the limit of the number of the scene pairs are taken as a group, so that the integrity of the grouping can be ensured, and the grouping failure caused by the grouping logic can be avoided.
In a second aspect, an embodiment of the present application provides an apparatus for loading an object, where the apparatus includes: the device comprises an object acquisition module, a storage module and a loading module, wherein the object acquisition module is used for acquiring M objects to be loaded and arranging the M objects into an initial queue, and M is an integer greater than 1; the object processing module is used for randomly exchanging the positions of the M objects in the initial queue to obtain an adjusted queue; and simultaneously loading the M objects according to the adjusted sequence of the queue.
With reference to the second aspect, in a first possible implementation manner, the number of times of the random swapping is multiple, and the object processing module is configured to perform each random swapping, where each random swapping is: randomly determining M objects to be exchanged from the initial queue, wherein M is an integer which is greater than 1 and less than M; adjusting the positions of the m objects in the initial queue.
With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner, the object processing module is configured to randomly determine a first object to be exchanged from a first object to an M-M +1 th object in the initial queue, then randomly determine a second object to be exchanged from an object after the first object to be exchanged to the M-M +2 th object in the initial queue, and so on until the M-th object is determined.
With reference to the second aspect, in a third possible implementation manner, the object processing module is configured to limit the number of objects according to a preset scene, and group the M objects N times according to the sorting to obtain N +1 groups of objects, where N is an integer greater than or equal to 1; and simultaneously loading the N +1 groups of objects into respective corresponding scenes.
With reference to the third possible implementation manner of the second aspect, in a fourth possible implementation manner, i takes any value from 1 to N, and the object processing module is configured to execute an ith grouping, where the ith grouping is: determining the objects grouped for the ith time from the objects which are not grouped according to the limitation of the scene on the number of the objects and the sequence; if the number of the objects grouped at the ith time is multiple, judging whether similar objects exist in the multiple objects or not; if so, replacing the similar objects in the plurality of objects with other objects in the objects which are not grouped yet, and ending the grouping for the ith time when the plurality of objects have no similar objects, wherein the objects which are not grouped yet are the objects in the M objects.
With reference to the fourth possible implementation manner of the second aspect, in a fifth possible implementation manner, the object processing module is configured to determine whether there is an object with an adjacent ranking to the plurality of objects, where the object with the adjacent ranking is the similar object.
With reference to the fourth possible implementation manner of the second aspect, in a sixth possible implementation manner, the other objects are objects, of which the ranks are adjacent to the plurality of objects, in objects that have not been grouped yet.
With reference to the fourth possible implementation manner of the second aspect, in a seventh possible implementation manner, i is N, and the object processing module is further configured to, during grouping for the ith time, if the number of objects that have not been grouped is less than the limit of the scene on the number of objects, separately group the objects that have not been grouped.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium having a computer-executable non-volatile program code, where the program code causes the computer to execute the method for loading an object according to the first aspect or any one of the possible implementation manners of the first aspect.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a flowchart of an object loading method according to an embodiment of the present application;
fig. 2 is a first application scene diagram of an object loading method according to an embodiment of the present application;
fig. 3 is a second application scene diagram of an object loading method according to an embodiment of the present application;
fig. 4 is a block diagram of an electronic device according to an embodiment of the present disclosure;
fig. 5 is a block diagram of a structure of an object loading apparatus according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
Referring to fig. 1, an embodiment of the present application provides an object loading method, where the object loading method may be executed by an electronic device, where the electronic device may be a terminal or a server, and a flow of the object loading method may include:
step S100: m objects to be loaded are obtained, and the M objects are arranged into an initial queue, wherein M is an integer larger than 1.
Step S200: and randomly exchanging the positions of the M objects in the initial queue to obtain an adjusted queue.
Step S300: and loading the M objects simultaneously according to the sequence of the adjusted queue.
The above-described flow will be described in detail with reference to the scenario.
Step S100: m objects to be loaded are obtained, and the M objects are arranged into an initial queue, wherein M is an integer larger than 1.
In this embodiment, the scheme according to the present application is applied in different scenarios, and the specific concept of the object is also different. As a mode, the scheme of the application can be applied to a game interaction scene, and in the game interaction scene, the object can represent player information of a player participating in the game interaction; as another way, the scheme of the present application may also be applied to an image collision matching scenario, where an object may represent a picture that needs to be collision matched.
Of course, the scheme of the present application is not limited to be applied to the above two scenarios, for example, the scheme of the present application may also be applied to a scenario of parameter analysis.
In this embodiment, the electronic device first needs to acquire M objects that need to be loaded at the same time.
In a game interaction scenario, after each player submits a request for participating in the game interaction scenario, for example, the player starts match of a match, the electronic device may acquire player information of each player. By submitting the request continuously by each player, the electronic device continuously acquires information of each player. After the electronic device obtains the player information of all the players needing to be loaded, the electronic device can perform the next operation.
In an image collision matching scene, all pictures needing collision matching are stored in the bottom library pool of the image, and the electronic equipment can take out M pictures from the bottom library pool of the image according to the sequence of picture storage. After the electronic device acquires the M pictures, the electronic device can perform the next operation.
The electronic device may arrange the M objects into an initial queue according to the order of the M objects at the time of acquisition, for example, the electronic device may put the M objects into a constructed array according to the order of the M objects at the time of acquisition, thereby forming the initial queue.
In a game interaction scene, the electronic equipment puts M pieces of player information into an array according to the order of submitting requests, so that the information in each position in the array is one piece of player information.
In the image collision matching scene, the electronic equipment puts the M pictures into the array according to the storage sequence of the M pictures in the bottom library pool, so that the information in each position in the array is one picture.
Step S200: and randomly exchanging the positions of the M objects in the initial queue to obtain an adjusted queue.
Since it is necessary to ensure that M objects are random and unordered during subsequent loading, after the initial queue is generated, the positions of the M objects in the initial queue need to be randomly exchanged. For example, the positions of M objects in the initial queue are randomly swapped multiple times under the same swap logic. It is to be understood that since each random swap uses substantially the same swap logic, for ease of understanding, the present embodiment is described with a certain random swap example.
For this random transposition:
first, the electronic device may randomly determine M objects to be exchanged from the initial queue, where M is an integer greater than 1 and less than M.
As an exemplary way to determine M objects, the electronic device may randomly determine a first object to be exchanged from a first object to an M-M +1 th object in the initial queue; for example, the electronic device may randomly generate a first index value in a range from 1 to M-M +1, and find a position corresponding to the first index value in the array, where an object at the position is the first object to be exchanged. Then, the electronic equipment randomly determines a second object to be exchanged from the first object to be exchanged to the (M-M + 2) th object; for example, the electronic device may randomly generate a second index value within a range from the first index value to M-M +2, and find a position corresponding to the second index value in the array, where an object at the position is a second object to be exchanged. And the analogy is repeated until the m-th object is determined.
The following description is made on the assumption.
As shown in fig. 2, the array S has 10 positions in total, then the first position value of the array S is 1, the last position value of the array S is 10, and the number of the objects to be exchanged is 3.
Assume that 1: for the first object, the first index value randomly generated by the electronic device between 1-8 is 3, and then the electronic device determines that the object 3 at the third position in the array S is the first object to be exchanged.
For the second object, the second index value randomly generated by the electronic device between 4-9 is 9, and then the electronic device determines the pair at the ninth position in the array S as the second object to be swapped.
For the third object, at this time, the random range of the third object is limited to 10, although random is adopted, the electronic device can only determine that the third index value is 10, and then the electronic device determines that the object 10 at the tenth position in the array S is the third object to be exchanged.
As another exemplary way to determine M objects, the electronic device may randomly generate M objects at a time from the first object to the mth object in the initial queue. For example, the electronic device may randomly generate M different index values at a time in a range from 1 to M, and find a corresponding position of each index value in the array, thereby determining M objects at a time.
In this embodiment, after determining the m objects that need to be exchanged, the electronic device may adjust positions of the m objects in the initial queue, that is, positions of the m objects in the array.
As an exemplary way to adjust the positions of the m objects in the array, the electronic device may swap the positions of the objects in the array among the m objects with the positions of the other objects in the array among the m objects, and it is necessary to ensure that the adjusted ordering is different from the ordering before the adjustment.
For example, taking the assumption 1 as an example, the electronic device may swap the positions of the object 3 and the object 9; alternatively, the electronic device may exchange the positions of the object 3 and the object 9 first, and exchange the positions of the object 10 and the object 3 based on the exchange.
As another exemplary way to adjust the positions of the m objects in the array, the electronic device may randomly determine other objects besides the m objects, and then exchange the positions of the objects in the array of the m objects with the positions of the other objects in the array, and also need to ensure that the adjusted ordering is different from the ordering before the adjustment.
For example, taking the assumption 1 as an example, the electronic device randomly determines that the other objects are the object 2, the object 5 and the object 7, respectively, and then the electronic device may swap the positions of the object 3 and the object 2, swap the positions of the object 9 and the object 7, and swap the positions of the object 5 and the object 10 again; or, the electronic device randomly determines that the other object is the object 2, and the electronic device may swap the positions of the object 2 and the object 3, swap the positions of the object 9 and the object 2 after swapping, and swap the positions of the object 10 and the object 2 after swapping again.
Continuing with the description of hypothesis 1, as shown in fig. 3, after 10 random swaps are performed, the ordering of the objects in the array S may be: object 3, object 6, object 2, object 8, object 9, object 1, object 4, object 5, object 10, object 7.
In this embodiment, after the electronic device performs multiple random exchanges, the adjusted queue may be obtained, and step S300 is performed on the adjusted queue.
Step S300: and loading the M objects simultaneously according to the sequence of the adjusted queue.
According to different application scenes, the loading modes of the M objects are all different.
In this embodiment, if M objects need to be loaded into the same scene at the same time, the M objects need not be grouped, and the M objects may be loaded into the same scene at the same time according to the adjusted sequence of the queues.
Aiming at the game interaction scene, M players need to fight in the same scene at the same time, and the electronic equipment loads the information of the M players at the same time according to the adjusted sequence of the queue, so that the M players can enter the same scene at the same time to fight. Moreover, the position of the information of each player in the adjusted queue can determine the birth position of the player in the scene, and the randomness and the disorder of the adjusted queue ensure that the birth position of the player in the scene is random and disordered, thereby enhancing the game experience of the player.
If M objects need to be added into respective corresponding scenes, the electronic device needs to set the number of the objects according to the scenes and group the M objects for N times according to the adjusted sequence of the queues, so as to obtain N +1 groups of objects, wherein N is an integer greater than or equal to 1. And finally, the electronic equipment loads the N +1 groups of objects into respective corresponding scenes simultaneously.
Aiming at a game interaction scene, M players need to fight in respective corresponding scenes, the information of the M players can be grouped for N times according to the requirement of the number of the fighting players in the scene and the adjusted sequence of the queue, so that the information of N +1 groups of players is obtained, and then the information of each group of players is loaded into one scene simultaneously, so that the same group of players fight in the same scene.
It can be understood that, because the adjusted queues are random and unordered, the opponents of the player group battle are completely random and unordered when the players play the battle, and therefore the game experience of the players is enhanced.
And for an image collision matching scene, M pictures need to be grouped for collision matching, the electronic equipment collides with the number of the pictures needed for matching, and the M pictures are grouped for N times according to the adjusted sequence of the queue, so that N +1 groups of pictures are obtained, and then each group of pictures is loaded simultaneously, so that the same group of pictures are subjected to collision matching.
It can also be understood that, since the adjusted queues are random and unordered, each group of pictures subjected to collision matching is random and unordered, and thus the picture collision matching effect is enhanced.
It should be noted that, when the last grouping is performed, that is, the nth grouping is performed, if there is only one object that has not been grouped in the M objects, the electronic device separately groups the objects that have not been grouped into one group regardless of how many objects are previously grouped into one group, so as to ensure the integrity of the whole grouping process and avoid the occurrence of a grouping failure due to a logical reason.
In this embodiment, when the scheme of the application is applied to a game interaction scene, the electronic device may further perform fine adjustment on the grouping of the objects if necessary, so as to ensure that the grouping is more reasonable.
Specifically, i takes any value from 1 to N, and when the electronic equipment performs grouping for the ith time, the electronic equipment determines the objects grouped for the ith time from the objects which are not grouped yet according to the limitation of the scene to the number of the objects and the adjusted sequence of the queue.
If the number of the objects grouped at the ith time is multiple, the electronic equipment judges whether similar objects exist in the multiple objects or not. For example, the electronic device may determine whether there is an object whose ranking (in this scenario, the ranking of the object is the ranking of the player in the game) is adjacent to the plurality of objects, and the object whose ranking is adjacent is a similar object. For another example, the electronic device may determine whether there is an object with the same characteristics (in this scenario, the characteristics of the object are the technical type that the player excels in the game) among the plurality of objects, and the object with the same characteristics is a similar object.
If not, the electronic equipment ends the ith grouping, and the plurality of objects are used as a group of objects for subsequent loading.
If so, the electronic device replaces similar objects in the plurality of objects with other objects in the objects that have not been grouped, wherein the other objects may be objects in the objects that have not been grouped that are ordered adjacent to the plurality of objects. After the replacement, the electronic device continues to determine whether there is a similar object, until the plurality of objects have no similar object, the electronic device ends the ith grouping.
It should be noted that, in addition to the above adjustment manner, only the first and second ranked objects may be considered, and it is only necessary to ensure that the first and second objects are not grouped into one group in the grouping process.
With reference to fig. 3, the description continues with hypothesis 1.
In terms of the limitation of the number of objects by the scene, each scene requires adding two objects, the electronic device may group 10 objects in the array S according to the number of each group being 2 and the ordering of the array S in fig. 3, where the value behind the objects represents the ranking of the objects.
Specifically, the electronic device first divides the object 3 and the object 6 into one group, and obviously, the ranking of the object 3 is 3, the ranking of the object 6 is 6, and the two are not adjacent, so that the object 3 and the object 6 are finally used as a group of objects.
The electronic device further groups the object 2 and the object 8 into one group, and obviously, the ranking of the object 2 is 2 and the ranking of the object 8 is 8, the two are not adjacent, so that the object 2 and the object 8 finally serve as one group of objects.
The electronic device further groups the object 9 and the object 1 into one group, and obviously, the ranking of the object 9 is 9 and the ranking of the object 1 is 1, which are not adjacent to each other, so that the object 9 and the object 1 finally serve as one group of objects.
The electronic device further groups the objects 4 and 5 into one group, and obviously, the object 4 is ranked 4 and the object 5 is ranked 5, which are adjacent to each other, so the electronic device needs to replace the object 5 with the adjacent object 10. For example, the electronic device may swap the positions of the object 5 and the object 10 in the array S such that the object 4 and the object 10 are adjacent, thereby finally treating the object 4 and the object 10 as a set of objects.
Finally, since the object 5 and the object 7 are adjacent due to the position exchange, the electronic device finally divides the object 5 and the object 7 into a group of objects.
Referring to fig. 4, based on the same inventive concept, the present embodiment provides an electronic device 10, and the electronic device 10 may include a communication interface 11 connected to a network, one or more processors 12 for executing program instructions, a bus 13, and a memory 14 in different forms, such as a disk, a ROM, or a RAM, or any combination thereof. Illustratively, the computer platform may also include program instructions stored in ROM, RAM, or other types of non-transitory storage media, or any combination thereof.
The memory 14 is used for storing programs, and the processor 12 is used for calling and running the programs in the memory 14 to execute the aforementioned loading method of the object.
Referring to fig. 5, based on the same inventive concept, an embodiment of the present application provides an object loading apparatus 100, where the object loading apparatus 100 may be applied to an electronic device, and the object loading apparatus 100 may include:
the object obtaining module 110 is configured to obtain M objects to be loaded, and arrange the M objects into an initial queue, where M is an integer greater than 1.
An object processing module 120, configured to randomly swap the positions of the M objects in the initial queue to obtain an adjusted queue; and simultaneously loading the M objects according to the adjusted sequence of the queue.
It should be noted that, as those skilled in the art can clearly understand, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Some embodiments of the present application further provide a computer-readable storage medium of a computer-executable nonvolatile program code, which can be a general-purpose storage medium such as a removable disk, a hard disk, or the like, and the computer-readable storage medium stores a program code thereon, which when executed by a computer performs the steps of the loading method of the object of any of the above embodiments.
The program code product of the object loading method provided in the embodiment of the present application includes a computer-readable storage medium storing the program code, and instructions included in the program code may be used to execute the method in the foregoing method embodiment, and specific implementation may refer to the method embodiment, which is not described herein again.
In summary, the objects to be loaded are reordered in a random manner, so that the order of the ordered objects can meet the loading requirement. Therefore, the M objects are loaded simultaneously according to the sequence of the adjusted queue, so that the multiple objects are loaded simultaneously under the random condition, the condition that the waiting time of a user is not uniform is avoided, and the use experience of the user is improved.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims (10)
1. A method for loading an object, the method comprising:
acquiring M objects to be loaded, and arranging the M objects into an initial queue, wherein M is an integer greater than 1;
randomly exchanging the positions of the M objects in the initial queue to obtain an adjusted queue;
and simultaneously loading the M objects according to the adjusted sequence of the queue.
2. The method for loading an object according to claim 1, wherein the number of random exchanges is a plurality of times, and each step of random exchange comprises:
randomly determining M objects to be exchanged from the initial queue, wherein M is an integer which is greater than 1 and less than M;
adjusting the positions of the m objects in the initial queue.
3. The method for loading objects according to claim 2, wherein randomly determining M objects to be exchanged from the M objects comprises:
randomly determining a first object to be exchanged from a first object to an M-M +1 object of the initial queue, randomly determining a second object to be exchanged from an object behind the first object to be exchanged to the M-M +2 object of the initial queue, and repeating the steps until the mth object is determined.
4. The method of loading objects according to claim 1, wherein loading the M objects simultaneously in the adjusted queue order comprises:
limiting the number of the objects according to a preset scene, and grouping the M objects for N times according to the sequence to obtain N +1 groups of objects, wherein N is an integer greater than or equal to 1;
and simultaneously loading the N +1 groups of objects into respective corresponding scenes.
5. The method for loading the object according to claim 4, wherein i takes any value from 1 to N, and the step of grouping the ith time comprises the following steps:
determining the objects grouped for the ith time from the objects which are not grouped according to the limitation of the scene on the number of the objects and the sequence;
if the number of the objects grouped at the ith time is multiple, judging whether similar objects exist in the multiple objects or not;
if so, replacing the similar objects in the plurality of objects with other objects in the objects which are not grouped yet, and ending the grouping for the ith time when the plurality of objects have no similar objects, wherein the objects which are not grouped yet are the objects in the M objects.
6. The method of claim 5, wherein determining whether there is a similar object in the plurality of objects comprises:
and judging whether the objects have objects with adjacent ranks, wherein the objects with adjacent ranks are the similar objects.
7. The method of loading an object according to claim 5,
the other objects are objects of the objects which are not grouped yet and are adjacent to the plurality of objects in the ordering mode.
8. The method for loading the object according to claim 5, wherein i is N, and the step of grouping i for the ith time further comprises:
and when grouping is performed for the ith time, if the number of objects which are not grouped is less than the limit of the scene on the number of objects, the objects which are not grouped are separately grouped into one group.
9. An apparatus for loading an object, the apparatus comprising:
the device comprises an object acquisition module, a storage module and a loading module, wherein the object acquisition module is used for acquiring M objects to be loaded and arranging the M objects into an initial queue, and M is an integer greater than 1;
the object processing module is used for randomly exchanging the positions of the M objects in the initial queue to obtain an adjusted queue; and simultaneously loading the M objects according to the adjusted sequence of the queue.
10. A computer-readable storage medium having computer-executable non-volatile program code, wherein the program code causes the computer to perform a method of loading an object according to any one of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010828699.6A CN111966844B (en) | 2020-08-17 | 2020-08-17 | Object loading method, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010828699.6A CN111966844B (en) | 2020-08-17 | 2020-08-17 | Object loading method, device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111966844A true CN111966844A (en) | 2020-11-20 |
CN111966844B CN111966844B (en) | 2023-09-26 |
Family
ID=73388477
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010828699.6A Active CN111966844B (en) | 2020-08-17 | 2020-08-17 | Object loading method, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111966844B (en) |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104216759A (en) * | 2014-08-27 | 2014-12-17 | 华为技术有限公司 | Method and device for generating logical disk of virtual machine |
CN106669146A (en) * | 2016-12-30 | 2017-05-17 | 腾讯科技(深圳)有限公司 | Method and device for selecting matching group members |
KR20170077629A (en) * | 2015-12-28 | 2017-07-06 | 주식회사 넥슨코리아 | Method and device for matching game players using queue |
CN107004289A (en) * | 2014-12-12 | 2017-08-01 | 三菱电机株式会社 | Information processor, moving image reproduction method and dynamic image reproduce program |
CN107203365A (en) * | 2016-03-17 | 2017-09-26 | 阿里巴巴集团控股有限公司 | The generation of random number and acquisition methods and device |
CN107644018A (en) * | 2016-07-20 | 2018-01-30 | 平安科技(深圳)有限公司 | picture loading method and device |
CN109298905A (en) * | 2018-08-15 | 2019-02-01 | 深圳点猫科技有限公司 | Utilize the method and electronic equipment of the optimization picture lazyness load of front end programming language |
CN109603155A (en) * | 2018-11-29 | 2019-04-12 | 网易(杭州)网络有限公司 | Merge acquisition methods, device, storage medium, processor and the terminal of textures |
CN109992284A (en) * | 2019-03-29 | 2019-07-09 | 北京金山安全软件有限公司 | Method and device for providing hot update program and electronic equipment |
CN110087076A (en) * | 2019-04-09 | 2019-08-02 | 华南理工大学 | A kind of more method for compressing image based on hierarchical block replacement |
CN110851043A (en) * | 2019-11-14 | 2020-02-28 | 腾讯科技(深圳)有限公司 | Page display method and device, storage medium and electronic device |
-
2020
- 2020-08-17 CN CN202010828699.6A patent/CN111966844B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104216759A (en) * | 2014-08-27 | 2014-12-17 | 华为技术有限公司 | Method and device for generating logical disk of virtual machine |
CN107004289A (en) * | 2014-12-12 | 2017-08-01 | 三菱电机株式会社 | Information processor, moving image reproduction method and dynamic image reproduce program |
KR20170077629A (en) * | 2015-12-28 | 2017-07-06 | 주식회사 넥슨코리아 | Method and device for matching game players using queue |
CN107203365A (en) * | 2016-03-17 | 2017-09-26 | 阿里巴巴集团控股有限公司 | The generation of random number and acquisition methods and device |
CN107644018A (en) * | 2016-07-20 | 2018-01-30 | 平安科技(深圳)有限公司 | picture loading method and device |
CN106669146A (en) * | 2016-12-30 | 2017-05-17 | 腾讯科技(深圳)有限公司 | Method and device for selecting matching group members |
CN109298905A (en) * | 2018-08-15 | 2019-02-01 | 深圳点猫科技有限公司 | Utilize the method and electronic equipment of the optimization picture lazyness load of front end programming language |
CN109603155A (en) * | 2018-11-29 | 2019-04-12 | 网易(杭州)网络有限公司 | Merge acquisition methods, device, storage medium, processor and the terminal of textures |
CN109992284A (en) * | 2019-03-29 | 2019-07-09 | 北京金山安全软件有限公司 | Method and device for providing hot update program and electronic equipment |
CN110087076A (en) * | 2019-04-09 | 2019-08-02 | 华南理工大学 | A kind of more method for compressing image based on hierarchical block replacement |
CN110851043A (en) * | 2019-11-14 | 2020-02-28 | 腾讯科技(深圳)有限公司 | Page display method and device, storage medium and electronic device |
Non-Patent Citations (2)
Title |
---|
JUSTIN MANWEILER 等: "Switchboard: a matchmaking system for multiplayer mobile games", MOBISYS \'11: PROCEEDINGS OF THE 9TH INTERNATIONAL CONFERENCE ON MOBILE SYSTEMS, APPLICATIONS, AND SERVICES, pages 71 - 84 * |
何人可 等: "基于时间知觉的移动APP页面加载方式研究", 包装工程, vol. 38, no. 18, pages 56 - 61 * |
Also Published As
Publication number | Publication date |
---|---|
CN111966844B (en) | 2023-09-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11759714B2 (en) | Method for implementing user matching and related device | |
Zhuang et al. | A fast parallel SGD for matrix factorization in shared memory systems | |
CN111659126B (en) | Distribution method, device, server, terminal and storage medium of matching process | |
US10831693B1 (en) | Multicast master | |
US9811979B2 (en) | Method and system for processing electronic chess and card data | |
CN111143331B (en) | Data migration method, device and computer storage medium | |
US11138106B1 (en) | Target port with distributed transactions | |
US11275661B1 (en) | Test generation of a distributed system | |
CN111984400A (en) | Memory allocation method and device of neural network | |
CN112619158A (en) | Matching method and device of virtual event, storage medium and electronic device | |
CN113617033B (en) | Virtual character selection method, device, terminal and storage medium | |
CN111135586A (en) | Game matching method, game matching device, storage medium and electronic device | |
JP7335739B2 (en) | SYSTEM, METHOD AND PROGRAM FOR PROVIDING A GAME | |
CN111966844A (en) | Object loading method and device and storage medium | |
CN111111216B (en) | Matching method, device, server and storage medium | |
US20230256335A1 (en) | Display method and apparatus for real-time battle information, terminal, and storage medium | |
US20230016371A1 (en) | Method, program, system, and server for program verification | |
US9149725B2 (en) | Method and server for PVP team matching in computer games | |
CN112764897B (en) | Task request processing method, device and system and computer readable storage medium | |
CN114047918A (en) | Task processing method, device, equipment, storage medium and product | |
US10997277B1 (en) | Multinomial distribution on an integrated circuit | |
US10178221B2 (en) | Time synchronization method and apparatus | |
CN114307168B (en) | Team matching method, device, system, equipment and medium | |
CN113797549B (en) | Method and device for processing resource object, computer equipment and storage medium | |
CN116650970B (en) | Personalized game adjustment method, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |