WO2021139386A1 - 资源配置方法、装置、设备和存储介质 - Google Patents

资源配置方法、装置、设备和存储介质 Download PDF

Info

Publication number
WO2021139386A1
WO2021139386A1 PCT/CN2020/127722 CN2020127722W WO2021139386A1 WO 2021139386 A1 WO2021139386 A1 WO 2021139386A1 CN 2020127722 W CN2020127722 W CN 2020127722W WO 2021139386 A1 WO2021139386 A1 WO 2021139386A1
Authority
WO
WIPO (PCT)
Prior art keywords
configuration
candidate
resource
resources
target
Prior art date
Application number
PCT/CN2020/127722
Other languages
English (en)
French (fr)
Inventor
李皓
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Priority to SG11202111714QA priority Critical patent/SG11202111714QA/en
Priority to JP2021564820A priority patent/JP7397094B2/ja
Priority to KR1020217033800A priority patent/KR102632194B1/ko
Publication of WO2021139386A1 publication Critical patent/WO2021139386A1/zh
Priority to US17/505,427 priority patent/US20220038389A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/82Miscellaneous aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/78Architectures of resource allocation
    • 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/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • A63F13/69Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor by enabling or updating specific game elements, e.g. unlocking hidden features, items, levels or versions
    • 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/73Authorising game programs or game devices, e.g. checking authenticity
    • 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/75Enforcing rules, e.g. detecting foul play or generating lists of cheating players
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators
    • G06F7/588Random number generators, i.e. based on natural stochastic processes
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the embodiments of the present application relate to the field of computer technology, and in particular, to a resource configuration method, device, device, and storage medium.
  • a series of image paths in the game package are configured through the client's local table, and then the corresponding image path is found in the configuration table based on random data and keyword index, and the image is loaded through the image path and displayed in the user interface. In the display.
  • the embodiments of the present application provide a resource configuration method, device, equipment, and storage medium, which can be used to save the cost of replacing configuration resources and shorten the time consumption of replacing configuration resources.
  • the technical solution is as follows:
  • a resource configuration method is provided, the method is applied to a terminal, and the method includes:
  • the configuration data includes m candidate configuration resources used to configure the target item in the target application, where m is a positive integer;
  • n candidate configuration resources that match the current running scene of the target application are selected from the m candidate configuration resources, wherein the scene identification Information is used to indicate the operating scenario to which the candidate configuration resource applies, and the n is a positive integer less than or equal to the m;
  • the target project is configured using the target configuration resource.
  • a resource configuration method is provided, the method is applied to a terminal, and the method includes:
  • the configuration data includes m candidate image resources used to configure a user interface in a game application, where m is a positive integer;
  • n candidate picture resources that are suitable for the current running scene of the game application from the m candidate picture resources, where n is a positive integer less than or equal to m;
  • the target picture resource is displayed in the user interface.
  • a resource configuration device including:
  • a configuration data obtaining module configured to obtain configuration data, where the configuration data includes m candidate configuration resources used to configure a target item in a target application, where m is a positive integer;
  • the candidate resource selection module is configured to select n candidate configuration resources matching the current running scene of the target application from the m candidate configuration resources according to the scene identification information respectively corresponding to the m candidate configuration resources , Wherein the scenario identification information is used to indicate the operating scenario to which the candidate configuration resource applies, and the n is a positive integer less than or equal to the m;
  • the target resource selection module is configured to select a target configuration resource from the n candidate configuration resources according to the weights corresponding to the n candidate configuration resources, wherein the weight is used to indicate that the candidate configuration resource is selected Probability
  • the target resource configuration module is used to configure the target project by using the target configuration resource.
  • a resource configuration device including:
  • a configuration data obtaining module configured to obtain configuration data, where the configuration data includes m candidate picture resources used to configure a user interface in a game application, where m is a positive integer;
  • a candidate picture selection module configured to select n candidate picture resources that are suitable for the current running scene of the game application from the m candidate picture resources, where n is a positive integer less than or equal to m ;
  • the target picture selection module is used to select a target picture resource from the n candidate picture resources
  • the target picture display module is configured to display the target picture resource in the user interface.
  • a computer device includes a processor and a memory.
  • the memory stores at least one instruction, at least one program, code set, or instruction set, and the at least one instruction The at least one piece of program, the code set or the instruction set is loaded and executed by the processor to implement the resource configuration method as described in the foregoing aspect.
  • a computer-readable storage medium stores at least one instruction, at least one program, code set or instruction set, the at least one instruction, the At least one program, the code set or the instruction set is loaded and executed by the processor to implement the resource configuration method as described in the above aspect.
  • a computer-readable storage medium in which a computer program is stored, and the computer program implements the above-mentioned resource allocation method when executed by a processor.
  • a computer program product includes computer instructions stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the resource allocation method described in the foregoing aspects.
  • Fig. 1 is a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application
  • Fig. 2 is a flowchart of a resource configuration method provided by an exemplary embodiment of the present application
  • Fig. 3 is a flowchart of a resource configuration method provided by another exemplary embodiment of the present application.
  • FIG. 4 is a flowchart of a client acquiring configuration data according to an exemplary embodiment of the present application
  • Fig. 5 is a schematic diagram of a random number interval provided by an exemplary embodiment of the present application.
  • Fig. 6 is a flowchart of a resource configuration method provided by another exemplary embodiment of the present application.
  • Fig. 7 is a schematic diagram of a user interface provided by an exemplary embodiment of the present application.
  • FIG. 8 is a schematic diagram of a user interface provided by another exemplary embodiment of the present application.
  • Fig. 9 is a block diagram of a resource configuration device provided by an exemplary embodiment of the present application.
  • FIG. 10 is a block diagram of a resource configuration device provided by another exemplary embodiment of the present application.
  • FIG. 11 is a block diagram of a resource configuration device provided by another exemplary embodiment of the present application.
  • FIG. 12 is a structural block diagram of a terminal provided by an exemplary embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of a server provided by an exemplary embodiment of the present application.
  • Fig. 1 shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application.
  • the implementation environment may include: a terminal 10 and a server 20.
  • the above-mentioned terminal 10 may be a desktop computer, a laptop portable computer, a mobile phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III, a dynamic image expert compression standard audio layer 3) player, and an MP4 (Moving Picture Experts Group Audio Layer III) player. Experts Group Audio Layer IV, dynamic image experts compress standard audio layer 4) Players, etc.
  • the embodiment of the application does not limit this.
  • a client running a target application is installed in the terminal 10.
  • the target application may be a game application, for example, it may be a Third Person Shooting Game (TPS) game, a first person shooting (First Person Shooting Game, TPS) game, or a third-person shooting game (TPS).
  • the target application can also be an instant messaging application, a video application, a social application, a multimedia application, a shopping application, a payment application, a life service application, and so on. The embodiment of the application does not limit this.
  • the aforementioned terminal 10 includes more than one terminal.
  • the aforementioned server 20 may communicate with the terminal 10 via a wired or wireless network.
  • the aforementioned server 20 may be an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or it may provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, and network services.
  • Cloud servers for basic cloud computing services such as services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, which are not limited in the embodiments of this application .
  • Fig. 2 shows a flowchart of a resource configuration method provided by an exemplary embodiment of the present application.
  • the method is mainly applied to the terminal 10 shown in FIG. 1 as an example.
  • the terminal 10 is installed in a client with a running target application.
  • the method includes the following steps:
  • Step 201 Obtain configuration data, where the configuration data includes m candidate configuration resources used to configure the target item in the target application, where m is a positive integer.
  • a client with a target application is installed and running in the terminal.
  • the target application has been introduced above, and will not be repeated here.
  • the client can communicate with the server through the network, so that the client can obtain configuration data from the server based on the network.
  • Configuration data refers to some parameters when implementing the relevant functions of the target application.
  • the configuration data includes candidate configuration resources used to configure at least one item in the target application.
  • the target application it can include multiple items that need to be configured.
  • the items that need to be configured can include interface display items, interface text items, sound effect items, etc., where the interface display items refer to the user interface displayed by the game application at runtime ;
  • Interface text items refer to some text descriptions included in the user interface displayed when the game application is running; sound effects items refer to the sound effects in the game application.
  • the target project can be any one of multiple projects.
  • the target project it may include multiple candidate configuration resources, and the multiple candidate configuration resources are different from each other and can be configured to the target project under different conditions.
  • the m candidate configuration resources for configuring the target item in the configuration data can be m different pictures. Configure the target project under different conditions to realize that the game application can display different pictures on different user interfaces.
  • the m candidate resources configured for the target item in the configuration data may be m segments of animation, which are configured to the target item under different conditions, so that the game application can display different types on different user interfaces. Animation.
  • the m candidate configuration resources for configuring the target item in the configuration data may be m different videos, which are configured to the target item under different conditions, so that the game application can be displayed differently on different user interfaces. Video.
  • Step 202 According to the scene identification information corresponding to the m candidate configuration resources, select n candidate configuration resources matching the current running scene of the target application from the m candidate configuration resources, where n is a positive value less than or equal to m. Integer.
  • the scenario identification information is used to indicate the operating scenario to which the candidate configuration resource applies.
  • This operating scenario refers to the operating conditions of the client.
  • n candidate configuration resources that match the current running scene of the target application are determined.
  • the current operating scenario refers to the operating scenario where the target application is currently located;
  • the candidate configuration resource matching the current scenario refers to the candidate configuration resource suitable for the current operating scenario.
  • Step 203 Select a target configuration resource from the n candidate configuration resources according to the respective weights of the n candidate configuration resources.
  • the weight is used to indicate the probability of being selected for the candidate configuration resource.
  • the target configuration resource may be selected from the n candidate configuration resources according to the weights corresponding to the n candidate configuration resources.
  • Step 204 Use the target configuration resource to configure the target project.
  • the target configuration resource can be used to configure the target project.
  • the technical solution provided by the embodiments of the present application uses the correspondence between the scene identification information of the target application in different scenarios and the configuration resources, so that the client of the target application obtains m candidate configuration resources. Then, according to the scenario identification information, n candidate configuration resources that match the current operating scenario are selected, and the weights corresponding to the n candidate configuration resources are used to further determine the target configuration resources.
  • Fig. 3 shows a flowchart of a resource configuration method provided by another exemplary embodiment of the present application.
  • the method is mainly applied to the terminal 10 shown in FIG. 1 as an example.
  • the terminal 10 installs and runs the client of the target application program.
  • the method includes the following steps:
  • Step 301 Receive a first time stamp.
  • the user When running the client of the target application, the user can log in to the user account used by the user in the target application, and then can receive the first timestamp sent by the server.
  • the first time stamp sent by the server may also be received at the first time when the client of the target application starts running.
  • the first time stamp is used to indicate the time when the configuration data stored in the configuration database was last updated.
  • the configuration database is used to store configuration data. The developer of the target application program can update the configuration data according to actual needs in the process of developing the project of the target application program.
  • the configuration database may send the last updated time of the configuration data, that is, the first time stamp to the server.
  • the server may receive the first time stamp so as to send the first time stamp to the client later.
  • Step 302 Compare the first time stamp and the second time stamp.
  • the first time stamp can be compared with the second time stamp; wherein, the second time stamp is used to indicate the time when the locally stored configuration data is last updated, and the local storage refers to the target Storage performed by the client of the application.
  • each time the client obtains the above configuration data it can store the configuration data locally, and correspondingly record the time when the configuration data was last updated in the configuration database.
  • the client can be stored locally in the format of json.
  • json JavaScript Object Notation, JS object notation
  • JS object notation is a lightweight data exchange format.
  • other formats may also be used for storage, which is not limited in the embodiments of the present application.
  • Step 303 In response to the first time stamp being later than the second time stamp, a configuration acquisition request is sent.
  • the configuration data under the first time stamp is the latest configuration data.
  • the client can send a configuration acquisition request to the server.
  • the configuration acquisition request is used to request the acquisition of configuration data stored in the configuration database.
  • the configuration acquisition request may not be sent to the server.
  • Step 304 Receive configuration data stored in the configuration database.
  • the server may obtain the configuration data from the configuration database and send the obtained configuration data to the client, that is, the client may receive the configuration data stored in the configuration database sent by the server.
  • the client may also update the above-mentioned second timestamp.
  • FIG. 4 exemplarily shows a flow chart for the client to obtain configuration data.
  • the method for the client to obtain configuration data includes the following sub-steps: Step 41, the configuration database sends configuration data to the server, and correspondingly, the server receives the above configuration data; Step 42, the server sends the first time stamp to the client, and correspondingly, the client The client receives the first time stamp sent by the server; step 43, the client compares the first time stamp with the second time stamp; step 44, in response to the first time stamp being later than the second time stamp, the client sends a configuration acquisition request to the server , Correspondingly, the server receives the configuration acquisition request sent by the client; step 45, the server sends the configuration data to the client, and correspondingly, the client receives the configuration data.
  • Step 305 Obtain scene identification information of the current running scene of the target application.
  • n candidate configuration resources that match the current running scene of the target application can be selected from the m candidate configuration resources.
  • the configuration data includes m candidate configuration resources used to configure the target item in the target application. m is a positive integer, and n is a positive integer less than or equal to m.
  • the client needs to obtain the scene identification information of the current running scene of the target application, and the scene identification information is used to indicate the running scene to which the candidate configuration resource is applicable.
  • obtaining the scene identification information of the current running scene of the target application may include the following steps:
  • the scene factor is used to indicate the attributes of the running scene.
  • the scene factor includes at least one of the following: regional factor, mode factor, time factor, function factor, and emotion factor.
  • the above regional factor is used to indicate the release region of the target application, such as South Korea, Vietnam, Taiwan, etc.;
  • the above mode factor is used to indicate the current mode of the target application.
  • this mode Factors can include confrontation mode, escape mode, fighting mode, etc.;
  • the above time factor is used to indicate the running time of the current target application;
  • the above function factor is used to indicate different functional modules in the target application;
  • emotion factor is used to indicate the target The content of different emotional types in the application.
  • the identifier of the scene factor is used to identify the scene factor.
  • the scene identification information of the current running scene is determined by the identification of the scene factor.
  • determining the scene identification information of the current running scene according to the identification of the scene factor includes: splicing the identification of the scene factor to obtain the scene identification information of the current running scene. For example, when the scene factors corresponding to the current running scene include regional factors and mode factors, the identifiers of the regional factors and the mode factors can be spliced together, and the result of the splicing is used as the scene identification information of the current running scene.
  • the aforementioned mode factor may also be a mode combination factor.
  • the first mode factor corresponding to the confrontation mode and the second mode factor corresponding to the escape mode are spliced to obtain the mode combination factor.
  • the scene factor corresponding to the current operating scene includes one item, such as a regional factor
  • the identification of the regional factor is directly determined as the scene identification information of the current operating scene.
  • the above-mentioned configuration data may include a first configuration table and a second configuration table, where the first configuration table includes candidate configuration resources, resource identifications of candidate configuration resources, weights of candidate configuration resources, and effective period of candidate resources (including effective start time). And the end effective time), etc.; the above-mentioned second configuration table includes scene identification information, resource identifications of candidate configuration resources, and so on.
  • the target application is a game application
  • the resource is a picture resource
  • the scene factor includes a region factor and a mode factor as an example
  • Table-1 exemplarily shows a first configuration table.
  • the first column ID represents the resource identification of the candidate image resource
  • the second column is the image resource
  • the third column is the weight of the candidate image resource
  • the fourth column is the start effective time of the candidate resource
  • the fifth column is the end of the candidate resource. Effective time.
  • Table-2 exemplarily shows a second configuration table.
  • the first column is the scene identification information
  • the scene identification information is obtained by splicing the identification of the regional factor and the identification of the mode factor
  • the second column is the identification of the regional factor
  • the third column is the identification of the mode factor
  • the mode can be represented by the identification of the mode combination factor
  • Table-3 shows the correspondence between the identification of the mode factor and the identification of the mode combination factor.
  • Table-4 exemplarily shows another second configuration table.
  • Step 306 Obtain a resource identifier corresponding to the scene identifier information of the current running scene.
  • the resource identification corresponding to the scene identification is obtained.
  • the above resource identifier is used to uniquely identify the configuration resource.
  • the scene identification information “GLOBAL1” is a combination of the regional factor identification “GLOBAL” and the mode factor identification “1”, and the resource identification corresponding to the scene identification information “GLOBAL1” (Index ID sequence) includes 1 and 2.
  • Step 307 Select the candidate configuration resource indicated by the resource identifier from the m candidate configuration resources to obtain n candidate configuration resources.
  • the candidate configuration resource indicated by the resource identifier is selected from the m candidate configuration resources, so as to obtain n candidate configuration resources.
  • the resource identifier includes 1 and 2
  • the default identification information is used for acquisition.
  • the candidate configuration resource with the resource identifier of 4 is used as the n candidate configuration resources.
  • the following steps may be performed: obtain the effective time corresponding to the n candidate configuration resources; and take effect according to the n candidate configuration resources. At time, select k candidate configuration resources that are valid at the current moment from n candidate configuration resources, where k is a positive integer less than or equal to n.
  • the k candidate configuration resources that are valid at the moment are selected from the n candidate configuration resources, so as to select the k candidate configuration resources from the k candidate configuration resources. Select the target configuration resource.
  • the resource configuration within the time limit can be realized, so that the resources that are not at the effective time (such as before the effective time or after the effective time) are not configured.
  • Step 308 Generate random number intervals corresponding to the n candidate configuration resources respectively according to the weights corresponding to the n candidate configuration resources.
  • the respective weights corresponding to the n candidate configuration resources may be obtained according to the first configuration table.
  • the weight is used to indicate the probability of the candidate configuration resource being selected.
  • random number intervals corresponding to the n candidate configuration resources can be generated.
  • the length and weight of the aforementioned random number interval have a positive correlation.
  • generating the random number intervals corresponding to the n candidate configuration resources respectively according to the weights corresponding to the n candidate configuration resources includes the following steps:
  • the total random number interval is divided to obtain the random number intervals corresponding to the n candidate configuration resources respectively.
  • Step 309 Generate a random number.
  • the random number may be any number in the total interval of the random number.
  • Step 310 In response to the random number being in the i-th random number interval among the n random number intervals, determine the i-th candidate configuration resource corresponding to the i-th random number interval as the target configuration resource, where i is less than or equal to A positive integer of n.
  • the random number After generating a random number, it is determined that the random number is in the i-th random number interval of n random number intervals. Since each random number interval corresponds to a candidate configuration resource, it is determined that the above-mentioned random number is in the i-th random number interval. After the interval, the i-th candidate configuration resource corresponding to the i-th random number interval may be determined as the target configuration resource.
  • Step 311 Use the target configuration resource to configure the target project.
  • This step is the same as or similar to the content of step 204 in the embodiment of FIG. 2, and will not be repeated here.
  • the target configuration resource after determining the target configuration resource, it is determined whether the target configuration resource is a local resource or a network resource. If the target configuration resource is a local resource, the target configuration resource can be directly used to configure the target project; if If the target configuration resource is a network resource and has not been downloaded locally, the target configuration resource is downloaded from the server first, the target configuration resource is stored locally, and then the target configuration resource is used to configure the target project.
  • the picture resource is a picture stored or cached locally, the picture is directly displayed; if the picture resource is a picture in the text transfer protocol (http) format and If it is not downloaded locally, download the image resource from the server (such as the image server), and then load and display it.
  • http text transfer protocol
  • the resource configuration within the time limit can be realized, so that the resources that are not at the effective time (for example, before the effective time or after the effective time) are not configured.
  • Fig. 6 shows a flowchart of a resource configuration method provided by another exemplary embodiment of the present application.
  • the method is mainly applied to the terminal 10 in the implementation environment shown in FIG. 1 as an example.
  • the terminal 10 is installed with a client running a target application (such as a game application).
  • the method includes the following steps:
  • Step 601 Obtain configuration data, where the configuration data includes m candidate picture resources used to configure the user interface in the game application, where m is a positive integer.
  • a client terminal running a target application can be installed in the terminal, and the target application can be a game application.
  • the display of its user interface depends on image resources.
  • the client of the game application obtains configuration data from the server based on the network, and the configuration data includes a plurality of candidate picture resources used to configure the user interface in the game application.
  • the aforementioned configuration data further includes multiple configuration resources used to configure other items in the game application, which is not limited in the embodiment of the present application.
  • the code format of the configuration data is as follows:
  • Step 602 Select n candidate picture resources suitable for the current running scene of the game application from the m candidate picture resources, where n is a positive integer less than or equal to m.
  • n candidate picture resources that are suitable for the current running scene of the game application are selected from the m candidate picture resources.
  • n candidate picture resources that are suitable for the current running scene of the game application from the m candidate picture resources is the same as or similar to the content of steps 305-307 in the embodiment with reference to FIG. 3, here No longer.
  • Step 603 Select a target picture resource from n candidate picture resources.
  • the target picture resource is further determined from the above n candidate picture resources.
  • the detailed process of selecting the target picture resource from the n candidate picture resources is the same as or similar to the content of steps 308-311 in the embodiment with reference to FIG. 3, and will not be repeated here.
  • Step 604 Display the target picture resource in the user interface.
  • the target picture resource is displayed in the user interface.
  • the picture resource is a picture stored or cached locally, the picture is displayed directly; if the picture resource is an http format picture and has not been downloaded locally, the picture is downloaded from a server (such as a picture server) Resources, and then load and display.
  • a server such as a picture server
  • the picture resources displayed in the user interface 71 are all obtained based on the network server, and when the configuration data is updated, the display in the user interface can be dynamically changed.
  • the technical solution provided by the embodiments of the present application through the correspondence between the scene identification information of the game application in different scenarios and the picture resources, enables the client of the game application to obtain m candidate picture resources. Then, according to the scene identification information, n candidate picture resources that match the current running scene are selected, and the weights corresponding to the n candidate picture resources are used to further determine the target picture resources.
  • Fig. 9 shows a block diagram of a resource configuration device provided by an exemplary embodiment of the present application.
  • the device has the function of realizing the above example of resource configuration method, and the function can be realized by hardware, or by hardware executing corresponding software.
  • the device can be the terminal described above, or it can be set on the terminal.
  • the device 900 may include: a configuration data acquisition module 910, a candidate resource selection module 920, a target resource selection module 930, and a target resource configuration module 940.
  • the configuration data obtaining module 910 is configured to obtain configuration data.
  • the configuration data includes m candidate configuration resources used to configure the target item in the target application, and m is a positive integer.
  • the candidate resource selection module 920 is configured to select n candidate configuration resources matching the current running scene of the target application from the m candidate configuration resources according to the scene identification information corresponding to the m candidate configuration resources, where the scene identification The information is used to indicate the operating scenario to which the candidate configuration resource applies, and n is a positive integer less than or equal to m.
  • the target resource selection module 930 is configured to select the target configuration resource from the n candidate configuration resources according to the respective weights of the n candidate configuration resources, where the weight is used to indicate the probability of being selected for the candidate configuration resource.
  • the target resource configuration module 940 is used to configure the target project using target configuration resources.
  • the technical solution provided by the embodiments of the present application uses the correspondence between the scene identification information of the target application in different scenarios and the configuration resources, so that the client of the target application obtains m candidate configuration resources. Then, according to the scenario identification information, n candidate configuration resources that match the current operating scenario are selected, and the weights corresponding to the n candidate configuration resources are used to further determine the target configuration resources.
  • the candidate resource selection module 920 includes: an identification information acquisition unit 921, a resource identification acquisition unit 922, and a candidate resource selection unit 923.
  • the identification information acquiring unit 921 is configured to acquire scene identification information of the current running scene of the target application.
  • the resource identification acquiring unit 922 is configured to acquire the resource identification corresponding to the scene identification information of the current running scene.
  • the candidate resource selection unit 923 is configured to select the candidate configuration resources indicated by the resource identifier from the m candidate configuration resources to obtain n candidate configuration resources.
  • the identification information acquiring unit 921 is used to acquire a scene factor corresponding to the current running scene of the target application.
  • the scene factor includes at least one of the following: region factor, mode factor, time factor, function factor, Emotion factor: Determine the scene identification information of the current running scene according to the identification of the scene factor.
  • the target resource selection module 930 includes: a random interval generating unit 931, a random number generating unit 932, and a target resource determining unit 933.
  • the random interval generating unit 931 is configured to generate random number intervals corresponding to the n candidate configuration resources respectively according to the weights corresponding to the n candidate configuration resources.
  • the random number generating unit 932 is used to generate random numbers.
  • the target resource determining unit 933 is configured to determine the i-th candidate configuration resource corresponding to the i-th random number interval as the target configuration resource in response to the random number being in the i-th random number interval among the n random number intervals , I is a positive integer less than or equal to n.
  • the random interval generation unit 931 is configured to add the weights corresponding to the n candidate configuration resources to obtain the weight sum; determine the total interval of random numbers according to the weight and the n candidate configuration resources, respectively The corresponding weights divide the total random number interval to obtain the random number intervals corresponding to the n candidate configuration resources respectively.
  • the configuration data acquisition module 910 is configured to receive a first time stamp, and the first time stamp is used to indicate the time when the configuration data stored in the configuration database is last updated; compare the first time stamp with the second time stamp. A timestamp, the second timestamp is used to indicate the time when the locally stored configuration data is last updated; in response to the first timestamp being later than the second timestamp, a configuration acquisition request is sent, and the configuration acquisition request is used to request acquisition of the configuration data stored in the configuration database. Configuration data; receiving configuration data stored in the configuration database.
  • the device 900 further includes:
  • the effective time obtaining module 950 is configured to obtain the effective time corresponding to each of the n candidate configuration resources.
  • the candidate configuration selection module 960 is configured to select k candidate configuration resources that are valid at the current moment from the n candidate configuration resources according to the respective effective times corresponding to the n candidate configuration resources, where k is a positive integer less than or equal to n;
  • the target configuration resource is selected from k candidate configuration resources.
  • Fig. 11 shows a block diagram of a resource configuration device provided by another exemplary embodiment of the present application.
  • the device has the function of realizing the above example of resource configuration method, and the function can be realized by hardware, or by hardware executing corresponding software.
  • the device can be the terminal described above, or it can be set on the terminal.
  • the apparatus 1100 may include: a configuration data acquisition module 1110, a candidate picture selection module 1120, a target picture selection module 1130, and a target picture display module 1140.
  • the configuration data obtaining module 1110 is configured to obtain configuration data.
  • the configuration data includes m candidate picture resources used to configure the user interface in the game application, and m is a positive integer.
  • the candidate picture selection module 1120 is configured to select n candidate picture resources suitable for the current running scene of the game application from the m candidate picture resources, and n is a positive integer less than or equal to m.
  • the target picture selection module 1130 is used to select a target picture resource from n candidate picture resources.
  • the target picture display module 1140 is configured to display the target picture resource in the user interface.
  • the technical solutions provided by the embodiments of the present application through the correspondence between the scene identification information of the game application in different scenarios and the configuration resources, enable the client of the game application to obtain m candidate picture resources Then, according to the scene identification information, n candidate picture resources that match the current running scene are selected, and the weights corresponding to the n candidate picture resources are used to further determine the target picture resources.
  • Fig. 12 shows a structural block diagram of a terminal provided by an exemplary embodiment of the present application.
  • the terminal 1200 includes a processor 1201 and a memory 1202.
  • the processor 1201 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on.
  • the processor 1201 can be implemented in at least one hardware form among DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array, Programmable Logic Array) .
  • the processor 1201 may also include a main processor and a coprocessor.
  • the main processor is a processor used to process data in the awake state, also called a CPU (Central Processing Unit, central processing unit); the coprocessor is A low-power processor used to process data in the standby state.
  • the processor 1201 may be integrated with a GPU (Graphics Processing Unit, image processor), and the GPU is used to render and draw content that needs to be displayed on the display screen.
  • the processor 1201 may further include an AI (Artificial Intelligence) processor, and the AI processor is used to process computing operations related to machine learning.
  • AI Artificial Intelligence
  • the memory 1202 may include one or more computer-readable storage media, which may be non-transitory.
  • the memory 1202 may also include high-speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices and flash memory storage devices.
  • the non-transitory computer-readable storage medium in the memory 1202 is used to store at least one instruction, at least one program, code set or instruction set, the at least one instruction, at least one program, code set or instruction set It is used to be executed by the processor 1201 to implement the resource configuration method provided in the method embodiment of the present application.
  • the terminal 1200 may optionally further include: a peripheral device interface 1203 and at least one peripheral device.
  • the processor 1201, the memory 1202, and the peripheral device interface 1203 may be connected by a bus or a signal line.
  • Each peripheral device can be connected to the peripheral device interface 1203 through a bus, a signal line, or a circuit board.
  • the peripheral device may include: at least one of a communication interface 1204, a display screen 1205, an audio circuit 1206, a camera component 1207, a positioning component 1208, and a power supply 1209.
  • FIG. 12 does not constitute a limitation on the terminal 1200, and may include more or fewer components than shown in the figure, or combine certain components, or adopt different component arrangements.
  • Fig. 13 shows a schematic structural diagram of a server provided by an exemplary embodiment of the present application. Specifically:
  • the server 1300 includes a CPU (Central Processing Unit, central processing unit) 1301, a system memory 1304 including RAM (Random Access Memory) 1302 and ROM (Read Only Memory) 1303, and a connection system The system bus 1305 of the memory 1304 and the central processing unit 1301.
  • the server 1300 also includes a basic I/O (Input/Output input/output) system 1306 that helps transfer information between various devices in the computer, and a large-scale I/O system for storing the operating system 1313, application programs 1314, and other program modules 1315.
  • the basic input/output system 1306 includes a display 1308 for displaying information and an input device 1309 such as a mouse and a keyboard for the user to input information.
  • the display 1308 and the input device 1309 are both connected to the central processing unit 1301 through the input and output controller 1310 connected to the system bus 1305.
  • the basic input/output system 1306 may also include an input and output controller 1310 for receiving and processing input from multiple other devices such as a keyboard, a mouse, or an electronic stylus.
  • the input and output controller 1310 also provides output to a display screen, a printer, or other types of output devices.
  • the mass storage device 1307 is connected to the central processing unit 1301 through a mass storage controller (not shown) connected to the system bus 1305.
  • the mass storage device 1307 and its associated computer readable medium provide non-volatile storage for the server 1300. That is, the mass storage device 1307 may include a computer-readable medium (not shown) such as a hard disk or a CD-ROM (Compact Disc Read-Only Memory) drive.
  • the computer-readable media may include computer storage media and communication media.
  • Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storing information such as computer readable instructions, data structures, program modules or other data.
  • Computer storage media include RAM, ROM, EPROM (Erasable Programmable Read Only Memory), flash memory or other solid-state storage technologies, CD-ROM, DVD (Digital Video Disc, high-density digital video disc) Or other optical storage, tape cartridges, magnetic tape, disk storage or other magnetic storage devices.
  • RAM random access memory
  • ROM read only Memory
  • EPROM Erasable Programmable Read Only Memory
  • flash memory or other solid-state storage technologies
  • CD-ROM Compact Disc
  • DVD Digital Video Disc, high-density digital video disc
  • the computer storage medium is not limited to the above-mentioned types.
  • the aforementioned system memory 1304 and mass storage device 1307 may be collectively referred to as memory.
  • the server 1300 may also be connected to a remote computer on the network to run through a network such as the Internet. That is, the server 1300 can be connected to the network 1312 through the network interface unit 1311 connected to the system bus 1305, or in other words, the network interface unit 1311 can also be used to connect to other types of networks or remote computer systems (not shown) .
  • the memory also includes at least one instruction, at least one program, code set, or instruction set.
  • the at least one instruction, at least one program, code set, or instruction set is stored in the memory and configured to be used by one or more processors. Execute to realize the above resource allocation method.
  • a computer device is also provided.
  • the computer equipment can be a terminal or a server.
  • the computer device includes a processor and a memory, and the memory stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor To achieve the above resource allocation method.
  • a computer-readable storage medium stores at least one instruction, at least one program, code set, or instruction set, the at least one instruction, the at least one program ,
  • the code set or the instruction set implements the above resource configuration method when being executed by the processor.
  • a computer-readable storage medium is also provided, and a computer program is stored in the computer-readable storage medium, and the computer program implements the foregoing resource allocation method when executed by a processor.
  • a computer program product includes computer instructions stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the resource allocation method as described in the foregoing aspects.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Software Systems (AREA)
  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本申请提供了一种资源配置方法、装置、设备和存储介质,涉及计算机技术领域。所述方法包括:获取配置数据,配置数据包括用于对目标应用程序中的目标项目进行配置的m个候选配置资源,m为正整数;根据m个候选配置资源分别对应的场景标识信息,从m个候选配置资源中选取与目标应用程序的当前运行场景相匹配的n个候选配置资源,n为小于或等于m的正整数;根据n个候选配置资源分别对应的权重,从n个候选配置资源中选取目标配置资源;采用目标配置资源对目标项目进行配置。本申请实施例直接获取配置资源,不依赖于版本的更新来更新配置资源,从而节省了更换配置资源的成本,缩短了更换配置资源的耗时。

