CN111966844B - Object loading method, device and storage medium - Google Patents

Object loading method, device and storage medium Download PDF

Info

Publication number
CN111966844B
CN111966844B CN202010828699.6A CN202010828699A CN111966844B CN 111966844 B CN111966844 B CN 111966844B CN 202010828699 A CN202010828699 A CN 202010828699A CN 111966844 B CN111966844 B CN 111966844B
Authority
CN
China
Prior art keywords
objects
loading
grouped
scene
queue
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.)
Active
Application number
CN202010828699.6A
Other languages
Chinese (zh)
Other versions
CN111966844A (en
Inventor
冯志远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Pixel Software Technology Co Ltd
Original Assignee
Beijing Pixel Software Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Pixel Software Technology Co Ltd filed Critical Beijing Pixel Software Technology Co Ltd
Priority to CN202010828699.6A priority Critical patent/CN111966844B/en
Publication of CN111966844A publication Critical patent/CN111966844A/en
Application granted granted Critical
Publication of CN111966844B publication Critical patent/CN111966844B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/45Controlling the progress of the video game
    • A63F13/48Starting a game, e.g. activating a game device or waiting for other players to join a multiplayer session
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition

Abstract

The application provides an object loading method, an object loading device and a storage medium. The method comprises the following steps: obtaining 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 ordering of the adjusted queues. Because the objects to be loaded are reordered according to a random mode, the ordered objects can meet the loading requirement. In this way, M objects are loaded simultaneously according to the sequence of the adjusted queue, so that a plurality of objects are loaded simultaneously under a random condition, uneven waiting time of a user is avoided, and the use experience of the user is improved.

Description

Object loading method, device and storage medium
Technical Field
The present application relates to the field of computers, and in particular, to a method and apparatus for loading an object, and a storage medium.
Background
Currently, in some application scenarios, it is required to randomly load objects from an object pool into a next scenario, so as to ensure randomness of the scenario. For example, in a game scenario, players (players are objects) of the game are randomly selected from a pool of players, and then the randomly selected players are loaded into a combat scenario for combat.
However, at present, a mode of random selection is adopted, namely objects are selected randomly in sequence, and then the selected objects are loaded into a scene in the next step in sequence. For example, in a game scenario, two or more players are randomly selected from a pool of players, and then loaded into the game scenario. And then continuing to randomly draw out two or even a plurality of players from the player pool, continuing to load, and so on until all players are loaded.
It will be appreciated that this approach, while capable of completing the loading of all objects, if an object is first selected, it is perceived by the user that it is loaded into the next scene in a short period of time, e.g., waiting 1 second to load into the next scene; however, if the object is selected very later, it is perceived by the user to be loaded into the next scene after a long time, e.g., after waiting 1 minute. Such non-uniformity in duration can result in a poor user experience.
Disclosure of Invention
The embodiment of the application aims to provide a method, a device and a storage medium for loading objects, which are used for loading a plurality of objects simultaneously under a random condition, avoiding uneven waiting time of a user and improving use experience of the user.
In a first aspect, an embodiment of the present application provides a method for loading an object, where the method includes: obtaining 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 ordering of the adjusted queues.
In the embodiment of the application, the objects to be loaded are reordered according to a random mode, so that the ordered objects can meet the loading requirement. In this way, M objects are loaded simultaneously according to the sequence of the adjusted queue, so that a plurality of objects are loaded simultaneously under a random condition, uneven waiting time of a user is avoided, and the use experience of the user is improved.
With reference to the first aspect, in a first possible implementation manner, the step of randomly exchanging includes: randomly determining M objects to be exchanged from the initial queue, wherein M is an integer greater than 1 and less than M; and adjusting the positions of the m objects in the initial queue.
In the embodiment of the application, since random exchange is performed for a plurality of times according to the same logic, the sequence of the objects in the adjusted queue can be ensured to be completely random and unordered.
With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner, determining M objects that need to be exchanged randomly from the M objects includes: randomly determining a first object to be exchanged from the first object to the M-m+1 object of the initial queue, randomly determining a second object to be exchanged from one object after the first object to be exchanged to the M-m+2 object of the initial queue, and so on until the M object is determined.
In the embodiment of the application, as the query range of each time is gradually limited, the objects needing to be exchanged can be orderly and effectively determined.
With reference to the first aspect, in a third possible implementation manner, loading the M objects simultaneously according to the order of the adjusted queue includes: defining the number of objects according to a preset scene, and grouping the M objects for N times according to the sorting 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 meets the requirement of the scene during grouping, so that each group of objects can be ensured to be loaded into the corresponding scene correctly.
With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation manner, the step of i-th grouping includes: determining an ith grouped object from the objects which are not grouped according to the limitation of the scene on the number of the objects and the sorting; if the ith grouping is multiple, judging whether similar objects exist in the multiple objects; if so, replacing similar objects in the plurality of objects with other objects in the objects which are not grouped, and ending the ith grouping until the plurality of objects have no similar objects, wherein the objects which are not grouped are objects in the M objects.
In the embodiment of the application, the similar objects can be prevented from being divided into one group through the replacement of the similar objects, 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, determining whether there are similar objects in the plurality of objects includes: 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 visual and objective, so that similar objects can be visually and objectively determined through adjacent ranking.
With reference to the fourth possible implementation manner of the first aspect, in a sixth possible implementation manner, the other objects are objects that are adjacent to the plurality of objects in the ordered sequence in the objects that have not yet been grouped.
In the embodiment of the application, other objects are objects which are adjacent to a plurality of objects in the objects which are not grouped yet, so that the other objects can be quickly found through the adjacent objects, thereby efficiently realizing the replacement of the objects.
With reference to the fourth possible implementation manner of the first aspect, in a seventh possible implementation manner, the step of i taking N, the ith packet further includes: and in the ith grouping, if the number of the objects which are not grouped is smaller than the limit of the scene on the number of the objects, the objects which are not grouped are singly grouped into a group.
In the embodiment of the application, the objects which are finally smaller than the limit of the scene to the number of the objects are independently used 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 object loading apparatus, where the apparatus includes: the object acquisition module is used for acquiring M objects to be loaded, and arranging the M objects into an initial queue, wherein 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 ordering of the adjusted queues.
With reference to the second aspect, in a first possible implementation manner, the number of random exchanges is a plurality of times, and the object processing module is configured to perform each random exchange, where each random exchange is: randomly determining M objects to be exchanged from the initial queue, wherein M is an integer greater than 1 and less than M; and 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, from a first object to an M-m+1 object in the initial queue, a first object to be exchanged, randomly determine, from an object after the first object to be exchanged to an M-m+2 object in the initial queue, a second object to be exchanged, and so on, until an 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 ranking, 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 packet, where the ith packet is: determining an ith grouped object from the objects which are not grouped according to the limitation of the scene on the number of the objects and the sorting; if the ith grouping is multiple, judging whether similar objects exist in the multiple objects; if so, replacing similar objects in the plurality of objects with other objects in the objects which are not grouped, and ending the ith grouping until the plurality of objects have no similar objects, wherein the objects which are not grouped are 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 the plurality of objects have objects with adjacent ranks, where the objects with adjacent ranks are the similar objects.
With reference to the fourth possible implementation manner of the second aspect, in a sixth possible implementation manner, the other objects are objects that are adjacent to the plurality of objects in the ordered sequence in the objects that have not yet been grouped.
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, when the number of objects that are not yet grouped is smaller than the limit of the scene on the number of objects in the ith grouping, separately divide the objects that are not yet grouped into a group.
In a third aspect, embodiments of the present application provide a computer-readable storage medium having computer-executable non-volatile program code for causing a computer to perform the method of loading an object according to the first aspect or any one of the possible implementations 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 needed 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 should not be considered as limiting the scope, and other related drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of an object loading method according to an embodiment of the present application;
FIG. 2 is a first application scenario diagram of an object loading method according to an embodiment of the present application;
FIG. 3 is a second application scenario 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 application;
fig. 5 is a block diagram of an object loading device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying 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 performed by an electronic device, and the electronic device may be a terminal or a server, and a flow of the object loading method may include:
step S100: and obtaining M objects to be loaded, and arranging the M objects into an initial queue, wherein M is an integer greater 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 simultaneously loading the M objects according to the ordering of the adjusted queue.
The above-described flow will be described in detail with reference to the scene.
Step S100: and obtaining M objects to be loaded, and arranging the M objects into an initial queue, wherein M is an integer greater 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 one way, the scheme of the present application can be applied to a game interaction scene in which objects can represent player information of players participating in game interaction; as another way, the scheme of the present application can also be applied to an image collision matching scene, in which an object can 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 two scenes described above, for example, the scheme of the present application can also be applied to a scene of parameter analysis.
In this embodiment, the electronic device first needs to obtain M objects that need to be loaded at the same time this time.
In the game interaction scene, after each player submits a request for participating in the game interaction scene, for example, the player starts matching of the combat, the electronic device can acquire the player information of each player. By continually submitting the request by each player, the electronic device continually obtains information about each player. After the electronic equipment acquires the player information of all players needing to be loaded at this time, the electronic equipment can perform the next operation.
In the image collision matching scene, all pictures which need to be subjected to collision matching are stored in a 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 equipment acquires M pictures, the electronic equipment 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 when acquired, e.g., the electronic device may put the M objects into the constructed array according to the order of the M objects when acquired, thereby forming the initial queue.
Under the game interaction scene, the electronic equipment puts M pieces of player information into the array according to the sequence of submitting requests, so that the information in each position in the array is one piece of player information.
Under the image collision matching scene, the electronic equipment puts M pictures into the array according to the storage sequence of the 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 the 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 swapped. For example, under the same swap logic, the positions of M objects in the initial queue are swapped randomly multiple times. It will be appreciated that since each random swap uses approximately the same swap logic, this embodiment will be described with respect to a random swap for ease of understanding.
For this random swap:
firstly, the electronic device can randomly determine M objects to be exchanged from the initial queue, wherein M is an integer greater than 1 and less than M.
As an exemplary way of determining M objects, the electronic device may randomly determine, from the first object to the M-m+1th object in the initial queue, that the first object needs to be swapped; 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 the object at the position is the first object to be exchanged. Then, the electronic equipment randomly determines a second object to be exchanged from one object to the M-m+2 object after the first object to be exchanged; for example, the electronic device may randomly generate a second index value within the range from the first index value to M-m+2, and find a position corresponding to the second index value in the array, where the object at the position is the second object to be exchanged. And so on until the mth object is determined.
The following is described by way of one assumption.
As shown in FIG. 2, the array S has 10 positions in total, the first value of the array S is 1, the last value of the array S is 10, and the number of objects to be swapped is 3.
Suppose 1: for the first object, the electronic device randomly generates a first index value of 3 between 1 and 8, and then the electronic device determines that the object 3 at the third position in the array S is the first object to be swapped.
For the second object, the electronic device randomly generates a second index value of 9 between 4-9, and then the electronic device determines that the pair at the ninth location in the array S is the second object to be swapped.
For the third object, at this time, the random range of the third object is limited to 10, and although the 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 of determining M objects, the electronic device may randomly output M objects at a time in the first object through the mth object of 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 position corresponding to each index value in the array, so as to determine M objects at a time.
In this embodiment, after determining m objects 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 of adjusting the positions of m objects in the array, the electronic device may swap the positions of the objects in the array with the positions of other objects in the array, and may need to ensure that the ordering after adjustment is different from the ordering before adjustment.
For example, taking assumption 1 as an example, the electronic device may swap the positions of object 3 and object 9; alternatively, the electronic device may first swap the positions of object 3 and object 9, and then swap the positions of object 10 and object 3 on the basis of this.
As another exemplary way of adjusting the positions of the m objects in the array, the electronic device may randomly determine other objects than the m objects, then swap the positions of the objects in the array with the positions of the other objects in the array, and also need to ensure that the post-adjustment ordering is different from the pre-adjustment ordering.
For example, taking assumption 1 as an example, the electronic device randomly determines that the other objects are object 2, object 5 and object 7 respectively, then the electronic device can exchange the positions of object 3 and object 2, exchange the positions of object 9 and object 7, and exchange the positions of object 5 and object 10; or the electronic device randomly determines other objects as objects 2, the electronic device can exchange the positions of the objects 3 and 2, then exchange the positions of the objects 2 and 9 after the exchange, and finally exchange the positions of the objects 2 and 10 after the exchange of the positions for the second time.
Continuing with the description of hypothesis 1, as shown in FIG. 3, after 10 random swaps, the ordering of the objects in 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, an adjusted queue may be obtained, and step S300 is performed for the adjusted queue.
Step S300: and simultaneously loading the M objects according to the ordering of the adjusted queue.
The loading modes of the M objects are all different according to different application scenes.
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 according to the adjusted queue ordering, the M objects need to be loaded into the same scene at the same time.
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 ordering of the adjusted queues, so that the M players can enter the same scene at the same time to fight. And the position of the information of each player in the adjusted queue can determine the birth position of the player in the scene, so that the randomness and the disorder of the adjusted queue ensure that the birth position of the player in the scene is random and disordered, and the game experience of the player is enhanced.
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 groups the M objects N times according to the adjusted sequence of the queue, so as to obtain n+1 groups of objects, where N is an integer greater than or equal to 1. Finally, the electronic device loads the n+1 groups of objects into the respective corresponding scenes at the same time.
Aiming at game interaction scenes, M players need to fight in the respective corresponding scenes respectively, and the information of the M players can be grouped N times according to the number of fight players in the scenes and the sorting of the adjusted queues, 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 at the same time, so that the same group of players fight in the same scene.
It will be appreciated that the player's gaming experience is enhanced by the fact that the adjusted queue is random and unordered, such that the opponents that the player groups against are completely random and unordered when the player is engaged in a combat.
Aiming at an image collision matching scene, M pictures need to be grouped for collision matching, the electronic equipment performs collision matching on the number of pictures needed by collision matching, and N times of grouping are performed on the M pictures according to the ordering of the adjusted queue, so that N+1 groups of pictures are obtained, and then each group of pictures is loaded at the same time, so that the same group of pictures are subjected to collision matching.
It can also be appreciated that since the adjusted queue is random and unordered, each group of pictures that are collision matched is random and unordered, thereby enhancing the picture collision matching effect.
It should be noted that, when the last grouping, that is, the nth grouping is performed, if only one object that has not yet been grouped is included in the M objects, no matter how many objects are used as a group in the previous, the electronic device individually divides the objects that have not yet been grouped into a 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 present application is applied to a game interaction scene, the electronic device may further perform fine adjustment on the grouping of the objects when necessary, so as to ensure more reasonable grouping.
Specifically, i takes any one value from 1 to N, when the electronic equipment performs the ith grouping, the electronic equipment determines the object of the ith grouping from the objects which are not grouped according to the limitation of the scene on the number of the objects and the sorting of the adjusted queue.
If the ith grouping object is a plurality of objects, the electronic equipment judges whether similar objects exist in the plurality of objects. For example, the electronic device may determine whether a plurality of objects have objects with adjacent ranks of the objects (the ranks of the objects in the scene are ranks of players in the game), and the objects with adjacent ranks are similar objects. For another example, the electronic device may determine whether the plurality of objects have objects with the same characteristics of the objects (in this scenario, the characteristics of the objects are technical types that the player is good at in the game), and the objects with the same characteristics are similar objects.
If not, the electronic device ends the ith packet, 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, where 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 execute the judgment of whether the similar objects exist or not until the plurality of objects do not have the similar objects, and the electronic device ends the ith grouping.
Besides the adjustment manner, only the first and second objects can be ranked, so that the first and second objects are not separated into one group in the grouping process.
With reference to fig. 3, description will be continued on assumption 1.
The electronic device may group 10 objects in array S by a number of 2 per group, and by the ordering of array S in fig. 3, where the numerical value following the object represents the ranking of the objects, as defined by the number of objects per scene.
Specifically, the electronic device first groups the objects 3 and 6, and obviously, the ranks of the objects 3 and 6 are 3 and 6, which are not adjacent, so that the objects 3 and 6 are finally used as a group of objects.
The electronic device then groups the objects 2 and 8 together, and it is apparent that the rank of object 2 is 2 and the rank of object 8 is 8, which are not adjacent, so that object 2 and object 8 end up as a group of objects.
The electronic device then groups object 9 and object 1 together, and it is apparent that object 9 ranks 9 and object 1 ranks 1, which are not adjacent, so object 9 and object 1 end up as a group of objects.
The electronic device then groups the objects 4 and 5 together, and obviously the object 4 is ranked 4 and the object 5 is ranked 5, which are adjacent, 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 object 5 and object 10 in array S such that object 4 and object 10 are adjacent, thereby eventually taking object 4 and object 10 as a set of objects.
Finally, as a result of the position exchange taking place, object 5 and object 7 are adjacent, the electronic device then finally divides object 5 and object 7 into a group of objects.
Referring to fig. 4, an embodiment of the present application provides an electronic device 10, based on the same inventive concept, which electronic device 10 may comprise a communication interface 11 connected to a network, one or more processors 12 for executing program instructions, a bus 13, and a different form of memory 14, such as a disk, ROM, or RAM, or any combination thereof. By way of example, 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 loading method of the objects.
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.
The object processing module 120 is configured to randomly exchange positions of the M objects in the initial queue to obtain an adjusted queue; and simultaneously loading the M objects according to the ordering of the adjusted queues.
It should be noted that, since it will be clearly understood by those skilled in the art, for convenience and brevity of description, the specific working processes of the systems, apparatuses and units described above may refer to the corresponding processes in the foregoing method embodiments, which are not repeated herein.
Some embodiments of the present application also provide a computer readable storage medium of computer executable non-volatile program code, where the storage medium can be a general purpose storage medium, such as a removable disk, a hard disk, etc., and the computer readable storage medium stores program code thereon, where the program code when executed by a computer performs the steps of the object loading method according to any of the above embodiments.
The program code product of the method for loading an object provided in the embodiment of the present application includes a computer readable storage medium storing 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 and will not be described herein.
In summary, the objects to be loaded are reordered according to a random manner, so that the ordered objects can meet the loading requirement. In this way, M objects are loaded simultaneously according to the sequence of the adjusted queue, so that a plurality of objects are loaded simultaneously under a random condition, uneven waiting time of a user 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 manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
Further, the units described as separate units may or may not be physically separate, and units displayed as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Furthermore, functional modules in various embodiments of the present application may be integrated together to form a single portion, or each module may exist alone, or two or more modules may be integrated to form a single portion.
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 variations will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (8)

1. An object loading method, which is applied to a game interaction scene, an image collision matching scene or a parameter analysis scene, comprising the following steps:
obtaining 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;
simultaneously loading the M objects according to the ordering of the adjusted queue, including:
defining the number of objects according to a preset scene, and grouping the M objects for N times according to the sorting to obtain N+1 groups of objects, wherein N is an integer greater than or equal to 1; simultaneously loading the N+1 groups of objects into respective corresponding scenes;
wherein i takes any one of values 1 to N, and the step of the ith packet includes:
determining an ith grouped object from the objects which are not grouped according to the limitation of the scene on the number of the objects and the sorting;
if the ith grouping is multiple, judging whether similar objects exist in the multiple objects;
if so, replacing similar objects in the plurality of objects with other objects in the objects which are not grouped, and ending the ith grouping until the plurality of objects have no similar objects, wherein the objects which are not grouped are objects in the M objects.
2. The method of loading an object according to claim 1, wherein the number of random exchanges is a plurality of times, and each random exchange includes:
randomly determining M objects to be exchanged from the initial queue, wherein M is an integer greater than 1 and less than M;
and 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 swapped from the M objects comprises:
randomly determining a first object to be exchanged from the first object to the M-m+1 object of the initial queue, randomly determining a second object to be exchanged from one object after the first object to be exchanged to the M-m+2 object of the initial queue, and so on until the M object is determined.
4. The method for loading an object according to claim 1, wherein determining whether there are similar objects in the plurality of objects comprises:
judging whether the objects have objects with adjacent ranks, wherein the objects with adjacent ranks are the similar objects.
5. The method for loading an object according to claim 1, wherein,
the other objects are ones of the not yet grouped objects that are ordered adjacent to the plurality of objects.
6. The method of loading an object according to claim 1, wherein the step of i taking N, the ith packet further comprises:
and in the ith grouping, if the number of the objects which are not grouped is smaller than the limit of the scene on the number of the objects, the objects which are not grouped are singly grouped into a group.
7. An object loading device, wherein the device is applied to a game interaction scene, an image collision matching scene or a parameter analysis scene, and comprises:
the object acquisition module is used for acquiring M objects to be loaded, and arranging the M objects into an initial queue, wherein 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; according to the sorting of the adjusted queues, loading the M objects at the same time, wherein the M objects are specifically used for limiting the number of the objects according to a preset scene, and according to the sorting, the M objects are grouped for N times to obtain N+1 groups of objects, and N is an integer greater than or equal to 1; simultaneously loading the N+1 groups of objects into respective corresponding scenes; the object processing module performs the ith grouping, and is specifically used for determining the object of the ith grouping from the objects which are not grouped according to the limitation of the scene on the number of the objects and the sorting; if the ith grouping is multiple, judging whether similar objects exist in the multiple objects; if so, replacing similar objects in the plurality of objects with other objects in the objects which are not grouped, and ending the ith grouping until the plurality of objects have no similar objects, wherein the objects which are not grouped are objects in the M objects.
8. A computer readable storage medium having computer executable non-volatile program code for causing a computer to perform the method of loading an object according to any one of claims 1-6.
CN202010828699.6A 2020-08-17 2020-08-17 Object loading method, device and storage medium Active CN111966844B (en)

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 CN111966844A (en) 2020-11-20
CN111966844B true 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)

