CN113244630B - Resource allocation method and device, electronic equipment and storage medium - Google Patents

Resource allocation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113244630B
CN113244630B CN202110710174.7A CN202110710174A CN113244630B CN 113244630 B CN113244630 B CN 113244630B CN 202110710174 A CN202110710174 A CN 202110710174A CN 113244630 B CN113244630 B CN 113244630B
Authority
CN
China
Prior art keywords
resource
identifier
target user
user
user set
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
CN202110710174.7A
Other languages
Chinese (zh)
Other versions
CN113244630A (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 Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information 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 Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202110710174.7A priority Critical patent/CN113244630B/en
Publication of CN113244630A publication Critical patent/CN113244630A/en
Application granted granted Critical
Publication of CN113244630B publication Critical patent/CN113244630B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/70Game security or game management aspects
    • A63F13/79Game security or game management aspects involving player-related data, e.g. identities, accounts, preferences or play histories
    • A63F13/795Game security or game management aspects involving player-related data, e.g. identities, accounts, preferences or play histories for finding other players; for building a team; for providing a buddy list
    • 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/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/35Details of game servers
    • 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/70Game security or game management aspects
    • A63F13/77Game security or game management aspects involving data related to game devices or game servers, e.g. configuration data, software version or amount of memory
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/50Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers
    • A63F2300/53Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers details of basic data processing
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/50Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers
    • A63F2300/55Details of game data or player data management
    • A63F2300/5546Details of game data or player data management using player registration data, e.g. identification, account, preferences, game history
    • A63F2300/5566Details of game data or player data management using player registration data, e.g. identification, account, preferences, game history by matching opponents or finding partners to build a team, e.g. by skill level, geographical area, background, play style

Abstract

The present disclosure relates to a resource allocation method, apparatus, electronic device and storage medium, the method comprising: monitoring event information in a team game scene; generating a user set resource list based on the event type identifier, the target user set identifier and the target user identifier of each event; when at least one event in the event information is responded successfully, resource updating configuration is carried out on current resources of a target user set corresponding to the target user set identification and current resources of a target user corresponding to the target user identification according to the event type identification of the event; and respectively carrying out resource verification on the current resources based on the user set resource list and determining resource change information according to a resource verification result. The method and the device can solve the problem of resource calculation and configuration errors caused by frequent user operation and high concurrency in the related art.

Description

Resource allocation method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a resource allocation method and apparatus, an electronic device, and a storage medium.
Background
With the development of network technology, users can possess corresponding network virtual resources, wherein the resources can be points, equipment in network games, virtual pets and the like. For example, in a team PK class game, there will generally be a correspondence between member users and resources; if a user enters a team, the corresponding starting resource is given to the user for playing in the competition, and if the user exits the team, the corresponding starting resource may need to be deducted, even the resource won by the user for playing in the competition; because the user can carry out enqueue, dequeue and other operations at will, the requirement on the consistency of the related resource calculation is higher, and when the concurrency is higher due to frequent user operation, errors in resource calculation and configuration can be caused.
Disclosure of Invention
The present disclosure provides a resource allocation method, device, electronic device and storage medium, so as to at least solve the problem of resource calculation and allocation errors caused when the concurrency is high due to frequent user operations in the related art. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a resource configuration method, including:
monitoring event information in a team game scene; each event in the event information carries an event type identifier, a target user set identifier and a target user identifier associated with the target user set identifier;
generating a user set resource list based on the event type identifier, the target user set identifier and the target user identifier of each event;
when at least one event in the event information is responded successfully, resource updating configuration is carried out on current resources of a target user set corresponding to the target user set identification and current resources of a target user corresponding to the target user identification according to the event type identification of the event;
respectively carrying out resource verification on the current resources of the target user set and the current resources of the target user based on the user set resource detail table;
and determining the current resource of the target user set and the resource change information of the current resource of the target user according to the resource checking result.
In an exemplary embodiment, each event in the event information further carries an event generation timestamp;
the generating a user set resource list based on the event type identifier, the target user set identifier, and the target user identifier of each event comprises:
acquiring a resource detail record template; the resource detail record template comprises a user set identification field, a user identification field, an event type field and a timestamp field;
traversing each event in the event information;
filling the target user set identifier, the target user identifier, the event type and the event generation timestamp carried in the current event into the user set identifier field, the user identifier field, the event type field and the timestamp field of the resource detail record template respectively to obtain a resource detail record corresponding to the current event;
generating the user set resource detail table based on the resource detail record corresponding to each event in the event information.
In an exemplary embodiment, the performing, according to the event type identifier of the event, resource update configuration on a current resource of a target user set corresponding to the target user set identifier and a current resource of a target user corresponding to the target user identifier includes:
determining resource configuration information corresponding to the event type identifier;
determining a first resource configuration operation on the current resource of the target user set and a second resource configuration operation on the current resource of the target user based on the resource configuration information;
and executing the first resource configuration operation on the current resource of the target user set, and executing the second resource configuration operation on the current resource of the target user.
In an exemplary embodiment, the method further comprises:
and executing the resource updating configuration for preset times in one execution cycle.
In an exemplary embodiment, the method further comprises:
when at least one event in the event information is successfully responded, generating a user resource list based on the target user identifier carried by the event and the event type identifier;
the respectively performing resource check on the current resource of the target user set and the current resource of the target user based on the user set resource detail table includes:
performing resource verification on the current resources of the target user set according to the user set resource list;
checking the user resource list according to the user set resource list;
and performing resource verification on the current resource of the target user according to the user resource list.
In an exemplary embodiment, the user resource list comprises a user resource list corresponding to each target user identifier;
the checking the user resource list according to the user set resource list comprises:
for each target user identifier, extracting a resource detail record containing the target user identifier from the user set resource detail table;
checking a user resource detail table corresponding to the target user identifier according to the resource detail record containing the target user identifier;
when the resource detail record containing the target user identification conforms to the user resource detail table corresponding to the target user identification, determining that the user resource detail table corresponding to the target user identification passes verification;
and when the resource detail record containing the target user identifier does not accord with the user resource detail table corresponding to the target user identifier, repairing and updating the user resource detail table corresponding to the target user identifier according to the resource detail record containing the target user identifier.
In an exemplary embodiment, the method further comprises:
receiving an interface calling request, wherein the interface calling request comprises a called interface type;
determining the event type identification, the target user set identification and the target user identification based on the called interface type;
and generating the event based on the event type identification, the target user set identification and the target user identification.
In an exemplary embodiment, the called interface type includes a first interface type and a second interface type; the first interface type is used for representing the relation between a user and a user set, and the second interface type is used for representing the relation between the user set and the user set;
when the interface is called by a user, the interface calling request further comprises an interface calling user identifier;
the determining the event type identifier, the target user set identifier, and the target user identifier based on the called interface type comprises:
when the called interface type is the first interface type and the interface is called by a user, generating the event type identification according to the first interface type; determining an associated user set identifier associated with the interface calling user identifier based on the first interface type and the interface calling user identifier; determining the associated user set identifier as the target user set identifier, and determining the interface calling user identifier as the target user identifier;
when the called interface type is the second interface type and the interface is called by a user, generating the event type identifier according to the second interface type; based on the second interface type, determining an associated user set identifier associated with the interface calling user identifier, and determining a matching user set identifier matched with the associated user set identifier; and determining the associated user set identification and the matched user set identification as the target user set identification, and determining the identifications of the users in the user set corresponding to the associated user set identification and the identifications of the users in the user set corresponding to the matched user set identification as the target user identification.
In an exemplary embodiment, the determining the event type identifier, the target user set identifier, and the target user identifier based on the called interface type includes:
when the interface is automatically called, generating the event type identification according to the called interface type;
determining a first user set identification and a second user set identification based on the called interface type, wherein the first user set identification and the second user set identification have a matching relationship;
and determining the first user set identifier and the second user set identifier as the target user set identifier, and determining the identifiers of the users in the user set corresponding to the first user set identifier and the identifiers of the users in the user set corresponding to the second user set identifier as the target user identifier.
In an exemplary embodiment, the resource change information includes reconfiguration of a current resource;
the determining, according to the resource check result, the current resource of the target user set and the resource change information of the current resource of the target user include:
when the current resources of the target user set do not pass the resource check, determining to reconfigure the current resources of the target user set;
and when the current resource of the target user does not pass the resource check, determining to reconfigure the current resource of the target user.
According to a second aspect of the embodiments of the present disclosure, there is provided a resource configuration apparatus, including:
the event monitoring unit is configured to monitor event information in a team game scene; each event in the event information carries an event type identifier, a target user set identifier and a target user identifier associated with the target user set identifier;
a user set resource list generating unit configured to generate a user set resource list based on the event type identifier, the target user set identifier, and the target user identifier of each event;
a resource update configuration unit, configured to perform, when successfully responding to at least one event in the event information, resource update configuration on a current resource of a target user set corresponding to the target user set identifier and a current resource of a target user corresponding to the target user identifier according to the event type identifier of the event;
a resource checking unit configured to perform resource checking on the current resource of the target user set and the current resource of the target user based on the user set resource detail table, respectively;
a resource change information determination unit configured to perform determining a current resource of the target user set and resource change information of the current resource of the target user according to a resource check result.
In an exemplary embodiment, each event in the event information further carries an event generation timestamp;
the user set resource list generation unit includes:
a recording template acquisition unit configured to perform acquisition of a resource detail recording template; the resource detail record template comprises a user set identification field, a user identification field, an event type field and a timestamp field;
an event traversing unit configured to perform traversing each event in the event information;
a filling unit, configured to perform filling the target user set identifier, the target user identifier, the event type, and the event generation timestamp carried in the current event into the user set identifier field, the user identifier field, the event type field, and the timestamp field of the resource detail record template, respectively, to obtain a resource detail record corresponding to the current event;
a first generating unit configured to perform generating the user set resource detail table based on the resource detail record corresponding to each event in the event information.
In an exemplary embodiment, the resource update configuration unit includes:
a resource configuration information determination unit configured to perform determination of resource configuration information corresponding to the event type identifier;
a resource configuration operation determination unit configured to perform a first resource configuration operation on a current resource of the set of target users and a second resource configuration operation on the current resource of the target users based on the resource configuration information;
an operation executing unit configured to execute the first resource configuration operation on the current resource of the target user set and execute the second resource configuration operation on the current resource of the target user.
In an exemplary embodiment, the apparatus further comprises:
and the current limiting unit is configured to execute resource updating configuration which is executed for a preset number of times in one execution cycle.
In an exemplary embodiment, the apparatus further comprises:
a user resource list generating unit, configured to execute, when successfully responding to at least one event in the event information, generating a user resource list based on the target user identifier carried by the event and the event type identifier;
the resource checking unit includes:
a first checking unit configured to perform resource checking on the current resource of the target user set according to the user set resource detail table;
a second checking unit configured to perform checking on the user resource detail table according to the user set resource detail table;
and the third checking unit is configured to perform resource checking on the current resource of the target user according to the user resource list.
In an exemplary embodiment, the user resource list comprises a user resource list corresponding to each target user identifier;
the second checking unit includes:
the record extraction unit is configured to extract a resource detail record containing the target user identifier from the user set resource detail table for each target user identifier;
a fourth checking unit, configured to perform checking on the user resource detail table corresponding to the target user identifier according to the resource detail record containing the target user identifier;
a verification result determining unit configured to perform, when the resource detail record containing the target user identifier matches with the user resource detail table corresponding to the target user identifier, determining that the user resource detail table corresponding to the target user identifier passes verification;
and the repair updating unit is configured to perform repair updating on the user resource detail table corresponding to the target user identifier according to the resource detail record containing the target user identifier when the resource detail record containing the target user identifier does not conform to the user resource detail table corresponding to the target user identifier.
In an exemplary embodiment, the apparatus includes:
an interface calling request receiving unit configured to execute receiving an interface calling request, the interface calling request including a called interface type;
a first determining unit configured to perform determining the event type identifier, the target user set identifier, and the target user identifier based on the called interface type;
an event generating unit configured to perform generating the event based on the event type identifier, the target user set identifier and the target user identifier.
In an exemplary embodiment, the called interface type includes a first interface type and a second interface type; the first interface type is used for representing the relation between a user and a user set, and the second interface type is used for representing the relation between the user set and the user set;
when the interface is called by a user, the interface calling request further comprises an interface calling user identifier;
the first determination unit includes:
a second determining unit, configured to execute, when the called interface type is the first interface type and the interface is called by a user, generating the event type identifier according to the first interface type; determining an associated user set identifier associated with the interface calling user identifier based on the first interface type and the interface calling user identifier; determining the associated user set identifier as the target user set identifier, and determining the interface calling user identifier as the target user identifier;
a third determining unit, configured to execute, when the called interface type is the second interface type and the interface is called by a user, generating the event type identifier according to the second interface type; based on the second interface type, determining an associated user set identifier associated with the interface calling user identifier, and determining a matching user set identifier matched with the associated user set identifier; and determining the associated user set identification and the matched user set identification as the target user set identification, and determining the identifications of the users in the user set corresponding to the associated user set identification and the identifications of the users in the user set corresponding to the matched user set identification as the target user identification.
In an exemplary embodiment, the first determination unit includes:
the second generation unit is configured to execute the generation of the event type identifier according to the called interface type when the interface is automatically called;
a fourth determination unit configured to perform determination of a first user set identifier and a second user set identifier based on the called interface type, the first user set identifier having a matching relationship with the second user set identifier;
a fifth determining unit, configured to perform determining the first user set identifier and the second user set identifier as the target user set identifier, and determining the identifiers of the users in the user set corresponding to the first user set identifier and the identifiers of the users in the user set corresponding to the second user set identifier as the target user identifier.
In an exemplary embodiment, the resource change information includes reconfiguration of a current resource;
the resource change information determination unit includes:
a sixth determining unit configured to perform, when the current resource of the target user set does not pass the resource check, determining to reconfigure the current resource of the target user set;
a seventh determining unit configured to perform determining to reconfigure the current resource of the target user when the current resource of the target user fails the resource check.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the resource configuration method as described above.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein instructions, when executed by a processor of a server, enable the server to perform the resource configuration method as described above.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising a computer program stored in a readable storage medium, from which at least one processor of a computer device reads and executes the computer program, causing the device to perform the above-mentioned resource configuration method.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
the method comprises the steps of monitoring event information in a team game scene to generate a user set resource list; when the event information successfully responds to at least one event in the event information, resource updating configuration is carried out on the current resource of the target user set and the current resource of the target user according to the event type identification of the event; then, resource verification is carried out on the current resources of the target user set and the current resources of the target user by adopting a user set resource list; and determining the current resource of the target user set and the resource change information of the current resource of the target user according to the resource checking result. According to the method and the device, the resources are verified through the resource detail list generated by event monitoring, the behavior is played back through the generated running water, the event is guaranteed to be brought into the calculation range, the event omission caused by response failure is avoided, the comprehensiveness of event processing is guaranteed, therefore, when the concurrency quantity is high due to frequent user operation, the operation of response failure can be restored through the resource detail list, namely, the user collection resources and the user resources are verified through the resource detail list, the consistency of the current resources and the running water detail can be guaranteed, and the accuracy of resource configuration is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a schematic diagram of an implementation environment shown in accordance with an exemplary embodiment.
FIG. 2 is a flow diagram illustrating a method for resource configuration in accordance with an example embodiment.
FIG. 3 is a flow diagram illustrating a method of event generation according to an exemplary embodiment.
Fig. 4 is a flow chart illustrating a method for identifying information determination according to an example embodiment.
Fig. 5 is a flow chart illustrating another identification information determination method according to an example embodiment.
Fig. 6 is a flowchart illustrating yet another identification information determination method according to an example embodiment.
FIG. 7 is a flowchart illustrating a method for generating a user collection resource list, according to an example embodiment.
FIG. 8 is a flowchart illustrating a method for determining resource configuration operations, according to an example embodiment.
FIG. 9 is a flowchart illustrating a method for resource checking in accordance with an exemplary embodiment.
FIG. 10 is a flowchart illustrating a method for validating a user resource specification, according to an example embodiment.
Fig. 11 is a schematic diagram illustrating a resource configuration apparatus according to an example embodiment.
Fig. 12 is a schematic diagram of an electronic device according to an exemplary embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Referring to fig. 1, a schematic diagram of an implementation environment provided by an embodiment of the disclosure is shown, where the implementation environment may include: at least a first terminal 110 and a second terminal 120, said first terminal 110 and said second terminal 120 being capable of data communication over a network.
Specifically, the user may call an interface through the first terminal 110 to trigger generation of a corresponding event; the second terminal 120 responds to the event and performs resource configuration on the corresponding user set resource and the user resource based on the additional information carried by the event; the configured resource information may be displayed at the first terminal 110; in addition, the interface may also be automatically called by the system to trigger generation of a corresponding event, and a specific calling object of the interface may be determined according to a specific implementation situation, which is not specifically limited in the embodiments of the present disclosure.
The first terminal 110 may communicate with the second terminal 120 based on a Browser/Server mode (B/S) or a Client/Server mode (C/S). The first terminal 110 may include: the physical devices may also include software running in the physical devices, such as applications, and the like. The operating system running on the first terminal 110 in the embodiment of the present disclosure may include, but is not limited to, an android system, an IOS system, linux, windows, and the like.
The second terminal 120 and the first terminal 110 may establish a communication connection through a wired or wireless connection, and the second terminal 120 may include an independently operating server, or a distributed server, or a server cluster composed of multiple servers, where the server may be a cloud server.
In order to solve the problem of resource calculation and configuration errors caused by frequent user operations resulting in high concurrency in the related art, an embodiment of the present disclosure provides a resource configuration method, where an execution main body of the resource configuration method may be the second terminal, and specifically may be a server, referring to fig. 2, the resource configuration method may include:
s210, monitoring event information in a team game scene; each event in the event information carries an event type identifier, a target user set identifier, and a target user identifier associated with the target user set identifier.
The event information herein may refer to pipelined information of events that actually occur, and in the embodiment of the present disclosure, the events that actually occur may be monitored through an event monitoring mechanism, so as to ensure that the events that actually occur are not missed, where each event in the event information may be triggered based on an interface call, and in particular, refer to fig. 3, which shows an event generating method, where the method may include:
s310, receiving an interface calling request, wherein the interface calling request comprises a called interface type.
S320, based on the called interface type, determining the event type identifier, the target user set identifier and the target user identifier.
S330, generating the event based on the event type identification, the target user set identification and the target user identification.
The event in the embodiment of the present disclosure may be generated by an interface call trigger, where the interface call request may be generated based on the interface call, and the object for performing the interface call may be a user or a system, that is, the user may perform the corresponding interface call according to the current service activity to be performed, and the system may also perform the interface call automatically according to the current service; the called interfaces are different in type and correspondingly different in service activity type, and the event type identifier can be determined according to the type of the called interface, so that corresponding processing can be conveniently carried out according to the event type identifier when the event is responded in the follow-up process. Since each time a business activity is performed, a user set or users related to the current business activity are generally involved, so that the related user set and users related to the current business activity can be determined according to the type of the invoked interface, the user set in the embodiment of the present disclosure may specifically be a team or team in a game, and each team or team may include multiple users.
The called interface type comprises a first interface type and a second interface type; the first interface type is used for representing the relation between a user and a user set, and the second interface type is used for representing the relation between the user set and the user set; according to the above, when the interface is called by the user, the interface calling request may further include an interface calling user identifier; accordingly, referring to fig. 4, a method for identifying information is shown, which may include:
s410, when the called interface type is the first interface type and the interface is called by a user, generating the event type identification according to the first interface type.
S420, based on the first interface type and the interface calling user identification, determining an associated user set identification associated with the interface calling user identification.
S430, determining the associated user set identification as the target user set identification, and determining the interface calling user identification as the target user identification.
For the embodiment of the present disclosure, when the interface is called by a user, the called interface types include a first interface type and a second interface type, it can be understood that, since the first interface type is used to represent a relationship between the user and a user set, for example, an interface corresponding to the first interface type may be a user enqueue interface, a user dequeue interface, and the like, since user enqueue generally means that a single user joins in a battle team, and user dequeue generally means that a single user withdraws from a battle team, so that the user enqueues, and user dequeue relates to a single user and a corresponding battle team, that is, a relationship between the user and the user set can be represented, where the associated user set may specifically be a battle team to which the user is about to join or a battle team to be withdrawn. It should be noted that, when a user needs to enter a team, the team to be joined may be designated, or the system may not automatically assign the team to the team; when a user specifies a team that the user wants to join, the corresponding interface call request may further include an associated user set identifier, i.e., an associated team identifier.
For example, a user a wants to join a team and does not specify the team to be joined, the user a makes an enqueue interface call, and generates a corresponding enqueue interface call request, and the enqueue interface request may include an enqueue interface type and a user identifier of the user a; the background system automatically allocates a team for the user a when knowing that the current request is of the type of the enqueue interface and no designated team exists, so that a related team allocated for the user a is obtained; the user identification of user a may then be determined as the target user identification and the identification of the associated team as the target user set identification.
For example, the user b wants to quit the current team, calls a quitting interface, and generates a corresponding quitting interface call request, wherein the quitting interface call request comprises a quitting interface type and a user identifier of the user b; the background system firstly determines a battle team where the user b is currently located when knowing that the current request is a queue quitting request, determines a battle team identification of the battle team as a target user set identification, and determines a user identification of the user b as a target user identification.
Referring to fig. 5, another identification information determination method is shown, which may include:
and S510, when the called interface type is the second interface type and the interface is called by a user, generating the event type identifier according to the second interface type.
S520, based on the second interface type, determining an associated user set identification associated with the interface calling user identification, and determining a matching user set identification matched with the associated user set identification.
S530, determining the associated user set identification and the matched user set identification as the target user set identification, and determining the identification of the user in the user set corresponding to the associated user set identification and the identification of the user in the user set corresponding to the matched user set identification as the target user identification.
The interface corresponding to the second interface type may include a user set matching interface, and the like, and since the user set matching generally matches two user sets, the two user sets are involved, that is, one user set is a user set where the interface calls the user, and the other is a user set matched by the system or a matching user set selected by the user.
For example, for a user a, the team in which the user a is located is team a, that is, the associated user set identifier associated with the user identifier of the user a is the identifier of team a, when the user a makes a user set matching interface call and does not select a matching team, a corresponding user set matching interface call request is generated, the user set matching interface call request includes the user set matching interface type and the user identifier of the user a, the background system performs user set automatic matching for the team a in which the user a is located, and if the user set is matched with the team B, the team identifiers of the team a and the team B are determined as target user set identifiers, and the identifiers of the users in the team a and the identifiers of the users in the team B are determined as target user identifiers.
The above is a specific method for determining the target user set identifier and the target user identifier when the interface is called by the user; further, if the current service meets the preset condition, the related interface can be automatically called; referring specifically to fig. 6, another identification information determining method is shown, which may include:
s610, when the interface is automatically called, the event type identification is generated according to the called interface type.
S620, determining a first user set identifier and a second user set identifier based on the called interface type, wherein the first user set identifier and the second user set identifier have a matching relationship.
S630, determining the first user set identification and the second user set identification as the target user set identification, and determining the identifications of the users in the user set corresponding to the first user set identification and the identifications of the users in the user set corresponding to the second user set identification as the target user identification.
When the interface is automatically called, the interface can generally correspond to the condition of resource settlement after the competition is finished, the condition of automatic matching of a user set and the like; for example, if two user sets which have finished the competition currently exist, the background system can automatically call the resource settlement interface to perform resource settlement according to the competition result conditions of the two user sets; if the user set to be matched exists currently, the background system can automatically match the user set which is not successfully matched; therefore, the identifications of two user sets involved in the scenes of resource settlement, user set matching and the like can be determined as target user set identifications, and the identifications of the users in the two user sets can be determined as target user identifications.
S220, generating a user set resource list based on the event type identification, the target user set identification and the target user identification of each event.
The resource list of the user set herein may include a resource list corresponding to each user set, and specifically, the resource list may be distinguished according to the target user set identifier; further, each event in the event information also carries an event generation timestamp, and accordingly, referring to fig. 7, a method for generating a user set resource list is shown, where the method may include:
s710, acquiring a resource detail record template; the resource detail record template comprises a user set identification field, a user identification field, an event type field and a time stamp field.
S720, traversing each event in the event information.
And S730, respectively filling the target user set identification, the target user identification, the event type and the event generation timestamp carried in the current event into the user set identification field, the user identification field, the event type field and the timestamp field of the resource detail record template to obtain the resource detail record corresponding to the current event.
S740, generating the user set resource detail list based on the resource detail record corresponding to each event in the event information.
In the present disclosure, each user set may correspond to a resource detail record table, and the resource detail record table may include a plurality of detail records; specifically, when the storage is performed through the database, for each event, a resource detail record corresponds, and each resource detail record includes a user set identification field, a user identification field, an event type field, and a timestamp field, and at a database level, the storage may be implemented through unique keys, for example: user set identification + user identification + event type + timestamp; the user set identification field can identify a user set corresponding to the current event, and the user identification field can identify which user in the user set corresponds to the current event, so that resource verification can be performed subsequently according to the user identification, and convenience of resource verification is improved; the different event types correspond to different resource configuration strategies, so that the event type identification can provide a basis for subsequent resource configuration; through the timestamp field, the data can be used as a unique index of the data when being stored in the database, so that repeated content cannot be inserted, and the idempotent reentrant of the running data is realized.
The user set resource list is generated based on event monitoring, and therefore the user set resource list includes resource change records corresponding to each event in the monitored event stream. Taking the user enqueue event as an example for explanation, one resource detail record corresponding to the event may include: the method comprises the steps of adding a battle identification, an identification of an enqueue user, an enqueue event type and a timestamp; in addition, one resource detail record corresponds to one resource change, for example, for a user enqueue event, resources are issued to both an enqueue user and a team joined by the user.
In addition, when the user set participates in the game (for example, a user set matching event is triggered), or the game is finished and settled (for example, a resource settlement event is triggered), the resource detail record corresponding to the event may further include a field, where the field is used to identify the current field of the user set participating in the game, and the accuracy of the resource detail data can be further improved through the field; one record may be in the form of: user set identification + user identification + field + event type + timestamp.
And S230, when the event information successfully responds to at least one event in the event information, performing resource updating configuration on the current resource of the target user set corresponding to the target user set identification and the current resource of the target user corresponding to the target user identification according to the event type identification of the event.
For some reasons, the background system may not be able to respond successfully to each event in the event information, but for successfully responding events, there are the following operations, please refer to fig. 8, which illustrates a resource configuration operation determination method, which may include:
and S810, determining resource configuration information corresponding to the event type identifier.
S820, determining a first resource configuration operation of the current resource of the target user set and a second resource configuration operation of the current resource of the target user based on the resource configuration information.
S830, the first resource configuration operation is executed on the current resource of the target user set, and the second resource configuration operation is executed on the current resource of the target user set.
In the embodiment of the present disclosure, the user set resource may be considered as a sum of resources of all members of the user set, so that the user set resource and the member resource need to be updated respectively when the resource is updated each time.
The resource configuration information may be a resource configuration intention, and specifically may include a resource addition intention and a resource subtraction intention, for example, when the event type is an enqueue event, a game winning event, or the like, the corresponding resource configuration information is a resource addition; when the event type is a dequeue event or a match failure event, the corresponding resource configuration information is resource deduction. Thereby performing configuration operations on the current resources of the set of target users and the current resources of the target users, respectively.
When the event type is an enqueue event, a dequeue event, or the like, the first resource configuration operation and the second resource configuration operation may be the same, that is, the number of configured resources is the same; for example, the resource of the user is increased, and the resource of the team where the user is located is increased; the user resource is deducted, and the resource of the team where the user is located is deducted; when the event type is events such as a game winning event, a game failing event and the like, because all members in the user set need to be configured with resources, the first resource configuration operation and the second resource configuration operation are different, namely the resource quantity configured by the user set is the sum of the resource quantities configured by all the members, and thus the resource quantity configured by a single member is different from the resource quantity configured by the user set; for example, for a game winning event, the system may issue resources to each member user according to the contribution value of each member user in the local game, the number of issued resources to each member may be different, and the number of issued resources to a team is the sum of the number of issued resources to the member users. Therefore, the current resources of the user set and the current resources of the user are respectively updated through the first resource allocation operation and the second resource allocation operation, so that the resource updating of the user set and the resource updating of the user are independent, the resource updating error caused by updating the resources of one party and the resources of the other party according to the resources of the other party is avoided, and the accuracy of the resource updating is improved.
Further, when the current resource of the user set is updated or the current resource of the user is updated, the resource update configuration operation can be executed for a preset number of times in one execution cycle. By limiting the flow of the resource allocation operation, the updating pressure of the database can be reduced, and the problem of disordered data updating caused by large concurrency of the resource allocation operation is avoided.
When at least one event in the event information is successfully responded, generating a user resource list based on the target user identifier carried by the successfully responded event and the event type identifier; here, the specific generation method of the user resource list is similar to the generation method of the user set resource list, and is not described here again.
And S240, respectively carrying out resource check on the current resource of the target user set and the current resource of the target user based on the user set resource list.
In the actual implementation process, due to the reasons of poor network condition, weak system pressure resistance and the like, the background may not successfully respond to each event in the event information or cannot successfully execute the related resource configuration operation, so that the related operation is omitted, and the problem that the actual resource is inconsistent with the resource detail record table is caused; in an embodiment of the present disclosure, a resource checking method is provided, referring to fig. 9, where the method may include:
s910, according to the user set resource list, carrying out resource check on the current resource of the target user set.
S920, checking the user resource list according to the user set resource list.
And S930, performing resource check on the current resource of the target user according to the user resource list.
The specific checking principle can be based on the resource detail and the user set information; through resource verification, the missed resource configuration operation in the resource configuration process can be recovered, and therefore the accuracy of the resource configuration is further improved.
Specifically, the user resource detail table includes a user resource detail table corresponding to each target user identifier; referring to fig. 10, a method for verifying a user resource list is shown, which may include:
and S1010, for each target user identifier, extracting a resource detail record containing the target user identifier from the user set resource detail table.
S1020, checking a user resource detail list corresponding to the target user identification according to the resource detail record containing the target user identification.
And S1030, judging whether the resource detail record containing the target user identifier conforms to the user resource detail table corresponding to the target user identifier.
And S1040, if yes, determining that the user resource list corresponding to the target user identification passes the verification.
And S1050, if not, repairing and updating the user resource detail list corresponding to the target user identifier according to the resource detail record containing the target user identifier.
According to the foregoing, each record in the user set resource detail table contains the user identification field information, so that which user operation corresponds to the record can be known, and the user detail table is verified by extracting the relevant record; therefore, the related user list is verified based on the list record containing the related user identification, and convenience and operability of verification of the user list can be improved.
For example, team resources are verified, a verification start time node which is spaced from a current time node by T is determined, the verification start time node is a certain past time point, the due resource quantity of the team at the current time node is calculated according to the team resource quantity of the verification start time node and the resource detail record related to the team identification of the team in the time period T, and whether the due resource quantity of the team at the current time node is consistent with the actual resource quantity is judged, so that the team resources are verified based on the team resource detail table; similarly, the user resource list and the user resource can be checked, and the method is similar and is not described herein again.
And S250, determining the current resource of the target user set and the resource change information of the current resource of the target user according to the resource checking result.
The resource change information is understood as a resource change intention, and may include reconfiguring the current resource and keeping the current resource unchanged. The resource checking operation can be regular checking, the specific checking period can be determined according to the implementation condition, and when the problem is found in the checking, the problem needs to be repaired in time. And if the current resources of the target user set or the current resources of the target user do not pass the resource verification, determining that the resource change intention is that the current resources need to be reconfigured, and specifically reconfiguring the current resources according to the corresponding verification result. For example, after verification, the resource list of user a is correct, but the current resource of user a does not match the resource list of user a, and at this time, the current resource of user a needs to be re-determined and configured according to the resource list of user a.
The method comprises the steps of monitoring event information in a team game scene to generate a user set resource list; when the event information successfully responds to at least one event in the event information, resource updating configuration is carried out on the current resource of the target user set and the current resource of the target user according to the event type identification of the event; then, resource verification is carried out on the current resources of the target user set and the current resources of the target user by adopting a user set resource list; and determining the current resource of the target user set and the resource change information of the current resource of the target user according to the resource checking result. According to the method and the device, the resources are verified through the resource detail list generated by event monitoring, the behavior is played back through the generated running water, the event is guaranteed to be brought into the calculation range, the event omission caused by response failure is avoided, the comprehensiveness of event processing is guaranteed, therefore, when the concurrency quantity is high due to frequent user operation, the operation of response failure can be restored through the resource detail list, namely, the user collection resources and the user resources are verified through the resource detail list, the consistency of the current resources and the running water detail can be guaranteed, and the accuracy of resource configuration is improved.
The implementation of the present disclosure is illustrated below as a specific example, and the database may contain four DB tables: a user resource table, a user resource detail table, a battle team resource table and a battle team resource detail table; the user resource table is used for storing the number of user resources; the user resource detail table is used for storing user resource detail records; the battle team resource table is used for storing the quantity of battle team resources; and the team resource detail table is used for storing team resource detail records. Each flow represents one resource data update of a user or a battle team; on the DB level, resource data updating each time is guaranteed in a unique key (team id/user id + field + change type + timestamp) mode, only one detail record is available, and the idempotent reentry of the resource data is realized.
By monitoring event information of associated services, such as team change events after a user joins or leaves a team, matching completion events and the like after the team pk is successfully matched, based on monitoring of the event information, the resource detail of the user and the team is calculated by integrally analyzing the running water of various events by taking the running water as a reference, and the detail record is ensured not to be lost.
According to the resource management method in the group PK type games provided by the disclosure, the behavior is played back based on the actually occurring event, and the occurrence is guaranteed to be calculated; the consistency of the battle team and member user resources is ensured through the resource relationship, and the battle team and the member user resources are self-consistent; an association model is formed through event response, resource allocation and resource verification, so that the events are ensured to be finally self-consistent in the resource detail, and the whole model is high in maturity and good in reusability.
FIG. 11 is a block diagram illustrating a resource configuration apparatus according to an example embodiment. Referring to fig. 11, the apparatus includes:
an event monitoring unit 1110 configured to perform monitoring of event information in a team game scene; each event in the event information carries an event type identifier, a target user set identifier and a target user identifier associated with the target user set identifier;
a user set resource list generating unit 1120, configured to execute generating a user set resource list based on the event type identifier, the target user set identifier, and the target user identifier of each event;
a resource update configuration unit 1130, configured to perform, when successfully responding to at least one event in the event information, resource update configuration on a current resource of a target user set corresponding to the target user set identifier and a current resource of a target user corresponding to the target user identifier according to the event type identifier of the event;
a resource checking unit 1140 configured to perform resource checking on the current resource of the target user set and the current resource of the target user, respectively, based on the user set resource detail table;
a resource change information determination unit 1150 configured to perform determining a current resource of the set of target users and resource change information of the current resource of the target users according to a resource check result.
In an exemplary embodiment, each event in the event information further carries an event generation timestamp;
the user set resource list generating unit 1120 includes:
a recording template acquisition unit configured to perform acquisition of a resource detail recording template; the resource detail record template comprises a user set identification field, a user identification field, an event type field and a timestamp field;
an event traversing unit configured to perform traversing each event in the event information;
a filling unit, configured to perform filling the target user set identifier, the target user identifier, the event type, and the event generation timestamp carried in the current event into the user set identifier field, the user identifier field, the event type field, and the timestamp field of the resource detail record template, respectively, to obtain a resource detail record corresponding to the current event;
a first generating unit configured to perform generating the user set resource detail table based on the resource detail record corresponding to each event in the event information.
In an exemplary embodiment, the resource update configuration unit 1130 includes:
a resource configuration information determination unit configured to perform determination of resource configuration information corresponding to the event type identifier;
a resource configuration operation determination unit configured to perform a first resource configuration operation on a current resource of the set of target users and a second resource configuration operation on the current resource of the target users based on the resource configuration information;
an operation executing unit configured to execute the first resource configuration operation on the current resource of the target user set and execute the second resource configuration operation on the current resource of the target user.
In an exemplary embodiment, the apparatus further comprises:
and the current limiting unit is configured to execute resource updating configuration which is executed for a preset number of times in one execution cycle.
In an exemplary embodiment, the apparatus further comprises:
a user resource list generating unit, configured to execute, when successfully responding to at least one event in the event information, generating a user resource list based on the target user identifier carried by the event and the event type identifier;
the resource checking unit includes:
a first checking unit configured to perform resource checking on the current resource of the target user set according to the user set resource detail table;
a second checking unit configured to perform checking on the user resource detail table according to the user set resource detail table;
and the third checking unit is configured to perform resource checking on the current resource of the target user according to the user resource list.
In an exemplary embodiment, the user resource list comprises a user resource list corresponding to each target user identifier;
the second checking unit includes:
the record extraction unit is configured to extract a resource detail record containing the target user identifier from the user set resource detail table for each target user identifier;
a fourth checking unit, configured to perform checking on the user resource detail table corresponding to the target user identifier according to the resource detail record containing the target user identifier;
a verification result determining unit configured to perform, when the resource detail record containing the target user identifier matches with the user resource detail table corresponding to the target user identifier, determining that the user resource detail table corresponding to the target user identifier passes verification;
and the repair updating unit is configured to perform repair updating on the user resource detail table corresponding to the target user identifier according to the resource detail record containing the target user identifier when the resource detail record containing the target user identifier does not conform to the user resource detail table corresponding to the target user identifier.
In an exemplary embodiment, the apparatus includes:
an interface calling request receiving unit configured to execute receiving an interface calling request, the interface calling request including a called interface type;
a first determining unit configured to perform determining the event type identifier, the target user set identifier, and the target user identifier based on the called interface type;
an event generating unit configured to perform generating the event based on the event type identifier, the target user set identifier and the target user identifier.
In an exemplary embodiment, the called interface type includes a first interface type and a second interface type; the first interface type is used for representing the relation between a user and a user set, and the second interface type is used for representing the relation between the user set and the user set;
when the interface is called by a user, the interface calling request further comprises an interface calling user identifier;
the first determination unit includes:
a second determining unit, configured to execute, when the called interface type is the first interface type and the interface is called by a user, generating the event type identifier according to the first interface type; determining an associated user set identifier associated with the interface calling user identifier based on the first interface type and the interface calling user identifier; determining the associated user set identifier as the target user set identifier, and determining the interface calling user identifier as the target user identifier;
a third determining unit, configured to execute, when the called interface type is the second interface type and the interface is called by a user, generating the event type identifier according to the second interface type; based on the second interface type, determining an associated user set identifier associated with the interface calling user identifier, and determining a matching user set identifier matched with the associated user set identifier; and determining the associated user set identification and the matched user set identification as the target user set identification, and determining the identifications of the users in the user set corresponding to the associated user set identification and the identifications of the users in the user set corresponding to the matched user set identification as the target user identification.
In an exemplary embodiment, the first determination unit includes:
the second generation unit is configured to execute the generation of the event type identifier according to the called interface type when the interface is automatically called;
a fourth determination unit configured to perform determination of a first user set identifier and a second user set identifier based on the called interface type, the first user set identifier having a matching relationship with the second user set identifier;
a fifth determining unit, configured to perform determining the first user set identifier and the second user set identifier as the target user set identifier, and determining the identifiers of the users in the user set corresponding to the first user set identifier and the identifiers of the users in the user set corresponding to the second user set identifier as the target user identifier.
In an exemplary embodiment, the resource change information includes reconfiguration of a current resource;
the resource change information determination unit includes:
a sixth determining unit configured to perform, when the current resource of the target user set does not pass the resource check, determining to reconfigure the current resource of the target user set;
a seventh determining unit configured to perform determining to reconfigure the current resource of the target user when the current resource of the target user fails the resource check.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
In an exemplary embodiment, there is also provided a computer readable storage medium comprising instructions, which may alternatively be ROM, Random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like; the instructions in the computer readable storage medium, when executed by a processor of a server, enable the server to perform any of the methods described above.
In an exemplary embodiment, there is also provided a computer program product comprising a computer program stored in a readable storage medium, from which at least one processor of a computer device reads and executes the computer program, causing the device to perform any of the methods described above.
Further, fig. 12 shows a hardware structure diagram of an apparatus for implementing the method provided by the embodiment of the present disclosure, and the apparatus may participate in constituting or including the apparatus provided by the embodiment of the present disclosure. As shown in fig. 12, the device 10 may include one or more (shown as 102a, 102b, … …, 102 n) processors 102 (the processors 102 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. Besides, the method can also comprise the following steps: a display, an input/output interface (I/O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of the I/O interface), a network interface, a power source, and/or a camera. It will be understood by those skilled in the art that the structure shown in fig. 12 is only an illustration and is not intended to limit the structure of the electronic device. For example, device 10 may also include more or fewer components than shown in FIG. 12, or have a different configuration than shown in FIG. 12.
It should be noted that the one or more processors 102 and/or other data processing circuitry described above may be referred to generally herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part in software, hardware, firmware, or any combination thereof. Further, the data processing circuitry may be a single, stand-alone processing module, or incorporated in whole or in part into any of the other elements in the device 10 (or mobile device). As referred to in the disclosed embodiments, the data processing circuit acts as a processor control (e.g., selection of a variable resistance termination path connected to the interface).
The memory 104 may be used for storing software programs and modules of application software, such as program instructions/data storage devices corresponding to the methods described in the embodiments of the present disclosure, and the processor 102 executes various functional applications and data processing by executing the software programs and modules stored in the memory 104, so as to implement a player preloading method or a player running method as described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 104 may further include memory located remotely from processor 102, which may be connected to device 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of such networks may include wireless networks provided by the communication provider of the device 10. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 can be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
The display may be, for example, a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with a user interface of the device 10 (or mobile device).
Any of the methods described above in this embodiment can be implemented based on the apparatus shown in fig. 12.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (23)

1. A method for resource allocation, comprising:
monitoring event information in a team game scene; each event in the event information carries an event type identifier, a target user set identifier and a target user identifier associated with the target user set identifier;
generating a user set resource list based on the event type identifier, the target user set identifier and the target user identifier of each event;
when at least one event in the event information is responded successfully, resource updating configuration is carried out on current resources of a target user set corresponding to the target user set identification and current resources of a target user corresponding to the target user identification according to the event type identification of the event;
respectively carrying out resource verification on the current resources of the target user set and the current resources of the target user based on the user set resource detail table;
determining the current resource of the target user set and the resource change information of the current resource of the target user according to the resource checking result; and if the current resource of the target user set or the current resource of the target user does not pass the resource check, determining that the resource change information needs to be reconfigured to the current resource.
2. The method according to claim 1, wherein each event in the event information further carries an event generation timestamp;
the generating a user set resource list based on the event type identifier, the target user set identifier, and the target user identifier of each event comprises:
acquiring a resource detail record template; the resource detail record template comprises a user set identification field, a user identification field, an event type field and a timestamp field;
traversing each event in the event information;
filling the target user set identifier, the target user identifier, the event type and the event generation timestamp carried in the current event into the user set identifier field, the user identifier field, the event type field and the timestamp field of the resource detail record template respectively to obtain a resource detail record corresponding to the current event;
generating the user set resource detail table based on the resource detail record corresponding to each event in the event information.
3. The method according to claim 1, wherein the performing resource update configuration on the current resource of the target user set corresponding to the target user set identifier and the current resource of the target user corresponding to the target user identifier according to the event type identifier of the event comprises:
determining resource configuration information corresponding to the event type identifier;
determining a first resource configuration operation on the current resource of the target user set and a second resource configuration operation on the current resource of the target user based on the resource configuration information;
and executing the first resource configuration operation on the current resource of the target user set, and executing the second resource configuration operation on the current resource of the target user.
4. The method of claim 1, wherein the method further comprises:
and executing the resource updating configuration for preset times in one execution cycle.
5. The method of claim 1, wherein the method further comprises:
when at least one event in the event information is successfully responded, generating a user resource list based on the target user identifier carried by the event and the event type identifier;
the respectively performing resource check on the current resource of the target user set and the current resource of the target user based on the user set resource detail table includes:
performing resource verification on the current resources of the target user set according to the user set resource list;
checking the user resource list according to the user set resource list;
and performing resource verification on the current resource of the target user according to the user resource list.
6. The method according to claim 5, wherein the user resource list comprises a user resource list corresponding to each target user id;
the checking the user resource list according to the user set resource list comprises:
for each target user identifier, extracting a resource detail record containing the target user identifier from the user set resource detail table;
checking a user resource detail table corresponding to the target user identifier according to the resource detail record containing the target user identifier;
when the resource detail record containing the target user identification conforms to the user resource detail table corresponding to the target user identification, determining that the user resource detail table corresponding to the target user identification passes verification;
and when the resource detail record containing the target user identifier does not accord with the user resource detail table corresponding to the target user identifier, repairing and updating the user resource detail table corresponding to the target user identifier according to the resource detail record containing the target user identifier.
7. The method of claim 1, wherein the method further comprises:
receiving an interface calling request, wherein the interface calling request comprises a called interface type;
determining the event type identification, the target user set identification and the target user identification based on the called interface type;
and generating the event based on the event type identification, the target user set identification and the target user identification.
8. The resource configuration method of claim 7, wherein the called interface type comprises a first interface type and a second interface type; the first interface type is used for representing the relation between a user and a user set, and the second interface type is used for representing the relation between the user set and the user set;
when the interface is called by a user, the interface calling request further comprises an interface calling user identifier;
the determining the event type identifier, the target user set identifier, and the target user identifier based on the called interface type comprises:
when the called interface type is the first interface type and the interface is called by a user, generating the event type identification according to the first interface type; determining an associated user set identifier associated with the interface calling user identifier based on the first interface type and the interface calling user identifier; determining the associated user set identifier as the target user set identifier, and determining the interface calling user identifier as the target user identifier;
when the called interface type is the second interface type and the interface is called by a user, generating the event type identifier according to the second interface type; based on the second interface type, determining an associated user set identifier associated with the interface calling user identifier, and determining a matching user set identifier matched with the associated user set identifier; and determining the associated user set identification and the matched user set identification as the target user set identification, and determining the identifications of the users in the user set corresponding to the associated user set identification and the identifications of the users in the user set corresponding to the matched user set identification as the target user identification.
9. The method of claim 7, wherein the determining the event type identifier, the target user set identifier, and the target user identifier based on the called interface type comprises:
when the interface is automatically called, generating the event type identification according to the called interface type;
determining a first user set identification and a second user set identification based on the called interface type, wherein the first user set identification and the second user set identification have a matching relationship;
and determining the first user set identifier and the second user set identifier as the target user set identifier, and determining the identifiers of the users in the user set corresponding to the first user set identifier and the identifiers of the users in the user set corresponding to the second user set identifier as the target user identifier.
10. The method according to claim 1, wherein the resource change information includes reconfiguration of a current resource;
the determining, according to the resource check result, the current resource of the target user set and the resource change information of the current resource of the target user include:
when the current resources of the target user set do not pass the resource check, determining to reconfigure the current resources of the target user set;
and when the current resource of the target user does not pass the resource check, determining to reconfigure the current resource of the target user.
11. A resource allocation apparatus, comprising:
the event monitoring unit is configured to monitor event information in a team game scene; each event in the event information carries an event type identifier, a target user set identifier and a target user identifier associated with the target user set identifier;
a user set resource list generating unit configured to generate a user set resource list based on the event type identifier, the target user set identifier, and the target user identifier of each event;
a resource update configuration unit, configured to perform, when successfully responding to at least one event in the event information, resource update configuration on a current resource of a target user set corresponding to the target user set identifier and a current resource of a target user corresponding to the target user identifier according to the event type identifier of the event;
a resource checking unit configured to perform resource checking on the current resource of the target user set and the current resource of the target user based on the user set resource detail table, respectively;
a resource change information determination unit configured to perform determining a current resource of the target user set and resource change information of the current resource of the target user according to a resource check result; and if the current resource of the target user set or the current resource of the target user does not pass the resource check, determining that the resource change information needs to be reconfigured to the current resource.
12. The apparatus according to claim 11, wherein each event in the event information further carries an event generation timestamp;
the user set resource list generation unit includes:
a recording template acquisition unit configured to perform acquisition of a resource detail recording template; the resource detail record template comprises a user set identification field, a user identification field, an event type field and a timestamp field;
an event traversing unit configured to perform traversing each event in the event information;
a filling unit, configured to perform filling the target user set identifier, the target user identifier, the event type, and the event generation timestamp carried in the current event into the user set identifier field, the user identifier field, the event type field, and the timestamp field of the resource detail record template, respectively, to obtain a resource detail record corresponding to the current event;
a first generating unit configured to perform generating the user set resource detail table based on the resource detail record corresponding to each event in the event information.
13. The apparatus for configuring resource according to claim 11, wherein the resource update configuring unit comprises:
a resource configuration information determination unit configured to perform determination of resource configuration information corresponding to the event type identifier;
a resource configuration operation determination unit configured to perform a first resource configuration operation on a current resource of the set of target users and a second resource configuration operation on the current resource of the target users based on the resource configuration information;
an operation executing unit configured to execute the first resource configuration operation on the current resource of the target user set and execute the second resource configuration operation on the current resource of the target user.
14. The apparatus of claim 11, wherein the apparatus further comprises:
and the current limiting unit is configured to execute resource updating configuration which is executed for a preset number of times in one execution cycle.
15. The apparatus of claim 11, wherein the apparatus further comprises:
a user resource list generating unit, configured to execute, when successfully responding to at least one event in the event information, generating a user resource list based on the target user identifier carried by the event and the event type identifier;
the resource checking unit includes:
a first checking unit configured to perform resource checking on the current resource of the target user set according to the user set resource detail table;
a second checking unit configured to perform checking on the user resource detail table according to the user set resource detail table;
and the third checking unit is configured to perform resource checking on the current resource of the target user according to the user resource list.
16. The apparatus according to claim 15, wherein the user resource list comprises a user resource list corresponding to each target user id;
the second checking unit includes:
the record extraction unit is configured to extract a resource detail record containing the target user identifier from the user set resource detail table for each target user identifier;
a fourth checking unit, configured to perform checking on the user resource detail table corresponding to the target user identifier according to the resource detail record containing the target user identifier;
a verification result determining unit configured to perform, when the resource detail record containing the target user identifier matches with the user resource detail table corresponding to the target user identifier, determining that the user resource detail table corresponding to the target user identifier passes verification;
and the repair updating unit is configured to perform repair updating on the user resource detail table corresponding to the target user identifier according to the resource detail record containing the target user identifier when the resource detail record containing the target user identifier does not conform to the user resource detail table corresponding to the target user identifier.
17. The apparatus of claim 11, wherein the apparatus comprises:
an interface calling request receiving unit configured to execute receiving an interface calling request, the interface calling request including a called interface type;
a first determining unit configured to perform determining the event type identifier, the target user set identifier, and the target user identifier based on the called interface type;
an event generating unit configured to perform generating the event based on the event type identifier, the target user set identifier and the target user identifier.
18. The apparatus of claim 17, wherein the called interface type comprises a first interface type and a second interface type; the first interface type is used for representing the relation between a user and a user set, and the second interface type is used for representing the relation between the user set and the user set;
when the interface is called by a user, the interface calling request further comprises an interface calling user identifier;
the first determination unit includes:
a second determining unit, configured to execute, when the called interface type is the first interface type and the interface is called by a user, generating the event type identifier according to the first interface type; determining an associated user set identifier associated with the interface calling user identifier based on the first interface type and the interface calling user identifier; determining the associated user set identifier as the target user set identifier, and determining the interface calling user identifier as the target user identifier;
a third determining unit, configured to execute, when the called interface type is the second interface type and the interface is called by a user, generating the event type identifier according to the second interface type; based on the second interface type, determining an associated user set identifier associated with the interface calling user identifier, and determining a matching user set identifier matched with the associated user set identifier; and determining the associated user set identification and the matched user set identification as the target user set identification, and determining the identifications of the users in the user set corresponding to the associated user set identification and the identifications of the users in the user set corresponding to the matched user set identification as the target user identification.
19. The apparatus of claim 17, wherein the first determining unit comprises:
the second generation unit is configured to execute the generation of the event type identifier according to the called interface type when the interface is automatically called;
a fourth determination unit configured to perform determination of a first user set identifier and a second user set identifier based on the called interface type, the first user set identifier having a matching relationship with the second user set identifier;
a fifth determining unit, configured to perform determining the first user set identifier and the second user set identifier as the target user set identifier, and determining the identifiers of the users in the user set corresponding to the first user set identifier and the identifiers of the users in the user set corresponding to the second user set identifier as the target user identifier.
20. The apparatus according to claim 11, wherein the resource change information includes reconfiguration of a current resource;
the resource change information determination unit includes:
a sixth determining unit configured to perform, when the current resource of the target user set does not pass the resource check, determining to reconfigure the current resource of the target user set;
a seventh determining unit configured to perform determining to reconfigure the current resource of the target user when the current resource of the target user fails the resource check.
21. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the resource configuration method of any one of claims 1 to 10.
22. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the resource configuration method of any of claims 1 to 10.
23. A computer program product comprising computer programs/instructions, characterized in that the computer programs/instructions, when executed by a processor, implement the resource configuration method of any of claims 1 to 10.
CN202110710174.7A 2021-06-25 2021-06-25 Resource allocation method and device, electronic equipment and storage medium Active CN113244630B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110710174.7A CN113244630B (en) 2021-06-25 2021-06-25 Resource allocation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110710174.7A CN113244630B (en) 2021-06-25 2021-06-25 Resource allocation method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113244630A CN113244630A (en) 2021-08-13
CN113244630B true CN113244630B (en) 2021-10-22

Family

ID=77189579

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110710174.7A Active CN113244630B (en) 2021-06-25 2021-06-25 Resource allocation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113244630B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2816921C (en) * 2010-11-08 2018-03-13 Research In Motion Limited Wireless resources
US9721086B2 (en) * 2013-03-15 2017-08-01 Advanced Elemental Technologies, Inc. Methods and systems for secure and reliable identity-based computing
CN105847284B (en) * 2016-05-16 2019-06-25 腾讯科技(深圳)有限公司 A kind of communication service processing method, device and and server
CN110652728B (en) * 2019-09-24 2023-06-27 北京金山安全软件有限公司 Game resource management method and device, electronic equipment and storage medium
CN111309745B (en) * 2020-02-10 2022-04-22 腾讯科技(深圳)有限公司 Virtual resource processing method and device, electronic equipment and storage medium
CN112915548B (en) * 2021-03-30 2023-06-23 腾讯科技(深圳)有限公司 Data processing method, device, equipment and storage medium of multimedia playing platform

Also Published As

Publication number Publication date
CN113244630A (en) 2021-08-13

Similar Documents

Publication Publication Date Title
CN112689155B (en) Virtual resource pushing method and device and server
CN106383764A (en) Data acquisition method and device
WO2021073516A1 (en) Blockchain-based workflow node certification method and device
CN110868606A (en) Live event broadcasting method, device, system and medium
CN116204438A (en) Test case generation method, automatic test method and related device
CN113244630B (en) Resource allocation method and device, electronic equipment and storage medium
CN111372089B (en) Method, device and storage medium for updating activity list
CN112448850A (en) Method for identifying and configuring network access equipment
CN112511739B (en) Interactive information generation method and equipment
CN115617668A (en) Compatibility testing method, device and equipment
CN110659299B (en) Data updating method and device and front-end development client
CN109840213B (en) Test data creating method, device, terminal and storage medium for GUI test
CN112199229A (en) Data processing method, device, equipment and storage medium
CN113157714A (en) List data updating method and device, electronic equipment and storage medium
CN112308622A (en) Data processing method and device for virtual object, storage medium and electronic equipment
CN113797542B (en) Task data generation method and device, storage medium and electronic device
CN113254315B (en) Reporting method of embedded point information, embedded point method, device, medium and electronic equipment
CN113064926B (en) Data screening method and device, storage medium and electronic device
CN109582450B (en) Application program management method, device, medium and electronic equipment
CN114390303B (en) Data processing method, device, server, storage medium and program product
CN110354493B (en) Access control method, device, server and storage medium
CN116956077A (en) Washing data processing method and device applied to intelligent washing machine and electronic equipment
US20200188782A1 (en) Methods and systems for connecting a plurality of users to a lobby of an online application
CN108132990B (en) Method and device for replacing APP built-in picture and storage medium
CN116521276A (en) Call stack determining method, device, 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