Description

资源配置方法、装置、设备和存储介质
本申请要求于2020年01月09日提交的申请号为202010022010.0、发明名称为“资源配置方法、装置、设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及计算机技术领域,特别涉及一种资源配置方法、装置、设备和存储介质。
背景技术
随着客户对游戏体验的要求逐渐提高,游戏客户端也需要经常更新。
在相关技术中,通过客户端本地表格配置一系列游戏包体内的图片路径,然后在配置表格中根据随机数据以及关键词索引,找到对应的图片路径,通过该图片路径加载该图片并在用户界面中进行显示。
在上述相关技术中,由于需要在客户端本地进行配置,因此在需要更换图片时,只能通过客户端的版本更新才能实现,导致更换图片的成本较高,耗时较长。
发明内容
本申请实施例提供了一种资源配置方法、装置、设备和存储介质,可用于节省更换配置资源的成本,缩短更换配置资源的耗时。所述技术方案如下:
根据本申请的一个方面,提供了一种资源配置方法,所述方法应用于终端,所述方法包括:
获取配置数据,所述配置数据包括用于对目标应用程序中的目标项目进行配置的m个候选配置资源,所述m为正整数;
根据所述m个候选配置资源分别对应的场景标识信息,从所述m个候选配置资源中选取与所述目标应用程序的当前运行场景相匹配的n个候选配置资源,其中,所述场景标识信息用于指示所述候选配置资源所适用的运行场景,所述n 为小于或等于所述m的正整数;
根据所述n个候选配置资源分别对应的权重,从所述n个候选配置资源中选取目标配置资源,其中,所述权重用于指示所述候选配置资源的被选择概率;
采用所述目标配置资源对所述目标项目进行配置。
根据本申请的另一方面,提供了一种资源配置方法,所述方法应用于终端,所述方法包括:
获取配置数据,所述配置数据包括用于对游戏应用程序中的用户界面进行配置的m个候选图片资源,所述m为正整数;
从所述m个候选图片资源中选取与所述游戏应用程序的当前运行场景相适配的n个候选图片资源,所述n为小于或等于所述m的正整数;
从所述n个候选图片资源中选取目标图片资源;
在所述用户界面中显示所述目标图片资源。
根据本申请的另一方面,提供了一种资源配置装置,所述装置包括:
配置数据获取模块,用于获取配置数据,所述配置数据包括用于对目标应用程序中的目标项目进行配置的m个候选配置资源,所述m为正整数;
候选资源选取模块,用于根据所述m个候选配置资源分别对应的场景标识信息,从所述m个候选配置资源中选取与所述目标应用程序的当前运行场景相匹配的n个候选配置资源,其中,所述场景标识信息用于指示所述候选配置资源所适用的运行场景,所述n为小于或等于所述m的正整数;
目标资源选取模块,用于根据所述n个候选配置资源分别对应的权重,从所述n个候选配置资源中选取目标配置资源,其中,所述权重用于指示所述候选配置资源的被选择概率;
目标资源配置模块,用于采用所述目标配置资源对所述目标项目进行配置。
根据本申请的另一方面,提供了一种资源配置装置,所述装置包括:
配置数据获取模块,用于获取配置数据,所述配置数据包括用于对游戏应用程序中的用户界面进行配置的m个候选图片资源,所述m为正整数;
候选图片选取模块,用于从所述m个候选图片资源中选取与所述游戏应用程序的当前运行场景相适配的n个候选图片资源,所述n为小于或等于所述m的正整数;
目标图片选取模块,用于从所述n个候选图片资源中选取目标图片资源;
目标图片显示模块,用于在所述用户界面中显示所述目标图片资源。
根据本申请的另一方面,提供了一种计算机设备,所述计算机设备包括处理器和存储器,所述存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现如上述方面所述的资源配置方法。
根据本申请的另一方面,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由处理器加载并执行以实现如上述方面所述的资源配置方法。
根据本申请的另一方面,提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,该计算机程序在被处理器执行时实现上述资源配置方法。
根据本申请的另一方面,提供了一种计算机程序产品,所述计算机程序产品包括计算机指令,所述计算机指令存储在计算机可读存储介质中。计算机设备的处理器从所述计算机可读存储介质读取所述计算机指令,所述处理器执行所述计算机指令,使得所述计算机设备执行如上述各方面所述的资源配置方法。
附图说明
图1是本申请一个示例性实施例提供的实施环境的示意图;
图2是本申请一个示例性实施例提供的资源配置方法的流程图;
图3是本申请另一个示例性实施例提供的资源配置方法的流程图;
图4是本申请一个示例性实施例提供的客户端获取配置数据的流程图;
图5是本申请一个示例性实施例提供的随机数区间的示意图;
图6是本申请另一个示例性实施例提供的资源配置方法的流程图;
图7是本申请一个示例性实施例提供的用户界面的示意图;
图8是本申请另一个示例性实施例提供的用户界面的示意图;
图9是本申请一个示例性实施例提供的资源配置装置的框图;
图10是本申请另一个示例性实施例提供的资源配置装置的框图;
图11是本申请另一个示例性实施例提供的资源配置装置的框图;
图12是本申请一个示例性实施例提供的终端的结构框图;
图13是本申请一个示例性实施例提供的服务器的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
图1示出了本申请一个示例性实施例提供的实施环境的示意图。该实施环境可以包括:终端10和服务器20。
上述终端10可以是台式计算机、膝上型便携计算机、手机、平板电脑、电子书阅读器、MP3(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)播放器、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器等等。本申请实施例对此不作限定。
可选地,该终端10中安装运行有目标应用程序的客户端,该目标应用程序可以为游戏类应用程序,如其可以是第三人称射击(Third Person Shooting Game,TPS)游戏、第一人称射击(First Person Shooting Game,FPS)游戏、多人在线战术竞技(Multiplayer Online Battle Arena,MOBA)游戏、多人枪战类生存游戏等等。此外,该目标应用程序还可以是即时通信类应用程序、视频类应用程序、社交类应用程序、多媒体类应用程序、购物类应用程序、支付类应用程序、生活服务类应用程序,等等。本申请实施例对此不作限定。
可选地,上述终端10包括不止一个。
上述服务器20可以通过有线或者无线网络与终端10进行通信。
可选地,上述服务器20可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN(Content Delivery Network,内容分发网络)、以及大数据和人工智能平台等基础云计算服务的云服务器,本申请实施例对此不作限定。
下面,通过几个实施例对本申请技术方案进行介绍说明。
图2示出了本申请一个示例性实施例提供的资源配置方法的流程图。在本 实施例中,主要以该方法应用于图1所示的终端10中来举例说明,在终端10中安装有运行的目标应用程序的客户端中。该方法包括如下几个步骤:
步骤201,获取配置数据,该配置数据包括用于对目标应用程序中的目标项目进行配置的m个候选配置资源,该m为正整数。
终端中安装运行有目标应用程序的客户端,关于该目标应用程序已在上文进行了介绍,此处不再赘述。
客户端可以通过网络与服务器进行通信,从而,客户端可以基于网络从服务器获取配置数据。
配置数据是指在实现目标应用程序的相关功能时的一些参数。配置数据中包括用于对目标应用程序中的至少一个项目进行配置的候选配置资源。对于目标应用程序,其可以包括多个需要配置的项目。以目标应用程序为游戏类应用程序为例,其需要配置的项目可以包括界面显示项目、界面文字项目、音效项目等,其中,界面显示项目是指该游戏类应用程序在运行时显示的用户界面;界面文字项目是指该游戏类应用程序在运行时显示的用户界面中包括的一些文字说明;音效项目是指该游戏类应用程序中的音效。
目标项目可以是多个项目中的任意一个项目。对于目标项目,其可以包括多个候选配置资源,该多个候选配置资源各不相同,且可以在不同的条件下配置给目标项目。以目标应用程序为游戏类应用程序,以目标项目为游戏类应用程序对应的界面显示项目为例,配置数据中的对该目标项目进行配置的m个候选配置资源可以是m张不同的图片,在不同的条件下配置给目标项目,实现该游戏类应用程序在不同的用户界面上显示不同的图片。示意性的,配置数据中的对该目标项目进行配置的m个候选资源可以是m段动画,在不同的条件下配置给目标项目,实现该游戏类应用程序在不同的用户界面上显示不同的动画。示意性的,配置数据中的对该目标项目进行配置的m个候选配置资源可以是m段不同的视频,在不同条件下配置给目标项目,实现游戏类应用程序在不同的用户界面上显示不同的视频。
步骤202,根据m个候选配置资源分别对应的场景标识信息,从m个候选配置资源中选取与目标应用程序的当前运行场景相匹配的n个候选配置资源,该n为小于或等于m的正整数。
场景标识信息用于指示候选配置资源所适用的运行场景。该运行场景是指 客户端所处的运行情况。
在获取到上述m个候选配置资源之后,根据m个候选配置资源分别对应的场景标识信息,确定出与目标应用程序的当前运行场景相匹配的n个候选配置资源。其中,当前运行场景是指目标应用程序当前所处的运行场景;与当前场景相匹配的候选配置资源是指适用于当前运行场景的候选配置资源。
步骤203,根据n个候选配置资源分别对应的权重,从n个候选配置资源中选取目标配置资源。
其中,权重用于指示候选配置资源的被选择概率。在确定出n个候选配置资源之后,可以根据该n个候选配置资源分别对应的权重,从该n个候选配置资源中选择目标配置资源。
步骤204,采用目标配置资源对目标项目进行配置。
在确定出目标配置资源之后,可以采用该目标配置资源对目标项目进行配置。
综上所述,本申请实施例提供的技术方案,通过目标应用程序在不同场景下的场景标识信息与配置资源之间的对应关系,使得目标应用程序的客户端在获取到m个候选配置资源后,根据场景标识信息选取与当前运行场景相匹配的n个候选配置资源,利用n个候选配置资源分别对应的权重进一步确定目标配置资源。
图3示出了本申请另一个示例性实施例提供的资源配置方法的流程图。在本实施例中,主要以该方法应用于图1所示的终端10中来举例说明,在终端10中安装运行的目标应用程序的客户端。该方法包括如下几个步骤:
步骤301,接收第一时间戳。
用户在运行目标应用程序的客户端时,可以登录用户在该目标应用程序中所使用的用户帐号,之后可以接收服务器发送的第一时间戳。
在一些实施例中,还可以在目标应用程序的客户端启动运行的第一时间接收服务器发送的第一时间时间戳。
第一时间戳用于指示配置数据库中存储的配置数据最后更新的时刻。配置数据库用于存储配置数据。目标应用程序的开发人员在对目标应用程序的项目开发的过程中,可以根据实际需求对配置数据进行更新。
在一些实施例中,在更新配置数据之后,配置数据库可以将该配置数据的最后更新的时刻,也即第一时间戳,发送给服务器。对应地,服务器可以接收该第一时间戳,以便之后将该第一时间戳发送给客户端。
步骤302,比较第一时间戳和第二时间戳。
在获取到上述第一时间戳之后,可以将该第一时间戳与第二时间戳进行比对;其中,第二时间戳用于指示本地存储的配置数据最后更新的时刻,本地存储是指目标应用程序的客户端进行的存储。
在一些实施例中,客户端在每次获取到上述配置数据之后,可以将该配置数据存储在本地,并对应记录该配置数据在配置数据库中最后更新的时刻。
在一些实施例中,客户端可以以json的格式存储在本地,json(JavaScript Object Notation,JS对象简谱)是一种轻量级的数据交换格式。在另一些实施例中,还可以采用其它格式进行存储,本申请实施例对此不作限定。
步骤303,响应于第一时间戳晚于第二时间戳,发送配置获取请求。
当第一时间戳晚于第二时间戳时,也就是说,第一时间戳下的配置数据是最新的配置数据。
在这种情况下,客户端可以向服务器发送配置获取请求。配置获取请求用于请求获取配置数据库中存储的配置数据。
在一些实施例中,当第一时间戳早于或等于第二时间戳时,表示当前本地存储的配置数据与当前配置数据库中存储的配置数据相同,则可以不向服务器发送配置获取请求。
步骤304,接收配置数据库中存储的配置数据。
服务器在获取到上述配置获取请求之后,可以从配置数据库中获取上述配置数据,并将获取到的配置数据发送给客户端,即客户端可以接收服务器发送的配置数据库中存储的配置数据。
在一些实施例中,客户端在接收到服务器发送的配置数据库中存储的配置数据之后,还可以更新上述第二时间戳。
通过在第一时间戳晚于第二时间戳的情况下获取配置数据,避免了每次登录客户端均拉取配置数据所造成的网络资源浪费,以及服务器资源的浪费。
示例性地,图4示例性示出了客户端获取配置数据的流程图。客户端获取配置数据的方法包括以下几个子步骤:步骤41,配置数据库向服务器发送配置 数据,对应地,服务器接收上述配置数据;步骤42,服务器向客户端发送第一时间戳,对应地,客户端接收服务器发送的第一时间戳;步骤43,客户端比较第一时间戳和第二时间戳;步骤44,响应于第一时间戳晚于第二时间戳,客户端向服务器发送配置获取请求,对应地,服务器接收客户端发送的配置获取请求;步骤45,服务器向客户端发送配置数据,对应地,客户端接收配置数据。
步骤305,获取目标应用程序的当前运行场景的场景标识信息。
在获取到上述配置数据之后,可以根据m个候选配置资源分别对应的场景标识信息,从m个候选配置资源中选取与目标应用程序的当前运行场景相匹配的n个候选配置资源。配置数据中包括用于对目标应用程序中的目标项目进行配置的m个候选配置资源。m为正整数,n为小于或等于m的正整数。
客户端需要获取目标应用程序的当前运行场景的场景标识信息,该场景标识信息用于指示候选配置资源所适用的运行场景。
在一些实施例中,获取目标应用程序的当前运行场景的场景标识信息,可以包括以下几个步骤:
(1)获取目标应用程序的当前运行场景对应的场景因子。
场景因子用于指示运行场景的属性。该场景因子包括以下至少一项:地区因子、模式因子、时间因子、功能因子、情感因子。上述地区因子用于指示目标应用程序的发行地区,如韩国、越南、台湾等;上述模式因子用于指示目标应用程序当前所处的模式,以目标应用程序为游戏类应用程序为例,该模式因子可以包括对抗模式、逃杀模式、格斗模式等;上述时间因子用于指示当前目标应用程序的运行时间;上述功能因子用于指示目标应用程序中不同的功能模块;上述情感因子用于指示目标应用程序中不同情感类型的内容。
(2)根据场景因子的标识,确定当前运行场景的场景标识信息。
场景因子的标识用于标识场景因子。通过场景因子的标识确定当前运行场景的场景标识信息。
在一些实施例中,上述根据场景因子的标识,确定当前运行场景的场景标识信息,包括:将场景因子的标识进行拼接,得到当前运行场景的场景标识信息。例如,当前运行场景对应的场景因子包括地区因子和模式因子时,可以将该地区因子的标识和模式因子的标识进行拼接,将拼接得到的结果作为当前运行场景的场景标识信息。
在一些实施例中,上述模式因子还可以是模式组合因子。比如,将对抗模式对应的第一模式因子与逃杀模式对应的第二模式因子进行拼接,得到模式组合因子。
需要说明的是,若当前运行场景对应的场景因子包括一项,如地区因子,则直接将该地区因子的标识,确定为当前运行场景的场景标识信息。
考虑地区因子和模式因子进行资源配置,可以针对程序发行地域和模型进行差异性配置。
上述配置数据可以包括第一配置表和第二配置表,其中,第一配置表中包括候选配置资源、候选配置资源的资源标识、候选配置资源的权重、候选资源的生效时段(包括开始生效时间和结束生效时间)等;上述第二配置表包括场景标识信息、候选配置资源的资源标识等。
示例性地,以目标应用程序为游戏类应用程序,资源为图片资源,且场景因子包括地区因子和模式因子为例,表-1示例性示出了一种第一配置表。
Figure PCTCN2020127722-appb-000001
表-1
其中,第一列ID表示候选图片资源的资源标识,第二列为图片资源,第三列为候选图片资源的权重,第四列为候选资源的开始生效时间,第五列为候选资源的结束生效时间。
表-2示例性示出了一种第二配置表。
Figure PCTCN2020127722-appb-000002
Figure PCTCN2020127722-appb-000003
表-2
其中,第一列为场景标识信息,该场景标识信息是由地区因子的标识和模式因子的标识进行拼接得到的;第二列为地区因子的标识;第三列为模式因子的标识,该模式因子的标识可以采用模式组合因子的标识表示,以表-3表示模式因子的标识与模式组合因子的标识之间的对应关系。
模式因子的标识 备注 模式组合因子的标识
101 逃杀模式单人配置 1
102 逃杀模式双人配置 1
103 逃杀模式四人配置 1
表-3
表-4示例性示出了另一种第二配置表。
Figure PCTCN2020127722-appb-000004
表-4
步骤306,获取与当前运行场景的场景标识信息相对应的资源标识。
在确定当前运行场景的场景标识信息之后,获取与该场景标识相对应的资源标识。上述资源标识用于唯一标识配置资源。
示例性地,如表-2所示,假设场景标识信息“GLOBAL1”是地区因子的标识“GLOBAL”和模式因子的标识“1”进行拼接得到的,该场景标识信息“GLOBAL1”对应的资源标识(索引ID序列)包括1和2。
步骤307,从m个候选配置资源中选取资源标识所指示的候选配置资源,得到n个候选配置资源。
在获取到与当前运行场景的场景标识信息相对应的资源标识之后,从m个候选配置资源中选取资源标识所指示的候选配置资源,从而得到n个候选配置资源。
示例性地,如上述表-2所示,假设资源标识包括1和2,则表示该m个候选配置资源中,将资源标识为1和2的两个候选配置资源作为上述n个候选配置资源。
在一些实施中,若采用场景标识信息无法获取到资源标识,则采用默认标识信息进行获取。
如上述表-2和表-4所示,采用DEFAULT获取到资源标识为4,则将资源标识为4的候选配置资源作为上述n个候选配置资源。
在一些实施中,在从m个候选配置资源中得到n个候选配置资源之后,还可以执行下述步骤:获取n个候选配置资源分别对应的生效时间;根据n个候选配置资源分别对应的生效时间,从n个候选配置资源中选取当前时刻有效的k个候选配置资源,该k为小于或等于n的正整数。
由于候选配置资源存在生效时间,因此,根据上述n个候选配置资源分别对应的生效时间,从该n个候选配置资源中选取当前时刻有效的k个候选配置资源,以便从该k个候选配置资源中选取目标配置资源。
在一些实施例中,上述获取n个候选配置资源分别对应的生效时间;根据n个候选配置资源分别对应的生效时间,从n个候选配置资源中选取当前时刻有效的k个候选配置资源的步骤还可以在上述步骤305之前执行,本申请实施例对此不作限定。
通过采用生效时间进一步对候选配置资源进行筛选,可以实现时效内的资源配置,使得不处于生效时间(如处于生效时间之前或生效时间之后)的资源不进行配置。
步骤308,根据n个候选配置资源分别对应的权重,生成n个候选配置资源分别对应的随机数区间。
在确定上述n个候选配置资源之后,可以根据第一配置表获取该n个候选配置资源分别对应的权重。该权重用于指示候选配置资源的被选择概率。
之后,根据该n个候选配置资源分别对应的权重,可以生成n个候选配置资源分别对应的随机数区间。在一些实施例中,上述随机数区间的长度和权重呈正相关关系。
在一些实施例中,上述根据n个候选配置资源分别对应的权重,生成n个候选配置资源分别对应的随机数区间,包括以下几个步骤:
(1)将n个候选配置资源分别对应的权重相加,得到权重和。
(2)根据权重和确定随机数总区间。
(3)按照n个候选配置资源分别对应的权重,对随机数总区间进行划分,得到n个候选配置资源分别对应的随机数区间。
示例性地,如图5所示,假设n等于3,该3个候选配置资源的权重分别为30、49和11,将该3个候选配置资源分别对应的权重相加,得到权重和,即30+49+11=90;之后,确定随机数总区间为[1,90];结合3个候选配置资源的权重,将随机数总区间[1,90]划分为[1,30]、[31,79]和[80,90]共3个随机数区间。
步骤309,生成随机数。
上述随机数可以是上述随机数总区间的任意一个数。
步骤310,响应于随机数处于n个随机数区间中的第i个随机数区间,将第i个随机数区间对应的第i个候选配置资源,确定为目标配置资源,该i为小于或等于n的正整数。
在生成一个随机数之后,确定该随机数处于n个随机数区间的第i个随机数区间,由于每个随机数区间对应一个候选配置资源,因此,在确定上述随机数处于第i个随机数区间之后,可以将该第i个随机数区间对应的第i个候选配置资源确定为目标配置资源。
示例性地,继续参考图5,假设随机数为50,该50落在第二个随机数区间[31,79]之间,则确定该第二个随机数区间51对应的候选配置资源为目标配置资源。
步骤311,采用目标配置资源对目标项目进行配置。
此步骤与图2实施例中步骤204的内容相同或类似,此处不再赘述。
在一些实施例中,在确定上述目标配置资源之后,判断该目标配置资源是本地资源还是网络资源,若该目标配置资源是本地资源,则可以直接采用该目 标配置资源对目标项目进行配置;若该目标配置资源是网络资源且未下载至本地,则先从服务器下载该目标配置资源,将该目标配置资源存储在本地,然后采用该目标配置资源对目标项目进行配置。
示例性地,以上述目标配置资源是图片资源为例,若该图片资源是存储或缓存在本地的图片,则直接显示该图片;若该图片资源是以文本传输协议(http)格式的图片且未下载至本地,则从服务器(如图片服务器)下载该图片资源,然后进行加载显示。
另外,通过在第一时间戳晚于第二时间戳的情况下获取配置数据,避免了每次登录客户端均拉取配置数据所造成的网络资源浪费,以及服务器资源的浪费。
另外,通过采用生效时间进一步对候选配置资源进行筛选,可以实现时效内的资源配置,使得不处于生效时间(如处于生效时间之前或生效时间之后)的资源不进行配置。
另外,考虑地区因子和模式因子进行资源配置,可以针对程序发行地域和模型进行差异性配置。
图6示出了本申请另一个示例性实施例提供的资源配置方法的流程图。在本实施例中,主要以该方法应用于图1所示实施环境的终端10中来举例说明,在终端10中安装运行有目标应用程序(如游戏应用程序)的客户端。该方法包括如下几个步骤:
步骤601,获取配置数据,配置数据包括用于对游戏应用程序中的用户界面进行配置的m个候选图片资源,该m为正整数。
终端中可以安装运行有目标应用程序的客户端,该目标应用程序可以是游戏应用程序。对于游戏应用程序,其用户界面的显示依赖于图片资源。
该游戏应用程序的客户端基于网络从服务器获取配置数据,该配置数据包括用于对游戏应用程序中的用户界面进行配置的多个候选图片资源。
在一些实施例中,上述配置数据中还包括用于对游戏应用程序中的其它项目进行配置的多个配置资源,本申请实施例对此不作限定。
示例性地,配置数据的代码格式如下:
Figure PCTCN2020127722-appb-000005
Figure PCTCN2020127722-appb-000006
Figure PCTCN2020127722-appb-000007
步骤602,从m个候选图片资源中选取与游戏应用程序的当前运行场景相适配的n个候选图片资源,该n为小于或等于m的正整数。
在获取到上述m个候选图片资源之后,从该m个候选图片资源中选取与游戏应用程序的当前运行场景相适配的n个候选图片资源。
关于从该m个候选图片资源中选取与游戏应用程序的当前运行场景相适配的n个候选图片资源的详细过程,与参考图3实施例中步骤305-307的内容相同或类似,此处不再赘述。
步骤603,从n个候选图片资源中选取目标图片资源。
之后,从上述n个候选图片资源中进一步确定出目标图片资源。
关于从n个候选图片资源中选取目标图片资源的详细过程,与参考图3实施例中步骤308-311的内容相同或类似,此处不再赘述。
步骤604,在用户界面中显示目标图片资源。
在确定上述目标图片资源之后,在用户界面中显示该目标图片资源。
在一些实施例中,若该图片资源是存储或缓存在本地的图片,则直接显示该图片;若该图片资源是http格式图片且未下载至本地,则从服务器(如图片服务器)下载该图片资源,然后进行加载显示。
示例性地,如图7和图8所示,在用户界面71中显示的图片资源均是基于 网络服务器得到的,在配置数据发生更新时,可以动态变更该用户界面中的显示。
综上所述,本申请实施例提供的技术方案,通过游戏应用程序在不同场景下的场景标识信息与图片资源之间的对应关系,使得游戏应用程序的客户端在获取到m个候选图片资源后,根据场景标识信息选取与当前运行场景相匹配的n个候选图片资源,利用n个候选图片资源分别对应的权重进一步确定目标图片资源。
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。
图9示出了本申请一个示例性实施例提供的资源配置装置的框图。该装置具有实现上述资源配置方法示例的功能,所述功能可以由硬件实现,也可以由硬件执行相应的软件实现。该装置可以是上文介绍的终端,也可以设置在终端上。该装置900可以包括:配置数据获取模块910、候选资源选取模块920、目标资源选取模块930和目标资源配置模块940。
配置数据获取模块910,用于获取配置数据,配置数据包括用于对目标应用程序中的目标项目进行配置的m个候选配置资源,m为正整数。
候选资源选取模块920,用于根据m个候选配置资源分别对应的场景标识信息,从m个候选配置资源中选取与目标应用程序的当前运行场景相匹配的n个候选配置资源,其中,场景标识信息用于指示候选配置资源所适用的运行场景,n为小于或等于m的正整数。
目标资源选取模块930,用于根据n个候选配置资源分别对应的权重,从n个候选配置资源中选取目标配置资源,其中,权重用于指示候选配置资源的被选择概率。
目标资源配置模块940,用于采用目标配置资源对目标项目进行配置。
综上所述,本申请实施例提供的技术方案,通过目标应用程序在不同场景下的场景标识信息与配置资源之间的对应关系,使得目标应用程序的客户端在获取到m个候选配置资源后,根据场景标识信息选取与当前运行场景相匹配的n个候选配置资源,利用n个候选配置资源分别对应的权重进一步确定目标配置资源。
在一些可能的设计中,如图10所示,所述候选资源选取模块920,包括:标识信息获取单元921、资源标识获取单元922和候选资源选取单元923。
所述标识信息获取单元921,用于获取目标应用程序的当前运行场景的场景标识信息。
所述资源标识获取单元922,用于获取与当前运行场景的场景标识信息相对应的资源标识。
所述候选资源选取单元923,用于从m个候选配置资源中选取资源标识所指示的候选配置资源,得到n个候选配置资源。
在一些可能的设计中,所述标识信息获取单元921,用于获取目标应用程序的当前运行场景对应的场景因子,场景因子包括以下至少一项:地区因子、模式因子、时间因子、功能因子、情感因子;根据场景因子的标识,确定当前运行场景的场景标识信息。
在一些可能的设计中,如图10所示,目标资源选取模块930,包括:随机区间生成单元931、随机数生成单元932和目标资源确定单元933。
所述随机区间生成单元931,用于根据n个候选配置资源分别对应的权重,生成n个候选配置资源分别对应的随机数区间。
所述随机数生成单元932,用于生成随机数。
所述目标资源确定单元933,用于响应于随机数处于n个随机数区间中的第i个随机数区间,将第i个随机数区间对应的第i个候选配置资源,确定为目标配置资源,i为小于或等于n的正整数。
在一些可能的设计中,所述随机区间生成单元931,用于将n个候选配置资源分别对应的权重相加,得到权重和;根据权重和确定随机数总区间;按照n个候选配置资源分别对应的权重,对随机数总区间进行划分,得到n个候选配置资源分别对应的随机数区间。
在一些可能的设计中,所述配置数据获取模块910,用于接收第一时间戳,第一时间戳用于指示配置数据库中存储的配置数据最后更新的时刻;比较第一时间戳和第二时间戳,第二时间戳用于指示本地存储的配置数据最后更新的时刻;响应于第一时间戳晚于第二时间戳,发送配置获取请求,配置获取请求用于请求获取配置数据库中存储的配置数据;接收配置数据库中存储的配置数据。
在一些可能的设计中,如图10所示,所述装置900还包括:
生效时间获取模块950,用于获取n个候选配置资源分别对应的生效时间。
候选配置选取模块960,用于根据n个候选配置资源分别对应的生效时间,从n个候选配置资源中选取当前时刻有效的k个候选配置资源,k为小于或等于n的正整数;其中,目标配置资源从k个候选配置资源中选取。
图11示出了本申请另一个示例性实施例提供的资源配置装置的框图。该装置具有实现上述资源配置方法示例的功能,所述功能可以由硬件实现,也可以由硬件执行相应的软件实现。该装置可以是上文介绍的终端,也可以设置在终端上。该装置1100可以包括:配置数据获取模块1110、候选图片选取模块1120、目标图片选取模块1130和目标图片显示模块1140。
所述配置数据获取模块1110,用于获取配置数据,配置数据包括用于对游戏应用程序中的用户界面进行配置的m个候选图片资源,m为正整数。
候选图片选取模块1120,用于从m个候选图片资源中选取与游戏应用程序的当前运行场景相适配的n个候选图片资源,n为小于或等于m的正整数。
目标图片选取模块1130,用于从n个候选图片资源中选取目标图片资源。
目标图片显示模块1140,用于在用户界面中显示所述目标图片资源。
综上所述,本申请实施例提供的技术方案,通过游戏应用程序在不同场景下的场景标识信息与配置资源之间的对应关系,使得游戏应用程序的客户端在获取到m个候选图片资源后,根据场景标识信息选取与当前运行场景相匹配的n个候选图片资源,利用n个候选图片资源分别对应的权重进一步确定目标图片资源。
需要说明的是,上述实施例提供的装置,在实现其功能时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的装置与方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
图12示出了本申请一个示例性实施例提供的终端的结构框图。通常,终端1200包括有:处理器1201和存储器1202。
处理器1201可以包括一个或多个处理核心,比如4核心处理器、8核心处 理器等。处理器1201可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器1201也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central Processing Unit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器1201可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器1201还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。
存储器1202可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器1202还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器1202中的非暂态的计算机可读存储介质用于存储至少一条指令、至少一段程序、代码集或指令集,该至少一条指令、至少一段程序、代码集或指令集用于被处理器1201所执行以实现本申请中方法实施例提供的资源配置方法。
在一些实施例中,终端1200还可选包括有:外围设备接口1203和至少一个外围设备。处理器1201、存储器1202和外围设备接口1203之间可以通过总线或信号线相连。各个外围设备可以通过总线、信号线或电路板与外围设备接口1203相连。具体地,外围设备可以包括:通信接口1204、显示屏1205、音频电路1206、摄像头组件1207、定位组件1208和电源1209中的至少一种。
本领域技术人员可以理解,图12中示出的结构并不构成对终端1200的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。
图13示出了本申请一个示例性实施例提供的服务器的结构示意图。具体来讲:
所述服务器1300包括CPU(Central Processing Unit,中央处理器)1301、包括RAM(Random Access Memory,随机存取存储器)1302和ROM(Read Only Memory,只读存储器)1303的系统存储器1304,以及连接系统存储器1304和 中央处理单元1301的系统总线1305。所述服务器1300还包括帮助计算机内的各个器件之间传输信息的基本I/O(Input/Output输入/输出)系统1306,和用于存储操作系统1313、应用程序1314和其他程序模块1315的大容量存储设备1307。
所述基本输入/输出系统1306包括有用于显示信息的显示器1308和用于用户输入信息的诸如鼠标、键盘之类的输入设备1309。其中所述显示器1308和输入设备1309都通过连接到系统总线1305的输入输出控制器1310连接到中央处理单元1301。所述基本输入/输出系统1306还可以包括输入输出控制器1310以用于接收和处理来自键盘、鼠标、或电子触控笔等多个其他设备的输入。类似地,输入输出控制器1310还提供输出到显示屏、打印机或其他类型的输出设备。
所述大容量存储设备1307通过连接到系统总线1305的大容量存储控制器(未示出)连接到中央处理单元1301。所述大容量存储设备1307及其相关联的计算机可读介质为服务器1300提供非易失性存储。也就是说,所述大容量存储设备1307可以包括诸如硬盘或者CD-ROM(Compact Disc Read-Only Memory,只读光盘)驱动器之类的计算机可读介质(未示出)。
不失一般性,所述计算机可读介质可以包括计算机存储介质和通信介质。计算机存储介质包括以用于存储诸如计算机可读指令、数据结构、程序模块或其他数据等信息的任何方法或技术实现的易失性和非易失性、可移动和不可移动介质。计算机存储介质包括RAM、ROM、EPROM(Erasable Programmable Read Only Memory,可擦除可编程只读存储器)、闪存或其他固态存储其技术,CD-ROM、DVD(Digital Video Disc,高密度数字视频光盘)或其他光学存储、磁带盒、磁带、磁盘存储或其他磁性存储设备。当然,本领域技术人员可知所述计算机存储介质不局限于上述几种。上述的系统存储器1304和大容量存储设备1307可以统称为存储器。
根据本申请的各种实施例,所述服务器1300还可以通过诸如因特网等网络连接到网络上的远程计算机运行。也即服务器1300可以通过连接在所述系统总线1305上的网络接口单元1311连接到网络1312,或者说,也可以使用网络接口单元1311来连接到其他类型的网络或远程计算机系统(未示出)。
所述存储器还包括至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、至少一段程序、代码集或指令集存储于存储器中,且经配置以 由一个或者一个以上处理器执行,以实现上述资源配置方法。
在示例性实施例中,还提供了一种计算机设备。该计算机设备可以是终端或服务器。该计算机设备包括处理器和存储器,该存储器中存储有至少一条指令、至少一段程序、代码集或指令集,该至少一条指令、该至少一段程序、该代码集或指令集由处理器加载并执行以实现上述资源配置方法。
在示例性实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,该至少一条指令、该至少一段程序、该代码集或该指令集在被处理器执行时实现上述资源配置方法。
在示例性实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,该计算机程序在被处理器执行时实现上述资源配置方法。
在示例性实施例中,还提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从该计算机可读存储介质读取该计算机指令,该处理器执行该计算机指令,使得该计算机设备执行如上述各方面所述的资源配置方法。
应当理解的是,在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。
以上所述仅为本申请的示例性实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (18)

  1. 一种资源配置方法,其特征在于,所述方法应用于终端,所述方法包括:
    获取配置数据,所述配置数据包括用于对目标应用程序中的目标项目进行配置的m个候选配置资源,所述m为正整数;
    根据所述m个候选配置资源分别对应的场景标识信息,从所述m个候选配置资源中选取与所述目标应用程序的当前运行场景相匹配的n个候选配置资源,其中,所述场景标识信息用于指示所述候选配置资源所适用的运行场景,所述n为小于或等于所述m的正整数;
    根据所述n个候选配置资源分别对应的权重,从所述n个候选配置资源中选取目标配置资源,其中,所述权重用于指示所述候选配置资源的被选择概率;
    采用所述目标配置资源对所述目标项目进行配置。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述m个候选配置资源分别对应的场景标识信息,从所述m个候选配置资源中选取与所述目标应用程序的当前运行场景相匹配的n个候选配置资源,包括:
    获取所述目标应用程序的当前运行场景的场景标识信息;
    获取与所述当前运行场景的场景标识信息相对应的资源标识;
    从所述m个候选配置资源中选取所述资源标识所指示的候选配置资源,得到所述n个候选配置资源。
  3. 根据权利要求2所述的方法,其特征在于,所述获取所述目标应用程序的当前运行场景的场景标识信息,包括:
    获取所述目标应用程序的当前运行场景对应的场景因子,所述场景因子包括以下至少一项:地区因子、模式因子、时间因子、功能因子、情感因子;
    根据所述场景因子的标识,确定所述当前运行场景的场景标识信息。
  4. 根据权利要求1所述的方法,其特征在于,所述根据所述n个候选配置资源分别对应的权重,从所述n个候选配置资源中选取目标配置资源,包括:
    根据所述n个候选配置资源分别对应的权重,生成所述n个候选配置资源 分别对应的随机数区间;
    生成随机数;
    响应于所述随机数处于所述n个随机数区间中的第i个随机数区间,将所述第i个随机数区间对应的第i个候选配置资源,确定为所述目标配置资源,所述i为小于或等于所述n的正整数。
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述n个候选配置资源分别对应的权重,生成所述n个候选配置资源分别对应的随机数区间,包括:
    将所述n个候选配置资源分别对应的权重相加,得到权重和;
    根据所述权重和确定随机数总区间;
    按照所述n个候选配置资源分别对应的权重,对所述随机数总区间进行划分,得到所述n个候选配置资源分别对应的随机数区间。
  6. 根据权利要求1所述的方法,其特征在于,所述获取配置数据,包括:
    接收第一时间戳,所述第一时间戳用于指示配置数据库中存储的配置数据最后更新的时刻;
    比较所述第一时间戳和第二时间戳,所述第二时间戳用于指示本地存储的配置数据最后更新的时刻;
    响应于所述第一时间戳晚于所述第二时间戳,发送配置获取请求,所述配置获取请求用于请求获取所述配置数据库中存储的配置数据;
    接收所述配置数据库中存储的配置数据。
  7. 根据权利要求1至6任一项所述的方法,其特征在于,所述根据所述m个候选配置资源分别对应的场景标识信息,从所述m个候选配置资源中选取与所述目标应用程序的当前运行场景相匹配的n个候选配置资源之后,还包括:
    获取所述n个候选配置资源分别对应的生效时间;
    根据所述n个候选配置资源分别对应的生效时间,从所述n个候选配置资源中选取当前时刻有效的k个候选配置资源,所述k为小于或等于所述n的正整数;
    其中,所述目标配置资源从所述k个候选配置资源中选取。
  8. 一种资源配置方法,其特征在于,所述方法应用于终端,所述方法包括:
    获取配置数据,所述配置数据包括用于对游戏应用程序中的用户界面进行配置的m个候选图片资源,所述m为正整数;
    从所述m个候选图片资源中选取与所述游戏应用程序的当前运行场景相适配的n个候选图片资源,所述n为小于或等于所述m的正整数;
    从所述n个候选图片资源中选取目标图片资源;
    在所述用户界面中显示所述目标图片资源。
  9. 一种资源配置装置,其特征在于,所述装置包括:
    配置数据获取模块,用于获取配置数据,所述配置数据包括用于对目标应用程序中的目标项目进行配置的m个候选配置资源,所述m为正整数;
    候选资源选取模块,用于根据所述m个候选配置资源分别对应的场景标识信息,从所述m个候选配置资源中选取与所述目标应用程序的当前运行场景相匹配的n个候选配置资源,其中,所述场景标识信息用于指示所述候选配置资源所适用的运行场景,所述n为小于或等于所述m的正整数;
    目标资源选取模块,用于根据所述n个候选配置资源分别对应的权重,从所述n个候选配置资源中选取目标配置资源,其中,所述权重用于指示所述候选配置资源的被选择概率;
    目标资源配置模块,用于采用所述目标配置资源对所述目标项目进行配置。
  10. 根据权利要求9所述的装置,其特征在于,所述述候选资源选取模块包括:标识信息获取单元、资源标识获取单元、候选资源选取单元;
    所述标识信息获取单元,用于获取所述目标应用程序的当前运行场景的场景标识信息;
    所述资源标识获取单元,用于获取与所述当前运行场景的场景标识信息相对应的资源标识;
    所述候选资源选取单元,用于从所述m个候选配置资源中选取所述资源标识所指示的候选配置资源,得到所述n个候选配置资源。
  11. 根据权利要求10所述的装置,其特征在于,所述标识信息获取单元,用于获取所述目标应用程序的当前运行场景对应的场景因子,所述场景因子包括以下至少一项:地区因子、模式因子、时间因子、功能因子、情感因子;根据所述场景因子的标识,确定所述当前运行场景的场景标识信息。
  12. 根据权利要求9所述的装置,其特征在于,所述目标资源选取模块包括:随机区间生成单元、随机数生成单元和目标资源确定单元;
    所述随机区间生成单元,用于根据所述n个候选配置资源分别对应的权重,生成所述n个候选配置资源分别对应的随机数区间;
    所述随机数生成单元,用于生成随机数;
    所述目标资源确定单元,用于响应于所述随机数处于所述n个随机数区间中的第i个随机数区间,将所述第i个随机数区间对应的第i个候选配置资源,确定为所述目标配置资源,所述i为小于或等于所述n的正整数。
  13. 根据权利要求12所述的装置,其特征在于,所述随机区间生成单元,用于将所述n个候选配置资源分别对应的权重相加,得到权重和;根据所述权重和确定随机数总区间;按照所述n个候选配置资源分别对应的权重,对所述随机数总区间进行划分,得到所述n个候选配置资源分别对应的随机数区间。
  14. 根据权利要求9所述的装置,其特征在于,所述配置数据获取模块,用于接收第一时间戳,所述第一时间戳用于指示配置数据库中存储的配置数据最后更新的时刻;比较所述第一时间戳和第二时间戳,所述第二时间戳用于指示本地存储的配置数据最后更新的时刻;响应于所述第一时间戳晚于所述第二时间戳,发送配置获取请求,所述配置获取请求用于请求获取所述配置数据库中存储的配置数据;接收所述配置数据库中存储的配置数据。
  15. 根据权利要求9至14任一所述的装置,其特征在于,所述装置还包括:
    生效时间获取模块,用于获取所述n个候选配置资源分别对应的生效时间。
    候选配置选取模块,用于根据所述n个候选配置资源分别对应的生效时间, 从所述n个候选配置资源中选取当前时刻有效的k个候选配置资源,所述k为小于或等于所述n的正整数;其中,所述目标配置资源从所述k个候选配置资源中选取。
  16. 一种资源配置装置,其特征在于,所述装置包括:
    配置数据获取模块,用于获取配置数据,所述配置数据包括用于对游戏应用程序中的用户界面进行配置的m个候选图片资源,所述m为正整数;
    候选图片选取模块,用于从所述m个候选图片资源中选取与所述游戏应用程序的当前运行场景相适配的n个候选图片资源,所述n为小于或等于所述m的正整数;
    目标图片选取模块,用于从所述n个候选图片资源中选取目标图片资源;
    目标图片显示模块,用于在所述用户界面中显示所述目标图片资源。
  17. 一种计算机设备,其特征在于,所述计算机设备包括处理器和存储器,所述存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现如权利要求1至7任一项所述的资源配置方法,或者实现如权利要求8所述的资源配置方法。
  18. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,所述计算机程序由处理器加载并执行以实现如权利要求1至7任一项所述的资源配置方法,或者实现如权利要求8所述的资源配置方法。