* Cited by examiner, † Cited by third party
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

Patent Citations (11)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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.2011,71-84. *
基于时间知觉的移动APP页面加载方式研究;何人可 等;包装工程;第38卷(第18期);56-61 *

Also Published As

Publication number Publication date
CN111966844A (en) 2020-11-20

Similar Documents

Publication Publication Date Title
US9575691B2 (en) Scheduling user requests in a distributed resource system having a plurality of schedulers and coordinators
US8645454B2 (en) Task allocation multiple nodes in a distributed computing system
CN111084983A (en) Cloud game service method, device, equipment and storage medium
US10943324B2 (en) Data processing method, apparatus, and electronic device
US9811979B2 (en) Method and system for processing electronic chess and card data
CN110764898B (en) Task allocation method and device, readable storage medium and terminal equipment
CN111659126B (en) Distribution method, device, server, terminal and storage medium of matching process
US10554737B2 (en) Method and apparatus for leveling loads of distributed databases
CN106506663A (en) A kind of number distributing method, server and system
CN110532100B (en) Method, device, terminal and storage medium for scheduling resources
CN106528288A (en) Resource management method, device and system
CN112311702B (en) FC switch scheduling method and device, electronic equipment and storage medium
CN111966844B (en) Object loading method, device and storage medium
CN113138802A (en) Command distribution device, method, chip, computer equipment and storage medium
CN113617033B (en) Virtual character selection method, device, terminal and storage medium
CN111135586A (en) Game matching method, game matching device, storage medium and electronic device
CN111124672A (en) Data distribution method based on Redis cluster and related equipment
US8918786B2 (en) Generating simulated stall signals based on access speed model or history of requests independent of actual processing or handling of conflicting requests
JP7335739B2 (en) SYSTEM, METHOD AND PROGRAM FOR PROVIDING A GAME
CN104572276A (en) Cloud-computation-based concurrent data processing method
CN109977130B (en) Hot word display method and system
CN111111216B (en) Matching method, device, server and storage medium
US10178221B2 (en) Time synchronization method and apparatus
CN107943674B (en) Task progress determination method and device, computer equipment and storage medium
CN107678993A (en) Computer system and bus arbitration method

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