PCT/CN2020/127722 2020-01-09 2020-11-10 资源配置方法、装置、设备和存储介质 WO2021139386A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
SG11202111714QA SG11202111714QA (en) 2020-01-09 2020-11-10 Resource allocation method and apparatus, device, and storage medium
JP2021564820A JP7397094B2 (ja) 2020-01-09 2020-11-10 リソース構成方法、リソース構成装置、コンピューター機器、及びコンピュータープログラム
KR1020217033800A KR102632194B1 (ko) 2020-01-09 2020-11-10 자원 할당 방법 및 장치, 디바이스, 및 저장 매체
US17/505,427 US20220038389A1 (en) 2020-01-09 2021-10-19 Resource configuration method and apparatus, device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010022010.0A CN111259019B (zh) 2020-01-09 2020-01-09 资源配置方法、装置、设备和存储介质
CN202010022010.0 2020-01-09

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/505,427 Continuation US20220038389A1 (en) 2020-01-09 2021-10-19 Resource configuration method and apparatus, device, and storage medium

Publications (1)

Publication Number Publication Date
WO2021139386A1 true WO2021139386A1 (zh) 2021-07-15

Family

ID=70950315

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/127722 WO2021139386A1 (zh) 2020-01-09 2020-11-10 资源配置方法、装置、设备和存储介质

Country Status (6)

Country Link
US (1) US20220038389A1 (zh)
JP (1) JP7397094B2 (zh)
KR (1) KR102632194B1 (zh)
CN (1) CN111259019B (zh)
SG (1) SG11202111714QA (zh)
WO (1) WO2021139386A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114398091A (zh) * 2021-12-03 2022-04-26 贝壳找房(北京)科技有限公司 Flutter组件的配置方法及装置

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111259019B (zh) * 2020-01-09 2023-05-12 腾讯科技(深圳)有限公司 资源配置方法、装置、设备和存储介质
CN112000664B (zh) * 2020-07-28 2023-10-10 北京奇艺世纪科技有限公司 数据同步方法、装置、电子设备及可读存储介质
CN112256295A (zh) * 2020-09-21 2021-01-22 北京达佳互联信息技术有限公司 应用程序的更新方法、装置、设备和存储介质
CN112260864A (zh) * 2020-10-16 2021-01-22 杭州易和网络有限公司 对设备配置信息的配置方法
CN113642924A (zh) * 2021-08-30 2021-11-12 北京沃东天骏信息技术有限公司 服务资源匹配方法和装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107861816A (zh) * 2017-10-31 2018-03-30 广东欧珀移动通信有限公司 资源配置方法及装置
CN110201397A (zh) * 2019-06-28 2019-09-06 北京金山安全软件有限公司 一种游戏资源配置方法、装置及电子设备
US20190378316A1 (en) * 2017-04-18 2019-12-12 Banuba Limited Dynamic real-time generation of three-dimensional avatar models of users based on live visual input of users' appearance and computer systems and computer-implemented methods directed to thereof
CN111259019A (zh) * 2020-01-09 2020-06-09 腾讯科技(深圳)有限公司 资源配置方法、装置、设备和存储介质

Family Cites Families (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0916195A (ja) * 1995-07-03 1997-01-17 Canon Inc 情報処理装置及びその方法
JP3883480B2 (ja) * 2002-08-23 2007-02-21 株式会社バンダイナムコゲームス プログラム、情報記憶媒体及びゲーム装置
JP2004230071A (ja) * 2003-01-31 2004-08-19 Konami Co Ltd ゲーム装置、ゲーム装置の制御方法及びプログラム
JP4506558B2 (ja) * 2005-05-23 2010-07-21 ヤマハ株式会社 データ配信方法
JP2006325682A (ja) * 2005-05-23 2006-12-07 Aruze Corp 遊技機
JP2014184058A (ja) * 2013-03-25 2014-10-02 Square Enix Co Ltd ビデオゲーム処理装置、及びビデオゲーム処理プログラム
JP6124677B2 (ja) 2013-05-15 2017-05-10 株式会社Nttドコモ 情報提供装置、情報提供システム、情報提供方法及びプログラム
US9737819B2 (en) * 2013-07-23 2017-08-22 Kabam, Inc. System and method for a multi-prize mystery box that dynamically changes probabilities to ensure payout value
US9886486B2 (en) * 2014-09-24 2018-02-06 Oracle International Corporation Enriching events with dynamically typed big data for event processing
US10193821B1 (en) * 2015-03-19 2019-01-29 Amazon Technologies, Inc. Analyzing resource placement fragmentation for capacity planning
CN105302315A (zh) * 2015-11-20 2016-02-03 小米科技有限责任公司 图片处理方法及装置
CN105656810B (zh) * 2015-12-25 2020-02-07 北京奇虎科技有限公司 一种更新应用程序的方法及装置
CN107690127A (zh) * 2016-08-04 2018-02-13 北京信威通信技术股份有限公司 一种通信资源的确定方法及装置
US10500498B2 (en) * 2016-11-29 2019-12-10 Activision Publishing, Inc. System and method for optimizing virtual games
US10596471B2 (en) * 2017-12-22 2020-03-24 Activision Publishing, Inc. Systems and methods for enabling audience participation in multi-player video game play sessions
CN108646938B (zh) * 2018-03-13 2020-04-17 Oppo广东移动通信有限公司 触摸屏的配置方法、装置、终端及存储介质
CN109087369B (zh) * 2018-06-22 2021-02-09 腾讯科技(深圳)有限公司 虚拟对象显示方法、装置、电子装置及存储介质
CN109032793B (zh) * 2018-07-11 2021-03-16 Oppo广东移动通信有限公司 资源配置的方法、装置、终端及存储介质
JP6998286B2 (ja) * 2018-10-16 2022-01-18 任天堂株式会社 情報処理プログラム、情報処理装置、情報処理システム、および、情報処理方法
CN110474918B (zh) * 2019-08-22 2022-06-07 腾讯科技(深圳)有限公司 一种资源配置的验证方法及相关装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190378316A1 (en) * 2017-04-18 2019-12-12 Banuba Limited Dynamic real-time generation of three-dimensional avatar models of users based on live visual input of users' appearance and computer systems and computer-implemented methods directed to thereof
CN107861816A (zh) * 2017-10-31 2018-03-30 广东欧珀移动通信有限公司 资源配置方法及装置
CN110201397A (zh) * 2019-06-28 2019-09-06 北京金山安全软件有限公司 一种游戏资源配置方法、装置及电子设备
CN111259019A (zh) * 2020-01-09 2020-06-09 腾讯科技(深圳)有限公司 资源配置方法、装置、设备和存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114398091A (zh) * 2021-12-03 2022-04-26 贝壳找房(北京)科技有限公司 Flutter组件的配置方法及装置
CN114398091B (zh) * 2021-12-03 2024-02-23 贝壳找房(北京)科技有限公司 Flutter组件的配置方法及装置

Also Published As

Publication number Publication date
CN111259019B (zh) 2023-05-12
KR20210134047A (ko) 2021-11-08
CN111259019A (zh) 2020-06-09
SG11202111714QA (en) 2021-11-29
KR102632194B1 (ko) 2024-02-01
US20220038389A1 (en) 2022-02-03
JP2022531339A (ja) 2022-07-06
JP7397094B2 (ja) 2023-12-12

Similar Documents

Publication Publication Date Title
WO2021139386A1 (zh) 资源配置方法、装置、设备和存储介质
CN110597595B (zh) 多语言信息的提供方法、配置方法、装置、设备和介质
US9740761B2 (en) Management of application state data
CN110032447B (zh) 用于分配资源的方法和装置
KR20200113276A (ko) 리소스 배치 방법, 장치, 단말기 및 저장 매체
CN111866541B (zh) 直播推荐方法、装置、服务器及存储介质
US11736749B2 (en) Interactive service processing method and system, device, and storage medium
CN111659126B (zh) 匹配进程的分配方法、装置、服务器、终端及存储介质
US20230405455A1 (en) Method and apparatus for processing cloud gaming resource data, computer device, and storage medium
JP7313467B2 (ja) サーバーの負荷予測及び高度なパフォーマンス測定
CN112734498A (zh) 任务奖励获取方法、装置、终端及存储介质
CN109462777B (zh) 视频热度更新方法、装置、终端及存储介质
CN111467798A (zh) 游戏应用程序中的帧显示方法、装置、终端和存储介质
CN116721007B (zh) 任务控制方法、系统及装置、电子设备和存储介质
CN113852834A (zh) 一种内容显示方法、装置、设备及存储介质
US11582307B2 (en) Method and apparatus for processing data
CN113515336B (zh) 直播间加入方法、创建方法、装置、设备及存储介质
CN117156191A (zh) 界面显示方法、装置、电子设备和计算机可读存储介质
CN113992989A (zh) 一种内容显示方法、装置、系统、设备及存储介质
CN107870816A (zh) 一种用于图像处理和存储的方法及装置
US11297384B2 (en) Method, system, and non-transitory computer-readable record medium for creating video based on user-feedbackable bots
CN117407080A (zh) 应用程序启动方法、装置、电子设备及计算机存储介质
CN113996066A (zh) 游戏应用更新方法、装置、存储介质及计算机设备
CN114217833A (zh) 应用更新方法、装置、计算机设备及计算机可读存储介质
CN115730161A (zh) 多媒体内容的显示方法、装置及设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20912376

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 20217033800

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2021564820

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20912376

Country of ref document: EP

Kind code of ref document: A1