Game task transfer method and related device

By transferring tasks to equipment with better performance in multi-player competitive games, the problem of game level limitation caused by insufficient equipment performance is solved, and the game experience and team victory probability is improved.

WO2025148463A1PCT designated stage expired Publication Date: 2025-07-17HUAWEI TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/125933
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-09
Filing Date
2024-10-18
Publication Date
2025-07-17

AI Technical Summary

Technical Problem

In multi-player competitive games, insufficient equipment performance leads to limited player game levels, affecting game results and experience.

Method used

By transferring game tasks in game scenarios, using equipment with better performance to perform tasks, alleviate the pressure of equipment with insufficient performance, and ensure game results and experience.

Benefits of technology

It effectively avoids the impact of insufficient equipment performance on game results, and improves the overall gaming experience and team victory probability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024125933_17072025_PF_FP_ABST
    Figure CN2024125933_17072025_PF_FP_ABST
Patent Text Reader

Abstract

A game task transfer method and a related device, for use in avoiding affecting gaming experience due to insufficient device performance. For example, when a first device is currently in a game scene, if the first device receives a trigger operation for triggering a game task, the first device sends a task transfer request, wherein the task transfer request is used for requesting another device in the game scene to execute the game task, and another device is a device other than the first device in the game scene. In this way, the first device can transfer the game task to another device for execution, thereby avoiding affecting the gaming experience due to insufficient performance of the first device.
Need to check novelty before this filing date? Find Prior Art

Description

A game task transfer method and related equipment

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of the People's Republic of China on January 9, 2024, with application number 202410038869.9 and application name "A Game Task Transfer Method and Related Equipment", the entire contents of which are incorporated by reference into this application. Technical Field

[0003] The present application relates to the field of terminal technology, and in particular to a game task transfer method and related equipment. Background Art

[0004] Currently, multiplayer competitive games are attracting a large number of players. These games require multiple players to access the same application through their respective terminals. In real life, each player's terminal may not be the same. If a player's terminal has poor performance, their gaming skills may be limited, affecting the outcome of the game.

[0005] Summary of the Invention

[0006] The embodiments of the present application provide a game task transfer method and related equipment, which are used to avoid affecting the game results due to insufficient device performance and improve the gaming experience.

[0007] In a first aspect, a method for transferring a game task is provided. This method can be applied to a first device, which is currently in a game scene. For example, the first device receives a trigger operation, which triggers a game task on the first device in the game scene. The first device then sends a task transfer request, which requests another device in the game scene to execute the game task. The other device is a device other than the first device in the game scene.

[0008] In an embodiment of the present application, when a user uses a first device to play a game (for example, through a game application or a webpage), the first device can transfer the game task to another device in the same game scene. In this way, the pressure on the first device can be relieved. For example, when the performance of the first device is insufficient (for example, the load is large), the game task can be transferred to another device. In this way, the game results of the first device can be minimized, ensuring that the gaming experience of the user of the first device is not reduced.

[0009] In one possible design, the first device is currently in a game scene, which may include: the first device displays a game screen. Taking a game application as an example, the first device is currently in a game scene, which may include: the first device currently runs the game application, and the game application runs in the foreground.

[0010] In a possible design, the game scene may be a game room, that is, the first device and the second device play games in the same game room.

[0011] In one possible design, before the first device sends a task transfer request, it can also determine that at least one of the following is satisfied: the game task is a preset task, the current running frame rate of the first device is lower than a first threshold, the current CPU usage of the first device is higher than a second threshold, and the current storage space occupancy of the first device is higher than a third threshold.

[0012] In the embodiment of the present application, when a first device triggers a game task, it can determine whether the conditions are met. If so, the game task can be transferred to a second device in the same game scene. If not, the first device can execute the game task on its own. This can prevent the first device from arbitrarily transferring tasks to other devices and placing a burden on the other devices.

[0013] In one possible design, the first device sends a task transfer request, including: the first device sends the task transfer request to a host device, and the host device includes a management device of the game scene.

[0014] In this embodiment of the present application, the host device is used to manage other devices in the game scene. When a device needs to transfer a task, it can send a task transfer request to the host device. The host device is responsible for unified management, which is convenient and efficient.

[0015] In one possible design, the host device can be the creator of the game room.

[0016] In one possible design, the first device sends a task transfer request, including: the first device sends the task transfer request to a second device, where the second device is a device selected by the first device from among the M devices based on at least one of the device performance, game status, game character, and geographic location of the M devices, where the M devices are other devices in the game scene except the first device, where M is an integer and M≥2.

[0017] In this embodiment of the present application, when the first device needs to transfer a task, it can elect a device (i.e., the second device) and transfer the task to the elected device. Because the elected second device has better performance, the second device performs the task of the first device, which can ensure the game result of the first device without significantly affecting the second device.

[0018] In one possible design, the second device satisfies at least one of the following conditions:

[0019] The second device is a device among the M devices whose current operating frame rate is higher than a fourth threshold; or,

[0020] The second device is a device whose current CPU usage is lower than a fifth threshold among the M devices; or

[0021] The second device is a device among the M devices whose current storage space occupancy rate is lower than a sixth threshold; or,

[0022] The second device is a device currently in a spectating state among the M devices; or

[0023] The second device is a device currently in a dead state among the M devices; or

[0024] The second device is a device corresponding to a designated game character among the M devices; or;

[0025] The second device is a device among the M devices, the distance between the second device and the first device being smaller than a first distance.

[0026] It should be noted that the above is a method for selecting the second device. In actual applications, the election can also be carried out through other methods, which are not limited in the embodiments of the present application.

[0027] In one possible design, the method also includes: before the first device sends a task transfer request to the second device, the current running frame rate of the first device is a first frame rate; after the first device sends a task transfer request to the second device, the current running frame rate of the first device is a second frame rate; and the difference between the first frame rate and the second frame rate is less than a preset value.

[0028] In the embodiment of the present application, after the first device transfers the game task to the second device, since the first device no longer needs to execute the game task, the current running frame rate of the first device will not drop too much, thus ensuring the gaming experience of the first device.

[0029] In one possible design, the preset value includes an estimated value of the frame rate reduction caused by executing the game task. For example, if executing a game task is expected to reduce the frame rate by 10 fps, then the preset value is 10 fps.

[0030] In one possible design, the task transfer request includes a task identifier of the game task. In an embodiment of the present application, if the task transfer request sent by the first device to the second device carries a task identifier, the second device can determine which task needs to be executed based on the task identifier, thereby improving accuracy.

[0031] In one possible design, the task transfer request includes information about the game character corresponding to the first device, including at least one of the game character's name, level, and position in the game scene. Of course, the task transfer request may also include other information, which is not exemplified in this embodiment of the present application.

[0032] In one possible design, the first device and the second device belong to the same team in the game scenario. That is, within the same team (e.g., our team), one device can transfer tasks to another. For example, if the performance of a device within the team is insufficient, tasks can be transferred to other devices within the team. This prevents the overall game results from being affected by the performance of a single device within the team, thereby improving the gaming experience.

[0033] In one possible design, the first device and the second device are currently in the same local area network. It should be noted that when multiple devices are playing games in the same local area network, each device needs to take on its own gaming tasks. Therefore, if a device has insufficient performance, its tasks can be transferred to other devices to ensure the gaming experience of that device.

[0034] In one possible design, the method further includes: the first device receiving a task execution result, where the task execution result is used to indicate the success or failure of the game task. For example, if the game task is to release a skill, the first device transfers the task to the second device. After the second device completes the task, it can return an indication to the first device indicating that the task was successfully executed. Of course, in some cases, the second device may fail to execute the task. In this case, the second device can return an indication of the task failure to the first device.

[0035] In a second aspect, a game task transfer method is also provided. This method can be applied to a second device, which is currently in a game scene. For example, the second device receives a task transfer request, which is used to request the execution of a game task generated by the first device in the game scene; the second device executes the game task.

[0036] In an embodiment of the present application, in the same game scenario, the second device can help the first device perform game tasks. This can relieve the pressure on the first device. For example, when the performance of the first device is insufficient (for example, under heavy load), the game task can be transferred to the second device. In this way, the game results of the first device can be minimized, ensuring that the gaming experience of the user of the first device is not reduced.

[0037] In one possible design, the second device being in a gaming scene may include: the second device displaying a game screen; or, after the second device displays the game screen, the game screen switches to the background of the second device. Taking a gaming application as an example, the second device being in a gaming scene may include: the second device currently running the gaming application, either in the foreground or the background.

[0038] In one possible design, the second device receives the task transfer request, including: the second device receives the task transfer request from the first device or the host device, and the host device includes a management device of the game scene.

[0039] In an embodiment of the present application, the host device is used to manage other devices in the game scene. When a first device needs to transfer a task, it can send a task transfer request to the host device, which then sends the task transfer request to the second device. This facilitates unified management. Of course, the first device can also send the task transfer request directly to the second device to improve efficiency.

[0040] In a possible design, before the second device executes the game task, the method further includes: the second device determining that at least one of the following conditions is satisfied:

[0041] The current running frame rate is higher than the seventh threshold; or,

[0042] The current CPU usage is lower than the eighth threshold; or,

[0043] The current storage space usage is lower than the ninth threshold; or

[0044] Currently in spectating mode; or,

[0045] Currently dead; or

[0046] The corresponding game character is a designated game character.

[0047] In an embodiment of the present application, when the second device receives a task transferred from the first device, it can determine whether the second device can execute it. If so, it executes it to avoid placing too much burden on the second device.

[0048] In one possible design, the game scene includes a third device, and the second device is in a spectator state before receiving the task transfer request. After receiving the task transfer request and before executing the game task, the second device switches to a participant state, and the second device sends the task transfer request to the third device.

[0049] In one possible design, the game scene also includes a third device, and the method further includes: when the second device determines that the condition is not met, sending the task transfer request to the third device.

[0050] In an embodiment of the present application, when the second device receives a task transferred from the first device, it can determine whether the second device can execute it. If not, the task is transferred to the third device to avoid placing too much burden on the second device.

[0051] In one possible design, the game scene includes P devices in addition to the first device and the second device, where P is an integer and P≥2. The third device is a device selected by the second device from the P devices based on at least one of the device performance, game status, game character, and geographic location of the P devices.

[0052] In an embodiment of the present application, when the second device receives a task transferred from the first device, it can determine whether the second device can execute it. If not, a third device is selected and the task is transferred to the third device to avoid placing too much burden on the second device.

[0053] In one possible design, the third device satisfies at least one of the following conditions:

[0054] The third device is a device whose current operating frame rate is higher than the tenth threshold among the P devices; or

[0055] The third device is a device whose current CPU usage is lower than the eleventh threshold among the P devices; or

[0056] The third device is a device among the P devices whose current storage space occupancy rate is lower than a twelfth threshold; or,

[0057] The third device is a device currently in a spectating state among the P devices; or

[0058] The third device is a device among the P devices that is currently in a dead state; or,

[0059] The third device is a device corresponding to a designated game character among the P devices; or;

[0060] The third device is a device among the P devices, the distance between the third device and the second device being less than a third distance.

[0061] It should be noted that the above are examples of several ways to elect the third device. In actual applications, election can also be carried out through other methods, which are not listed one by one in the embodiments of this application.

[0062] In one possible design, the method also includes: before the second device performs the preset task, the current operating frame rate of the second device is a third frame rate; after the second device performs the preset task, the current operating frame rate of the second device is a fourth frame rate; the fourth frame rate is lower than the third frame rate, and the difference between the third frame rate and the fourth frame rate is greater than or equal to a preset value.

[0063] In this embodiment of the present application, because the second device needs to perform additional gaming tasks for the first device, the current frame rate of the second device will be reduced. However, since the second device is the elected device, the reduced frame rate of the second device has little impact on the gaming experience of the second device, and the gaming experience of the first device can be maintained.

[0064] In one possible design, the preset value includes an estimated value of the frame rate reduction caused by executing the game task. For example, if executing a game task is expected to reduce the frame rate by 10 fps, then the preset value is 10 fps.

[0065] In a possible design, the task transfer request includes a task identifier of the game task.

[0066] In one possible design, the task transfer request includes information about a game character corresponding to the first device, and the information includes at least one of the name, level, and position of the game character in the game scene.

[0067] In one possible design, the first device and the second device belong to the same team in the game scene.

[0068] In one possible design, the first device and the second device are currently in the same local area network.

[0069] In one possible design, the method further includes: the second device sending and receiving a task execution result, where the task execution result is used to indicate the success or failure of the execution of the game task.

[0070] In one possible design, the method further includes: the second device rendering the execution effect of the game task in the game screen. In an embodiment of the present application, after the second device helps the first device to execute the game task, the second device can render the execution effect in the game screen, such as the release effect of a bomb. In this way, the second device does not need to return the execution result to the first device, because the first device will synchronize the game screen of the second device, so the first device can know that the second device has executed the game task through the game screen. Moreover, since the first device does not need to render the task execution result, it can better relieve the pressure on the first device and ensure the gaming experience of the first device.

[0071] A third aspect also provides a method for transferring a game task. This method can be applied to a host device. The host device includes a device that manages a game scene. For example, the host device receives a task transfer request from a first device, the task transfer request being used to request execution of a game task generated by the first device. The host device then sends the task transfer request to a second device, both of which are in the game scene.

[0072] In an embodiment of the present application, the host device is used to manage other devices in the game scene. When the first device needs to transfer a task, it can send a task transfer request to the host device, and the host device sends the task transfer request to the second device. This facilitates unified management.

[0073] In a possible design, the first device and the second device are in the same game scene, which may include: the first device and the second device are in the same game room.

[0074] In one possible design, the game scene also includes K devices in addition to the first device and the host device, K is an integer and K≥2. Before the host device sends the task transfer request to the second device, the method also includes: the host device selects the second device from the K devices based on at least one of the device performance, game status, game character, and geographic location of the K devices.

[0075] In this embodiment of the present application, after receiving a task transfer request from the first device, the host device can select a device (i.e., the second device) and send the task transfer request to the second device. This facilitates unified management and, because the selected device is the preferred device, the game result of the first device can be guaranteed without significantly affecting the second device.

[0076] In one possible design, the second device satisfies at least one of the following conditions:

[0077] The second device is a device whose current running frame rate is higher than a thirteenth threshold among the K devices; or

[0078] The second device is a device whose current CPU usage is lower than a fourteenth threshold among the K devices; or

[0079] The second device is a device whose current storage space occupancy rate is lower than a fifteenth threshold among the K devices; or

[0080] The second device is a device currently in a spectating state among the K devices; or

[0081] The second device is a device currently in a dead state among the K devices; or

[0082] The second device is a device corresponding to a designated game character among the K devices; or;

[0083] The second device is a device among the K devices, the distance between the second device and the first device being less than a fourth distance.

[0084] In a possible design, the task transfer request includes a task identifier of the game task.

[0085] In one possible design, the task transfer request includes information about a game character corresponding to the first device, and the information includes at least one of the name, level, and position of the game character in the game scene.

[0086] In one possible design, the first device and the second device belong to the same team in the game scene.

[0087] In one possible design, the first device, the second device, and the host device belong to the same team in the game scene.

[0088] In one possible design, the first device, the second device and the host device are in the same local area network.

[0089] In one possible design, the method further includes: the host device receiving a task execution result sent by the second device, the task execution result being used to indicate the success or failure of the execution of the game task; and the host device sending the task execution result to the first device.

[0090] In a fourth aspect, a game task transfer method is also provided. This method is applicable to a communication system comprising a first device and a second device, wherein the first device and the second device are running the same game application and in the same game scene. For example, the first device receives a trigger operation, wherein the trigger operation is used to trigger a game task of the first device in the game scene; the first device sends a task transfer request to the second device, wherein the task transfer request is used to request execution of the game task; and the second device executes the game task.

[0091] In one possible design, the first device sends a task transfer request to the second device, including: the first device sends the task transfer request to a host device, the host device includes a management device of the game scene; the host device sends the task transfer request to the second device.

[0092] In one possible design, the game scene includes Q devices in addition to the first device, where Q is an integer and Q>2, and the second device is a device selected from the Q devices based on at least one of the device performance, game status, game character, and geographic location of the Q devices.

[0093] In one possible design, the second device satisfies at least one of the following conditions:

[0094] The second device is a device whose current operating frame rate is higher than the sixteenth threshold among the Q devices; or

[0095] The second device is a device whose current CPU usage is lower than the seventeenth threshold among the Q devices; or

[0096] The second device is a device among the Q devices whose current storage space occupancy rate is lower than an eighteenth threshold; or

[0097] The second device is a device currently in a spectating state among the Q devices; or

[0098] The second device is a device currently in a dead state among the Q devices; or,

[0099] The second device is a device corresponding to a designated game character among the Q devices; or;

[0100] The second device is a device among the Q devices, the distance between the second device and the first device being less than a fifth distance.

[0101] In one possible design, before the first device sends a task transfer request to the second device, the method also includes: the first device determines that at least one of the following is satisfied: the game task is a preset task, the current running frame rate of the first device is lower than a first threshold, the current CPU usage of the first device is higher than a second threshold, and the current storage space occupancy of the first device is higher than a third threshold.

[0102] In a possible design, before the second device executes the game task, the method further includes: the second device determining that at least one of the following conditions is satisfied:

[0103] The current running frame rate is higher than the nineteenth threshold; or,

[0104] The current CPU usage is lower than the 20th threshold; or,

[0105] The current storage space usage is lower than the 21st threshold; or,

[0106] Currently in spectating mode; or,

[0107] Currently dead; or

[0108] The corresponding game character is a designated game character.

[0109] In one possible design, the game scene further includes a third device, and the method further includes:

[0110] When the second device determines that the condition is not met, it sends the task transfer request to the third device.

[0111] In one possible design, the game scene includes W devices in addition to the first device and the second device, where W is an integer and W≥2, and the third device is a device selected from the W devices by the second device based on at least one of the device performance, game status, game character, and geographic location of the W devices.

[0112] In one possible design, the third device satisfies at least one of the following conditions:

[0113] The third device is a device whose current operating frame rate is higher than the twenty-second threshold among the W devices; or

[0114] The third device is a device whose current CPU usage is lower than a twenty-third threshold among the W devices; or

[0115] The third device is a device whose current storage space occupancy rate is lower than a twenty-fourth threshold value among the W devices; or

[0116] The third device is a device currently in a spectating state among the W devices; or,

[0117] The third device is a device currently in a dead state among the W devices; or,

[0118] The third device is a device corresponding to a designated game character among the W devices; or;

[0119] The third device is a device among the W devices and the distance between the third device and the second device is less than a seventh distance.

[0120] In a possible design, the task transfer request includes a task identifier of the game task.

[0121] In one possible design, the task transfer request includes information about a game character corresponding to the first device, and the information includes at least one of the name, level, and position of the game character in the game scene.

[0122] In one possible design, the first device and the second device belong to the same team in the game scene.

[0123] In one possible design, the first device and the second device are currently in the same local area network.

[0124] In one possible design, the method further includes: the second device sending a task execution result to the first device, where the task execution result is used to indicate the success or failure of the execution of the game task.

[0125] In one possible design, the method further includes: the second device rendering the execution effect of the game task in the game screen.

[0126] In a fifth aspect, an electronic device is further provided, comprising:

[0127] a processor, a memory, and one or more programs;

[0128] In which, the one or more programs are stored in the memory, and the one or more programs include instructions. When the instructions are executed by the processor, the electronic device performs the method steps described in any one of the first, second, third or fourth aspects above.

[0129] In a sixth aspect, a communication system is further provided, including: a first device and a second device;

[0130] The first device is used to perform the method steps according to the first aspect above;

[0131] The second device is used to execute the method steps described in the second aspect above.

[0132] In one possible design, the communication system further includes: a host device, wherein the host device is used to execute the method described in the third aspect above.

[0133] In the seventh aspect, a computer-readable storage medium is also provided, which is used to store a computer program. When the computer program runs on a computer, the computer executes the method steps described in any one of the first, second, third or fourth aspects above.

[0134] In an eighth aspect, a computer program product is provided, comprising a computer program, which, when run on a computer, enables the computer to execute the method steps described in any one of the first, second, third or fourth aspects above.

[0135] In a ninth aspect, a chip system is further provided. The chip system is coupled to a memory in an electronic device and is configured to call a computer program stored in the memory and execute the technical solution provided in any of the first, second, third, or fourth aspects of the embodiments of this application. In the embodiments of this application, "coupling" refers to the direct or indirect connection of two components with each other.

[0136] For the technical effects that can be achieved in the above-mentioned second to ninth aspects, please refer to the description of the technical effects that can be achieved by the corresponding design scheme in the above-mentioned first aspect, and this application will not repeat them here. BRIEF DESCRIPTION OF THE DRAWINGS

[0137] FIG1 is a schematic diagram of a game scene provided in an embodiment of the present application;

[0138] FIG2 is a schematic diagram of an electronic device provided in one embodiment of the present application;

[0139] FIG3A is a flowchart of a method for transferring game tasks according to an embodiment of the present application;

[0140] 3B to 3D are schematic diagrams of game screens provided in one embodiment of the present application;

[0141] FIG4 is another flowchart of a method for transferring game tasks according to an embodiment of the present application;

[0142] FIG5 is a schematic diagram of a game state change according to an embodiment of the present application;

[0143] FIG6 is another flowchart of a method for transferring game tasks according to an embodiment of the present application;

[0144] FIG7 is another flowchart of a method for transferring game tasks according to an embodiment of the present application;

[0145] 8A and 8B are schematic diagrams of a task transfer service provided by an embodiment of the present application;

[0146] FIG9 is a schematic diagram of a software structure of an electronic device provided in an embodiment of the present application;

[0147] 10 and 11 are schematic diagrams of a process of forming a game team according to an embodiment of the present application;

[0148] FIG12 is a schematic diagram of an electronic device provided in accordance with an embodiment of the present application. DETAILED DESCRIPTION

[0149] Below, some terms used in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.

[0150] The at least one involved in the embodiments of the present application includes one or more; wherein, more means greater than or equal to two. In addition, it should be understood that, in the description of this specification, words such as "first" and "second" are only used for the purpose of distinguishing the description, and cannot be understood as expressing or implying relative importance, nor can they be understood as expressing or implying order. For example, the first device and the second device do not represent the importance of the two or the order of the two, but are only for distinguishing the description. In the embodiments of the present application, "and / or" is only a description of the association relationship, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects related to each other are in an "or" relationship.

[0151] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in connection with that embodiment is included in one or more embodiments of the specification. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in yet other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0152] As used in this specification, the terms “when” or “after” may be interpreted to mean “if” or “after” or “in response to determining that” or “in response to detecting that”, depending on the context. Similarly, the phrases “upon determining that” or “if (stated condition or event) is detected” may be interpreted to mean “if it is determined that” or “in response to determining that” or “upon detecting (stated condition or event)” or “in response to detecting (stated condition or event)”, depending on the context.

[0153] The game task transfer method provided in the embodiment of the present application is applicable to game scenarios. The game scenario may include multiple devices. For example, the game scenario includes multiple players, each player corresponding to a device. Optionally, the game scenario may be a scenario provided by a game application (APP). For example, multiple players enter the same game application through their respective devices and are in the same game scenario. The embodiment of the present application does not limit the type of game application, and any competitive game application can be used.

[0154] It should be noted that the game task transfer method provided in the embodiments of the present application is applicable to game scenarios, but does not limit whether the multiple devices in the game scenario are divided into teams. Teams can be divided or not. If multiple devices are divided into different teams, the game task transfer method provided in the embodiments of the present application can be task transfer between different devices within the same team, or task transfer between different teams. The embodiments of the present application do not limit this. For ease of understanding, this article mainly uses task transfer within the same team in a game scenario as an example for explanation. For example, please refer to Figure 1, which is a schematic diagram of a game scenario provided in an embodiment of the present application. The game scenario includes one or more teams, for example, a friendly team and an enemy team. Taking the friendly team as an example, the friendly team includes N players, where N is an integer greater than or equal to 2. N players correspond to N devices. In other words, each of the N players plays the game through their own device. Taking any one of the N devices as an example, the device can be a mobile phone, tablet computer, laptop computer, game console, etc. The embodiments of the present application do not limit the specific type of device.

[0155] In an embodiment of the present application, taking into account that the performance of the devices corresponding to each player in the same team (for example, our team in Figure 1) may not be exactly the same, for example, in our team, the performance of a certain device (for example, device 1) is poor, then the game tasks generated by device 1 during the game (for example, playback recording, special move release, etc.) can be transferred to other devices (for example, device 2) in the team (that is, our team) for execution, so as to avoid affecting the game results of the entire team due to the low performance of device 1.

[0156] FIG2 is a schematic diagram showing the hardware structure of an electronic device. The electronic device can be any one of the N devices mentioned above. As shown in FIG2 , the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0157] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors. The controller may serve as the nerve center and command center of the electronic device. The controller may generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. The processor 110 may also include memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a high-speed cache memory. This memory may store instructions or data that have just been used or are being recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids duplicate accesses, reduces the processor 110's waiting time, and thus improves system efficiency.

[0158] Optionally, the game task transfer method provided in the embodiment of the present application can be executed by the processor 110.

[0159] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.

[0160] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, and the like via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby implementing the touch function of the electronic device 100.

[0161] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface, enabling the function of answering calls through a Bluetooth headset.

[0162] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0163] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface, enabling the function of playing music through Bluetooth headphones.

[0164] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the electronic device 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device 100.

[0165] The GPIO interface can be configured via software. The GPIO interface can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0166] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as augmented reality devices.

[0167] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.

[0168] The wireless communication function of the electronic device can be implemented using antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, a modem processor, and a baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antenna can be used in conjunction with a tuning switch.

[0169] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied in electronic devices. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0170] The wireless communication module 160 can provide wireless communication solutions for electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0171] In some embodiments, antenna 1 of the electronic device is coupled to mobile communication module 150 , and antenna 2 is coupled to wireless communication module 160 , so that the electronic device can communicate with the network and other devices through wireless communication technology.

[0172] The display screen 194 is used to display the display interface of the application, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device may include one or more display screens 194.

[0173] The electronic device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor, etc. Among them, the ISP is used to process the data fed back by the camera 193.

[0174] The internal memory 121 can be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, and the software code of at least one application, etc. The data storage area can store data (such as images, videos, etc.) generated during the use of the electronic device. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash memory, etc.

[0175] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as pictures and videos can be stored on the external memory card.

[0176] The electronic device can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0177] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.

[0178] The speaker 170A, also called a "speaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to external speaker scenarios such as hands-free calls through one or more speakers 170A.

[0179] The receiver 170B, also called "earpiece", can be one or more and is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be heard by placing the receiver 170B close to the human ear.

[0180] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.

[0181] The headphone jack 170D is used to connect a wired headphone.

[0182] The pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194 .

[0183] The gyro sensor 180B can be used to determine the motion posture of the electronic device. In some embodiments, the gyro sensor 180B can be used to determine the angular velocity of the electronic device around three axes (i.e., the x, y, and z axes). The gyro sensor 180B can also be used for anti-shake photography.

[0184] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.

[0185] The magnetic sensor 180D is used to sense the magnetic field, such as a Hall sensor. For example, the electronic device can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. For another example, the electronic device can also use the Hall sensor to sense whether other devices are installed on the electronic device. Taking the electronic device in Figure 2 as a mobile phone as an example, if there is a magnetic device on the mobile phone case that can generate a magnetic field. When the mobile phone case is installed on the mobile phone, the Hall sensor in the mobile phone can sense the magnetic field generated by the magnetic device on the mobile phone case. After that, the Hall sensor can send an instruction to the processor 110, and the instruction is used to indicate that the mobile phone case is in place. After receiving the instruction, the processor 110 can use the content display method provided in the embodiment of the present application to customize the display content of the electronic ink screen of the mobile phone case. Optionally, when the mobile phone case is taken off, the Hall sensor in the mobile phone senses that the magnetic field disappears, and can send another instruction to the processor 110 to indicate that the mobile phone case is not in place or has been taken off. The specific implementation process will be described later.

[0186] The acceleration sensor 180E can detect the magnitude of the electronic device's acceleration in various directions (generally three axes) and the magnitude and direction of gravity when the electronic device is stationary.

[0187] The distance sensor 180F is used to measure distance. The electronic device can measure distance using infrared or laser.

[0188] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device emits infrared light through the light emitting diode. The electronic device uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device. When insufficient reflected light is detected, the electronic device can determine that there is no object near the electronic device.

[0189] The ambient light sensor 180L is used to sense the brightness of the ambient light. The electronic device can adaptively adjust the brightness of the display screen 194 according to the sensed ambient light brightness.

[0190] The fingerprint sensor 180H is used to collect fingerprints.

[0191] The temperature sensor 180J is used to detect temperature.

[0192] The touch sensor 180K, also known as a "touch panel," can be mounted on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also known as a "touch screen." The touch sensor 180K is used to detect touch operations applied to or near it. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event.

[0193] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone mass in a human vocal part.

[0194] The buttons 190 include a power button, a volume button, etc. The button 190 can be a mechanical button. It can also be a touch button. The electronic device can receive button input and generate key signal input related to the user settings and function control of the electronic device. The motor 191 can generate a vibration prompt. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power changes, messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect the SIM card. The SIM card can be connected to and separated from the electronic device by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195.

[0195] It is understood that the components shown in FIG2 do not constitute a specific limitation on the electronic device. The electronic device in the embodiment of the present application may include more or fewer components than those shown in FIG2. In addition, the combination / connection relationship between the components in FIG2 can also be adjusted and modified.

[0196] The following text describes the technical solutions of the embodiments of the present application in conjunction with the accompanying drawings.

[0197] Continuing with the game scenario shown in Figure 1, let's consider our team. Our team consists of N players, each with N devices. The same game app is installed on each of these N devices. Each player plays the game using the same game app on their respective device.

[0198] The N devices in our team can be the same device or different devices.

[0199] Optionally, the same device may include: at least one of: the same device manufacturer (for example, all are Huawei products), the same device type (for example, all are mobile phones or all are Huawei tablets), the same model (for example, all are Huawei Mate 40), the same system (for example, all are HarmonyOS), and the same version of the same system (for example, all are HarmonyOS 2.0 version).

[0200] Optionally, the different devices may include: at least one of: different device manufacturers (for example, some of the N devices are Huawei products, and the other part are non-Huawei products), different device types (for example, there are mobile phones and tablets among the N devices), different models (for example, there are Huawei mate 40 and Huawei nova among the N devices), different systems (for example, there are HarmonyOS and Android systems among the N devices), and different versions of the same system (for example, there are version 2.0 of HarmonyOS and version 1.0 of HarmonyOS among the N devices).

[0201] In one possible scenario, N devices on our team are connected to the same local area network or hotspot to play the game. For example, N players are in the same space, using Wi-Fi to connect to the same router or hotspot. In this scenario, the computing power generated by each of the N devices during the game is independently borne by each device. For example, device 1's computing power during the game is solely borne by device 1, and the same applies to the other devices. It's understandable that, given the same gaming experience, device performance can, to a certain extent, determine victory. For example, if the performance of every device on our team is high, the team's chances of victory are higher. However, if the performance of a player's device is lower, the team's chances of victory are lower. For example, if device 1 on our team has low performance, then when player 1 performs a game operation (e.g., unleashing a special move) on device 1, device 1 will experience a slow response due to insufficient performance (e.g., the CPU cannot handle the high computing power), impacting the overall team's game outcome.

[0202] In view of this, embodiments of the present application provide a method for transferring game tasks, which can be applied to game scenarios. Taking the game scenario shown in Figure 1 as an example, and taking the "our team" in Figure 1 as an example, assuming that the performance of device 1 in the "our team" is low, device 1 can transfer game tasks during the game to other devices in the same team for execution, thereby avoiding the impact of insufficient performance of device 1 on the team's game results and increasing the team's probability of victory.

[0203] The following continues to use the game scene shown in Figure 1 as an example to describe in detail the game task transfer method provided in the embodiment of the present application.

[0204] The first option

[0205] Please refer to Figure 3A, which is a first schematic diagram of a game task transfer method provided by an embodiment of the present application. Figure 3A can be applied to a game scenario and can be understood as an information exchange process between two devices belonging to the same team in the game scenario. Taking the game scenario shown in Figure 1 as an example, device 1 and device 2 in Figure 3A can be two devices in our team in the game scenario. As shown in Figure 3A, the process includes:

[0206] S301, device 1 and device 2 are connected to the same local area network.

[0207] Optionally, S301 may be executed or not, so it is indicated by a dotted line in Figure 3A. S301 is not executed, for example, when device 1 and device 2 access the same hotspot or both device 1 and device 2 use data traffic.

[0208] S302: Device 1 and device 2 start the same game application.

[0209] S303, device 1 and device 2 form a team to play a game.

[0210] In some examples, device 1 and device 2 are on the same team. One possible teaming method is for one device to create a room, and the other to join it. These two devices then form a team. In other words, device 1 and device 2 are in the same game room. For example, Figure 3B (a) shows the game interface for device 2, which includes a button for creating a room. When device 2 receives a button press for creating a room, input fields for the room name and number of players are displayed. The player on device 2 can set the room name and number of players. When device 2 receives a button press for confirming the room, room creation is complete. After device 2 creates the room, device 1 may display the interface shown in Figure 3B (b), which includes information about the room created by device 2. When device 1 receives a button press for joining a room, it joins the room. After device 1 joins the room, device 2 may display the interface shown in Figure 3B (c), which displays information about the players who have joined the room. After the game starts, device 2 or device 1 may display an interface as shown in (d) in FIG. 3B .

[0211] Optionally, S303 may or may not be executed, so it is indicated by a dotted line in Figure 3A. S303 is not executed, for example, if device 1 and device 2 are in different teams, or the game applications allowed by device 1 and device 2 do not require teaming.

[0212] S304: Device 1 receives a trigger operation, where the trigger operation is used to trigger a game task.

[0213] S305: Device 1 sends a task transfer request to device 2, where the task transfer request is used to request execution of the game task.

[0214] Optionally, before S305, the device 1 may further perform the step of determining whether at least one of the following four conditions is satisfied:

[0215] (1) The game task triggered by the trigger operation is a preset task. The preset task can be understood as a task that can be transferred in the game application. One possible implementation method is that the application package of the game application includes a task list, and the task list includes one or more task identifiers. The tasks indicated by the one or more task identifiers can be transferred, that is, preset tasks. Therefore, after receiving the trigger operation, the device 1 can determine whether the task identifier of the game task triggered by the trigger operation is located in the task list. If so, it is determined that the game task triggered by the trigger operation is a preset task. Otherwise, it is determined that the task triggered by the trigger operation is not a preset task. Exemplarily, the preset tasks may include: playback recording, specific skill release (for example, special move release), etc., which are not limited in the embodiments of the present application.

[0216] (2) The current running frame rate (Frame Rate) of device 1 is lower than the preset frame rate. The current running frame rate can be understood as the current image drawing rate of the graphics processing unit (GPU) in device 1, that is, the number of frames drawn in one second, which can reflect the current load of the GPU in device 1. If the current running frame rate of device 1 is high, it means that the GPU load is small and can undertake certain tasks, and there is no need to transfer tasks; conversely, if the current running frame rate of device 1 is low, it means that the GPU load is large and cannot undertake too many tasks, and the tasks can be transferred to other devices for execution.

[0217] (3) The CPU usage of device 1 is higher than the preset CPU usage. The higher the CPU usage, the heavier the CPU load (for example, more applications are running in the background) and the weaker the computing power. Conversely, the lower the CPU usage, the lower the CPU load (for example, fewer applications are running in the background) and the stronger the computing power. Therefore, if the CPU usage of device 1 is low, it means that device 1 has sufficient capacity to perform tasks on its own and there is no need to transfer tasks. Conversely, if the CPU usage of device 1 is high, it means that device 1 does not have sufficient capacity to perform tasks on its own and the tasks can be transferred.

[0218] (4) The storage space occupancy rate of device 1 is higher than the preset storage space occupancy rate. The storage space occupancy rate can be the ratio of the occupied storage space in device 1 to the total storage space. The smaller the storage space occupancy rate, the smoother the device runs; conversely, the larger the storage space occupancy rate, the slower the device runs. Therefore, if the storage space occupancy rate of device 1 is small, the task can be executed independently without transferring the task; conversely, if the storage space occupancy rate of device 1 is large, the task can be transferred to avoid slow running of device 1.

[0219] Optionally, the above (4) conditions can be used individually or in combination. For example, when device 1 determines that the triggered game task is a preset task, it can transfer the preset task to the second device without considering the current running frame rate, CPU usage, memory occupancy, etc. For another example, when device 1 determines that the triggered game task is a preset task, it can also determine whether the first device can execute it by itself based on at least one of the current running frame rate, CPU usage, and memory occupancy. If it can, there is no need to transfer it. If not, the preset task is transferred to the second device. For another example, when device 1 determines that the triggered game task is not a preset task, it can also determine whether the first device can execute it by itself based on at least one of the current running frame rate, CPU usage, and memory occupancy. If not, the preset task is transferred to the second device.

[0220] Optionally, before S305, device 1 may further perform the step of determining device 2 from a plurality of devices. In some examples, device 2 may be a host device. The host device may be a management device of a game room, for example, a device that creates a game room. Device 1 is in the game room. Please refer to the previous text for the process of creating a room. In other examples, in addition to device 1, the team may also include M devices (including device 2). M is a positive integer. For example, when M≥2, device 1 may randomly select a device from the M devices or determine a device through election, namely, device 2. For example, device 1 may elect device 2 from the M devices based on at least one of the device performance, game status, game character, and geographic location of the M devices. It is understandable that when M=1, it means that in addition to device 1, there is only device 2, and election may not be required. It is understandable that the elected device may be a host device or may not be a host device.

[0221] Optionally, device 2 may meet at least one of the following conditions:

[0222] (1) Device 2 is the device with the highest current running frame rate among the M devices. For example, device 2 may be the device with the highest current running frame rate among the M devices.

[0223] (2) Device 2 is the device with the lowest current CPU usage among the M devices. For example, device 2 may be the device with the lowest current CPU usage among the M devices.

[0224] (3) Device 2 is the device with the lowest current storage space occupancy rate among the M devices. Alternatively, device 2 may be the device with the lowest current storage space occupancy rate among the M devices.

[0225] (4) Device 2 is the device currently in the spectator state among the M devices.

[0226] (5) Device 2 is the device currently in the dead state among the M devices.

[0227] (6) Device 2 is the device corresponding to a specific game character among the M devices. For example, the application package of a game application includes indication information, which indicates that the device corresponding to a certain game character (e.g., assistant) is a device that helps other devices perform tasks. In this way, when devices corresponding to other game characters need to transfer tasks, the tasks can be transferred to the device corresponding to the game character (e.g., assistant).

[0228] (7) Device 2 is the device that is closest to Device 1 among the M devices. For example, Device 2 may be the device that is closest to Device 1 among the M devices. In other words, transferring tasks from Device 1 to Device 2, which is the closest device, can improve efficiency.

[0229] Optionally, the task transfer request may include a task identifier of the game task triggered by the triggering operation. The task identifier is used to uniquely identify the game task so that the device 2 knows which task to execute.

[0230] Optionally, the task transfer request may also carry other information, for example, information about the game character corresponding to device 1 , which may include the name, level, and position of the game character in the game scene.

[0231] S306, device 2 executes the game task.

[0232] Optionally, the device 2 may determine which task needs to be executed according to the task identifier carried in the task transfer request, and then execute the task.

[0233] S307 , device 2 returns the task execution result to device 1 .

[0234] In some examples, the task execution result can be the content obtained by performing the task. For example, if the game task is playback recording, one possible implementation is for device 2 to record the game screen to generate a video starting from the moment it receives the task transfer request. The recording duration can be a fixed, pre-set duration, or, after device 2 starts recording, it stops when it receives a stop recording command from device 1. In this approach, device 2 generates a video, meaning the task execution result is a video. Device 2 can return this video to device 1. Another possible implementation is for device 2 to record the position information of each game character on the game screen starting from the moment it receives the task transfer request. This file is not a video, but rather a file that records the position information of each game character at each moment. Therefore, the task execution result is a file. Device 2 can send this file to device 1. After receiving the file, device 1 can generate the game screen based on it and then play the game screen to complete the playback.

[0235] In other examples, the task execution result can be the success or failure of the task. For example, when the task is successfully executed, the task execution result is an indication message indicating that the task was successfully executed. When the task fails, the task execution result is another indication message indicating that the task failed. Taking the game task of skill release as an example, device 1 transfers the task to device 2. After device 2 completes the task, it can return an indication message to device 1 to indicate that the task was successfully executed. Of course, in some cases, device 2 may fail to execute the task (the embodiment of the present application does not limit the cause of failure), then device 2 can return an indication message of the task failure to device 1.

[0236] For example, if the game task involves releasing a specific skill, device 2 can calculate the location of the explosion point based on the position of the game character corresponding to device 1 in the game scene. Therefore, device 2 needs to obtain the location of the game character corresponding to device 1 in the game scene. One possible approach is for device 1 to send a task transfer request to device 2 containing the location of device 1's game character. Another possible approach is for device 2 to independently determine the location of device 1's game character in the game scene. For example, the task transfer request can include the name of device 1's game character, and device 2 can determine the location of the game character with that name in the game scene (i.e., the game screen). Therefore, device 2 can calculate the location of the explosion point based on the location of device 1's game character in the game scene. Optionally, after calculating the explosion point location, device 2 can either independently generate an explosion effect at the explosion point or return the location of the explosion point to device 1, which then generates the explosion effect at the explosion point. Optionally, if device 2 independently generates the explosion effect at the explosion point, device 2 needs to know the level of device 1's game character, as different levels produce different explosion effects. One possible approach is for device 1 to send a task transfer request to device 2 containing the level of device 1's game character. Another possible way is that device 2 determines the level of the game character of device 1 in the game scene by itself. For example, the task transfer request includes the name of the game character corresponding to device 1. Device 2 can determine the level of the game character with this name in the game scene because the level of each game character can be displayed in the game screen.

[0237] It should be noted that S307 can be executed or not, so it is indicated by a dotted line in the figure. For example, if the game task is to replay a recording, S307 must be executed. For example, if the game task is to release a specific skill, Device 2 has calculated the location of the explosion point and generated the explosion effect at the explosion point. Because the game screen is synchronized, the explosion effect will be displayed on Device 1's game screen. Therefore, Device 1 can determine that the skill release was successfully executed based on the game screen, so Device 2 does not need to return the task execution result to Device 1.

[0238] It should be noted that, taking the task of releasing a special move as an example, if the task of device 1 is not transferred to other devices and executed by device 1 itself, the GPS load will increase when device 1 executes the task, so the current running frame rate of device 1 will be significantly reduced. For example, please refer to (a) in Figure 3C, which is the game interface before device 1 receives the trigger operation for releasing a special move. The interface includes the current running frame rate of device 1, for example, 50fps. After device 1 receives the trigger operation for releasing a special move, since the task is executed by device 1 itself, the current running frame rate of device 1 is reduced from 50fps to 20fps, as shown in (b) in Figure 3C. The 30fps reduction is caused by the execution of the task of releasing a special move. In other words, the frame rate of device 1 is significantly reduced, which will cause device 1 to freeze and affect the game results.

[0239] If device 1 uses the technical solution provided in the embodiment of the present application to transfer the task of releasing the ultimate move to device 2 for execution, then the GPU load of device 1 will not increase significantly, so the current running frame rate of device 1 may remain unchanged or slightly reduced. For example, please refer to (a) in Figure 3D, which is the game interface before device 1 receives the trigger operation of releasing the ultimate move. The interface includes the current running frame rate of device 1, such as 50fps. After device 1 receives the trigger operation of releasing the ultimate move, since the task is transferred to device 2 for execution, the current running frame rate of device 1 is still 50fps or slightly lower than 50fps, such as 45fps, as shown in (b) in Figure 3D. In other words, after device 1 transfers the task, the reduction value of the current running frame rate of device 1 is less than 30pfs (as mentioned above, 30pfs is the frame rate reduction value caused by executing the task of releasing the ultimate move).

[0240] It is understandable that since device 2 has taken on the tasks of device 1, the current running frame rate in the game interface of device 2 will be reduced. However, since device 2 is the optimal device selected, the reduction in the current running frame rate of device 2 has little impact on device 2.

[0241] Second option

[0242] In the first scenario, within the same team, device 2 executes the task transferred from device 1. Unlike the first scenario, in the second scenario, before device 2 executes the task transferred from device 1, it first determines whether the conditions are met. If so, it executes the task; otherwise, it transfers the game task from device 1 to another device.

[0243] Please refer to Figure 4, which is a second schematic diagram of the game task transfer method provided in one embodiment of the present application. The process shown in Figure 4 can be applied to the game scene in Figure 1. For example, device 2, device 1, and device 3 in Figure 4 can be the three devices in our team in the game scene in Figure 1. As shown in Figure 4, the process includes:

[0244] S401, device 1, device 2 and device 3 are connected to the same local area network.

[0245] S402: Device 1, device 2, and device 3 start the same game application.

[0246] S403, device 1, device 2 and device 3 form a team to play a game.

[0247] In some examples, device 1, device 2, and device 3 are in the same team. For example, device 1, device 2, and device 3 are in the same game room. Alternatively, the game room can be created by any of device 1, device 2, and device 3.

[0248] S404: Device 1 receives a trigger operation, where the trigger operation is used to trigger a game task.

[0249] Optionally, the implementation principle of S401-S404 is the same as the implementation principle of S301-S304 in Figure 3A, and will not be repeated.

[0250] S405 , device 1 sends a task transfer request to device 2 , where the task transfer request is used to request execution of the game task.

[0251] Optionally, before S405 , the device 1 may further perform: determining whether at least one of the following conditions is satisfied:

[0252] (1) The game task triggered by the trigger operation is a preset task.

[0253] (2) The current running frame rate of device 1 is lower than the preset frame rate.

[0254] (3) The current CPU usage of device 1 is higher than the preset CPU usage.

[0255] (4) The current storage space occupancy rate of device 1 is higher than the preset storage space occupancy rate.

[0256] S406, device 2 determines whether the local device meets the conditions, if yes, executes S407 and S408, otherwise, executes S409 to S412.

[0257] In some examples, device 2 may be a host device. In other examples, device 2 may be a device randomly selected by device 1 or a device selected through election. For the election method, see S305 in FIG. 3A .

[0258] Optionally, in S406, the condition may include at least one of the following:

[0259] (1) The game character corresponding to device 2 is in a spectating state. It should be noted that the game character in the game application includes three states: participating state, spectating state and death state. There is a conversion relationship between these three states. For example, referring to Figure 5, it is assumed that the game character corresponding to a device is currently in a participating state. If the game character dies, it enters the death state. After entering the death state, it can be restored to the participating state or the spectating state. After entering the spectating state, it can be restored to the participating state. In the embodiment of the present application, considering that the device corresponding to the game character currently in the spectating state is in an "idle" state, the device in the spectating state is used to share the game tasks of other devices in the same team (for example, participating devices). Therefore, if the game character corresponding to device 2 is currently in a spectating state, it is determined that device 2 meets the conditions.

[0260] (2) The game character corresponding to device 2 is in a dead state. In this embodiment of the present application, considering that the device corresponding to the currently dead game character is in an "idle" state, the dead device is used to share the game tasks of other devices in the same team (e.g., participating devices). Therefore, if the game character corresponding to device 2 is currently in a dead state, it is determined that device 2 meets the condition.

[0261] (3) The current running frame rate of device 2 is higher than the preset frame rate. As mentioned above, a device with a higher current running frame rate indicates that its GPU load is lower. Therefore, in this embodiment of the application, the device with a higher current running frame rate is used to share the game tasks of other devices in the same team (for example, participating devices). Therefore, if the current running frame rate of device 2 is higher than the preset frame rate, it is determined that device 2 meets the condition.

[0262] (4) The current CPU usage of device 2 is lower than the preset CPU usage. As previously mentioned, a device with a lower CPU usage indicates a lower CPU load. Therefore, in this embodiment of the present application, a device with a lower CPU usage is used to share game tasks with other devices in the same team (e.g., participating devices). Therefore, if the CPU usage of device 2 is lower than the preset CPU usage, it is determined that device 2 meets the condition.

[0263] (5) The current storage space occupancy rate of device 2 is lower than the preset storage space occupancy rate. As mentioned above, devices with lower storage space occupancy rates are less likely to experience lags. Therefore, in this embodiment of the present application, devices with lower storage space occupancy rates are used to share game tasks with other devices in the same team (e.g., participating devices). Therefore, if the storage space occupancy rate of device 2 is lower than the preset storage space occupancy rate, it is determined that device 2 meets the conditions.

[0264] (6) The game character corresponding to device 2 is a designated game character. In other words, the device corresponding to the designated game character can take on tasks transferred from other devices, and the device that is not the designated game character can not take on tasks transferred from other devices.

[0265] S407, device 2 executes the game task.

[0266] S408 , device 2 returns the task execution result to device 1 .

[0267] Optionally, the implementation principles of S407 and S408 are the same as those of S306 and S307 in FIG3A , and are not repeated here.

[0268] S409: Device 2 sends a task transfer request to device 3, where the task transfer request is used to request execution of the game task.

[0269] Optionally, before S409, device 2 may determine device 3 from among multiple devices. For example, in addition to device 1 and device 2, the team may also include P devices, where P is a positive integer. For example, if P ≥ 2, device 2 may randomly select a device from among the P devices or determine the device through election, i.e., device 3. For example, device 2 may elect device 3 from among the P devices based on at least one of the device performance, game status, game character, or geographic location of the P devices. It is understood that when P = 1, this indicates that, in addition to device 1 and device 2, only device 3 exists, and election is not necessary.

[0270] Optionally, device 3 may meet at least one of the following conditions:

[0271] (1) Device 3 is the device with the highest current frame rate among the P devices. For example, device 3 is the device with the highest current frame rate among the P devices.

[0272] (2) Device 3 is the device with the lowest current CPU usage among the P devices. For example, device 3 is the device with the lowest current CPU usage among the P devices.

[0273] (3) Device 3 is the device with the lowest current storage space occupancy rate among the P devices. For example, device 3 is the device with the lowest current storage space occupancy rate among the P devices.

[0274] (4) Device 3 is the device currently in spectating mode among the P devices.

[0275] (5) Device 3 is the device currently in the dead state among the P devices.

[0276] (6) Device 3 is the device corresponding to the designated game character among the P devices.

[0277] (7) Device 3 is the device with the shorter distance from device 2 among the P devices.

[0278] S410, device 3 determines that the device meets the conditions.

[0279] Optionally, in S410, the condition includes at least one of:

[0280] (1) The game character corresponding to device 3 is in a spectator state.

[0281] (2) The game character corresponding to device 3 is in a dead state.

[0282] (3) The current running frame rate of device 3 is higher than the preset frame rate.

[0283] (4) The current CPU usage of device 3 is lower than the preset CPU usage.

[0284] (5) The current storage space occupancy rate of device 3 is lower than the preset storage space occupancy rate.

[0285] (6) The game character corresponding to device 3 is the designated game character.

[0286] S411, device 3 executes the game task.

[0287] S412 , device 3 returns the task execution result to device 1 .

[0288] Optionally, in S412, device 3 returns the task execution result to device 1, which may include: device 3 directly returns the task execution result to device 1, or device 3 returns the task execution result to device 1 through device 2, that is, device 3 sends the task execution result to device 2, and device 2 sends the task execution result to device 1.

[0289] It should be noted that in Figure 4, after receiving the task transfer request from device 1, device 2 first determines whether it meets the conditions. If so, it executes the task; otherwise, it transfers the task to device 3. One possible scenario is that the same team includes only three devices: device 2, device 1, and device 3. In this case, when the task is transferred from device 1 to device 2 and then from device 2 to device 3, since device 3 is the last device, device 3 does not need to execute S410 (hence the dashed line in the figure) and directly executes S411. Alternatively, a feasible way for device 3 to determine that it is the last device is for device 1 to send the task transfer request to device 2 with the identifier of device 1 or the identifier of device 1's game character. The task transfer request sent by device 2 to device 3 carries not only the identifier of device 1 or the identifier of device 1's game character, but also the identifier of device 2 or the identifier of device 2's corresponding game character. In this way, after receiving the task transfer request, device 3 knows that the task transfer request has passed through device 2 and device 1. Since the number of devices in the team is known to be three, device 3 can determine that it is the last device. Another possible scenario is that the same team includes not only devices 2, 1, and 3, but also device 4. In this case, when a task is transferred from device 1 to device 2, and then from device 2 to device 3, device 3 can execute S410, determining whether it meets the conditions. If so, it proceeds to S411. Otherwise, the task can be transferred to device 4. Since device 4 is the last device, it does not determine whether it meets the conditions and directly executes the task. The principle by which device 4 determines that it is the last device is as described above and will not be repeated here.

[0290] The third option

[0291] In the second solution, within the same team, if device 2 receives a task transfer request from device 1 and is unable to execute the task, the task is transferred to device 3. However, in the third solution, after receiving a task transfer request from device 1, device 2 can perform a device election to select the optimal device for task execution. Therefore, in the third solution, device 2's task can be transferred directly to the optimal device, eliminating the need for device-by-device transfers.

[0292] Please refer to Figure 6, which is a third schematic diagram of the game task transfer method provided in one embodiment of the present application. As shown in Figure 6, the process includes:

[0293] S601: Device 1, device 2, and device 3 are connected to the same local area network.

[0294] S602: Device 1, device 2, and device 3 start the same game application.

[0295] S603 , device 1 , device 2 , and device 3 form a team to play a game.

[0296] S604: Device 1 receives a trigger operation, where the trigger operation is used to trigger a game task.

[0297] Optionally, the implementation principle of S601-S604 is the same as the implementation principle of S301-S304 in Figure 3A, and will not be repeated.

[0298] S605: Device 1 sends a task transfer request to device 2, where the task transfer request is used to request execution of the game task.

[0299] Optionally, before S605, the device 1 may further perform the step of determining whether at least one of the following conditions is satisfied:

[0300] (1) The game task triggered by the trigger operation is a preset task.

[0301] (2) The current running frame rate of device 1 is lower than the preset frame rate.

[0302] (3) The current CPU usage of device 1 is higher than the preset CPU usage.

[0303] (4) The current storage space occupancy rate of device 1 is greater than the preset storage space occupancy rate.

[0304] In some examples, device 2 may be a host device. That is, when a non-host device needs to transfer a task, it sends a task transfer request to the host device, which then performs a device election to determine the optimal device and then transfers the task to the determined optimal device.

[0305] In other examples, device 2 can also be the device corresponding to a specific game character. For example, the game application package includes instructions for instructing the device corresponding to a specific game character to perform device election. In this way, when devices corresponding to other game characters need to transfer tasks, they send a task transfer request to the device corresponding to the game character. This device then performs device election, determines the optimal device, and then transfers the task to the optimal device.

[0306] In other examples, device 2 may be a device randomly selected by device 1, or a device elected by device 1. For the election method, please refer to S305 in FIG. 3A .

[0307] S606: Device 2 performs device election to determine the target device.

[0308] Optionally, device 2 may or may not participate in the device election. For example, if device 2 is a host device, it may not participate in the election.

[0309] In some examples, in addition to device 1 and device 2, the team also includes K devices, where K is a positive integer. When K>2, device 2 can conduct a device election among the K devices. It is understandable that no election is required when K=1. For example, S606 may include: device 2 selects a target device from the K devices based on at least one of the device performance, game status, game character, and geographic location of each of the K devices. Device performance may include: at least one of: current running frame rate, current CPU usage, and current storage space occupancy. Game status may include: death status, spectator status, or participant status.

[0310] Optionally, S606 may include at least one of the following methods:

[0311] Method 1: Device 2 determines the currently dead device among the K devices as the target device. Note that the device corresponding to the currently dead character is relatively idle because it is not participating in the battle. Therefore, the task of Device 1 can be transferred to the device corresponding to the currently dead character.

[0312] Method 2: Device 2 determines the target device as the device currently in spectating mode among the K devices. It should be noted that the device corresponding to the game character currently in spectating mode is relatively idle because it is not participating in the battle. Therefore, the task of Device 1 can be transferred to the device corresponding to the game character currently in spectating mode.

[0313] Method 3: Device 2 determines the device with the lowest current running frame rate among the K devices as the target device. For example, device 2 determines the device with the lowest current running frame rate among the K devices as the target device.

[0314] Method 4: Device 2 determines the device with the lowest current CPU usage among the K devices as the target device. For example, device 2 determines the device with the lowest current CPU usage among the K devices as the target device.

[0315] In a fifth approach, device 2 determines a device with a lower current storage space occupancy rate among the K devices as the target device. For example, device 2 determines a device with the lowest current storage space occupancy rate among the K devices as the target device.

[0316] In a sixth approach, device 2 determines the device of the K devices that is the designated game character as the target device. For example, the game application package includes information indicating that the device corresponding to a certain game character (e.g., an assistant) is a device that helps other devices perform tasks. In this case, when device 2 performs device selection, it can select the device corresponding to the designated game character (e.g., an assistant) as the target device.

[0317] In a seventh method, device 2 determines a device that is closest to device 2 among the K devices as the target device. For example, device 2 determines a device that is closest to device 2 among the K devices as the target device.

[0318] The above seven methods can be used individually or in combination, and are not limited in the embodiments of this application. In some examples, there is a priority order among the above seven methods. For example, the priority order includes: Method 1 / Method 2, Method 3, Method 4, Method 5, Method 6, and Method 7. For example, device 2 will prioritize using Method 1 or Method 2. If the target device cannot be determined or multiple target devices are determined, method 3 will be used, and so on.

[0319] Optionally, device 2 may or may not participate in the device election.

[0320] S607 : When the target device is device 3 , device 2 sends a task transfer request to device 3 .

[0321] S608, device 3 executes the game task.

[0322] S609 , device 3 returns the task execution result to device 1 .

[0323] Optionally, the implementation principles of S608 and S609 are the same as those of S411 and S412 in FIG. 4 , and are not repeated here.

[0324] The fourth option

[0325] The fourth solution can be understood as a combination of the second and third solutions. For example, in the fourth solution, after receiving a task transfer request from device 1, device 2 can first determine whether it can perform the task locally. If so, device 2 performs the task locally. Otherwise, a device election is performed to select the optimal device to perform device 1's task. It should be noted that device election takes a certain amount of time to complete. If device 2 can perform device 1's task locally, no device election is required, which can improve processing speed.

[0326] Please refer to Figure 7, which is a fourth schematic diagram of the game task transfer method provided in one embodiment of the present application. As shown in Figure 7, the process includes:

[0327] S701: Device 1, device 2, and device 3 are connected to the same local area network.

[0328] S702: Device 1, device 2, and device 3 start the same game application.

[0329] S703 , device 1 , device 2 , and device 3 form a team to play a game.

[0330] S704: Device 1 receives a trigger operation, where the trigger operation is used to trigger a game task.

[0331] Optionally, the implementation principle of S701-S704 is the same as the implementation principle of S301-S304 in Figure 3A, and will not be repeated.

[0332] S705 , device 1 sends a task transfer request to device 2 , where the task transfer request is used to request execution of the game task.

[0333] Optionally, before S705, the device 1 may further perform the step of determining whether at least one of the following conditions is satisfied:

[0334] (1) The game task triggered by the trigger operation is a preset task.

[0335] (2) The current running frame rate of device 1 is lower than the preset frame rate.

[0336] (3) The current CPU usage of device 1 is higher than the preset CPU usage.

[0337] (4) The current storage space occupancy rate of device 1 is higher than the preset storage space occupancy rate.

[0338] In some examples, device 2 may be the host device. In other examples, device 2 may also be the device corresponding to a designated game character. For example, the game application package includes instruction information that instructs the device corresponding to a particular game character to conduct a device election. In other examples, device 2 may be a device randomly selected by device 1, or a device elected by device 1. For details on the election method, see S305 in FIG. 3A .

[0339] S706, device 2 determines whether the device meets the conditions.

[0340] Optionally, in S706, the condition may include at least one of the following:

[0341] (1) The game character corresponding to device 2 is in a spectating state.

[0342] (2) The game character corresponding to device 2 is in a dead state.

[0343] (3) The current running frame rate of device 2 is lower than the preset frame rate.

[0344] (4) The CPU usage of device 2 is lower than the preset CPU usage.

[0345] (5) The storage space occupancy rate of device 2 is lower than the preset storage space occupancy rate.

[0346] (6) The game character corresponding to device 2 is the designated game character.

[0347] S707, device 2 executes the game task.

[0348] S708 , device 2 returns the task execution result to device 1 .

[0349] Optionally, the implementation principles of S707 and S708 are the same as those of S407 and S408 in FIG. 4 , and are not repeated here.

[0350] S709: Device 2 performs device election to determine the target device.

[0351] Optionally, in this case, device 2 may or may not participate in the device election.

[0352] S710 , when the target device is device 3 , device 2 sends a task transfer request to device 3 .

[0353] S711, device 3 determines that the condition is met.

[0354] Optionally, the implementation principle of S711 is the same as that of S410 in FIG4 , and is not repeated here.

[0355] S712, device 3 executes the game task.

[0356] S713 , device 3 returns the task execution result to device 1 .

[0357] Optionally, the implementation principles of S709-S710 and S712-S713 are the same as S606 to S609 in Figure 6, and are not repeated.

[0358] In the above embodiment, one device can transfer a game task to another device for execution. One possible implementation of task transfer between two devices is to install the same game application on both devices. The application package of the game application includes a software development kit (SDK), and the SDK includes a task transfer service (which may also have other names, such as a computing power transfer service) for implementing task transfer between different devices. For example, the task transfer service includes integrated software code for implementing task transfer. For example, the game developer pre-compiles the software code and writes the software code into the game application installation package, then publishes the game application to the app store, and each device downloads and installs the game application from the app store. Taking the fourth solution shown in Figure 7 as an example, device 1, device 2, and device 3 all include the application package of the game application, and the application package includes the task transfer service, as shown in Figure 8A. In this way, devices 1, device 2, and device 3 can transfer tasks through the task transfer service.

[0359] Please refer to Figure 8B, which is a schematic diagram of a task transfer service provided in an embodiment of the present application. In Figure 8B, taking the task transfer service in device 1 as an example, the task transfer service includes an interface module and a calculation module. Among them, the interface module may include n interfaces, n is a positive integer. The n interfaces are used to receive and / or send task transfer requests. The calculation module includes a device election module and a task transfer module. Among them, the device election module is used to perform device election. The task transfer module is used to determine whether the current task (for example, the task triggered by the trigger operation) is a preset task. If so, a task transfer request is sent to other devices through the interface module.

[0360] The following continues to use device 1 triggering a preset task as an example to illustrate the task transfer process in conjunction with FIG8B . The process may include:

[0361] (1) Device 1, device 2, and device 3 are connected to the same local area network.

[0362] (2) Device 1, device 2, and device 3 start the same game application.

[0363] (3), Device 1, Device 2 and Device 3 form a team to play the game.

[0364] (4) Device 1 receives a trigger operation, which is used to trigger a game task.

[0365] (5) The task transfer module in the task transfer service in device 1 sends a task transfer request through an interface. Optionally, the task transfer request carries the task identifier of the task triggered by the triggering operation. One possible scenario is that the task transfer module randomly determines an interface and then sends the task transfer request through the interface; or, the task transfer module sends the task transfer request through a specified interface. For example, each of the n interfaces corresponds to a task. Taking n=2 as an example, task 1 and task 2 are tasks that can be transferred in a game application. Task 1 corresponds to interface 1, and task 2 corresponds to interface 2. Exemplarily, the interface identifier of interface 1 can be the same as the task identifier of task 1, and the interface identifier of interface 2 can be the same as the task identifier of task 2. Therefore, when device 1 triggers task 1, it is necessary to send a task transfer request through interface 1, and the request carries the task identifier of task 1. Of course, if device 1 triggers task 2, it can send a task transfer request through interface 2, and the request carries the task identifier of task 2.

[0366] (6) Device 2 receives the task transfer request.

[0367] (7) Device 2 calls the device election module through the interface to conduct device election. One possible scenario is that device 2 randomly determines an interface and then calls the device election module through the interface; or, device 2 calls the device election module through a specified interface. For example, each of n interfaces corresponds to a task. Taking n=2 as an example, task 1 corresponds to interface 1, and task 2 corresponds to interface 2. Therefore, if the task transfer request carries the task identifier of task 1, the device election module is called through interface 1. If the task transfer request carries the task identifier of task 2, the device election module is called through interface 2.

[0368] (8) The device election module in device 2 performs device election and determines the target device.

[0369] The device election process is described above and will not be repeated here.

[0370] (9) After the device selection module in device 2 determines the target device, it calls the interface through the task transfer module to send a task transfer request to the target device.

[0371] (10) The target device is device 3, and device 3 receives the task transfer request.

[0372] (11) Device 3 executes the task.

[0373] (12) Device 3 returns the task execution result to device 2. One possible scenario is that device 3 randomly determines an interface and then sends the task execution result through the interface; or, device 3 sends the task execution result through a specified interface. For example, each of the n interfaces corresponds to a task. Taking n=2 as an example, task 1 corresponds to interface 1, and task 2 corresponds to interface 2. Therefore, if the task transfer request carries the task identifier of task 1, the task execution result is sent through interface 1. If the task transfer request carries the task identifier of task 2, the task execution result is sent through interface 2.

[0374] In the above embodiment, multiple devices can form a team to play games. In an embodiment of the present application, a method for forming a multi-device team game can be provided, which can be applied to the game scene shown in Figure 1. For ease of understanding, the following example is taken as an example of N devices in our team in the game scene, and all N devices in our team are Hongmeng systems.

[0375] It should be noted that the Hongmeng system includes a distributed soft bus, which can realize the rapid networking and connection of multiple devices. For example, please refer to Figure 9, which is a schematic diagram of a distributed soft bus. The distributed soft bus includes a discovery module, a connection module, a transmission module, etc. Among them, the discovery module is used to discover surrounding devices, the connection module is used to connect with surrounding devices, and the transmission module is used to transmit information to surrounding devices. The following is an example of N devices in the same team, each of which has a distributed soft bus as shown in Figure 9.

[0376] Please refer to Figure 10, which is a flowchart of a game team formation method provided by an embodiment of the present application. Figure 10 is illustrated by taking device 2 creating a room as an example. As shown in Figure 10, the process includes:

[0377] S1001: Device 1, device 2, and device 3 are connected to the same local area network.

[0378] S1002: Device 1, device 2, and device 3 enter the same game application.

[0379] S1003: Device 1, device 2, and device 3 respectively start the discovery module in the distributed soft bus.

[0380] In step S1004, device 2 broadcasts a message through the discovery module, which includes the device information of device 2. Correspondingly, device 1 and device 3 receive the message through the discovery module. Therefore, step S1004 includes step S1004a and step S1004b.

[0381] S1005 , device 1 , device 2 , and device 3 call a distributed soft bus to establish a trust relationship.

[0382] Taking the example of establishing a trust relationship between device 1 and device 2, one possible implementation is that the distributed soft bus in device 2 generates a network ID for device 2, and the message broadcast by device 2 carries this network ID. After receiving the message, device 1 can obtain device 2's network ID. Then, device 1 requests device 2 to establish a trust relationship. Device 2 can request user consent through a pop-up window. If the user of device 2 agrees, device 2 indicates to device 1 that they agree to establish the trust relationship, thus completing the establishment of the trust relationship between device 2 and device 1.

[0383] S1006, device 2 establishes a room.

[0384] Optionally, S1006 may also be executed before S1004, which is not limited in the embodiment of the present application.

[0385] S1007: Device 2 sends room information to device 1 and device 3 respectively. Therefore, S1007 may include S1007a and S1007b.

[0386] In step S1008, device 1 and device 3 join the room respectively. Therefore, step S1008 includes step S1008a and step S1008b.

[0387] In S1009, device 1 and device 3 send a connection request to device 2. Therefore, S1009 includes S1009a and S1009b.

[0388] S1010 , device 2 is connected to device 1 and device 3 respectively.

[0389] S1011, device 2, device 1 and device 3 synchronize game screens.

[0390] In Figure 10, multiple devices are all HarmonyOS as an example. There is a possible situation where the systems of multiple devices are different. For example, some devices are Android systems and some devices are HarmonyOS. In this case, the teaming of multiple devices can be carried out through network protocols such as User Datagram Protocol (UDP). Unlike the distributed soft bus, the two devices in the UDP protocol are connected based on Udp and ip. For example, as shown in Figure 11, the process includes:

[0391] S1101: Device 1, device 2, and device 3 are connected to the same local area network.

[0392] S1102 , device 1 , device 2 , and device 3 enter the same game application.

[0393] S1103: Device 1, device 2, and device 3 initialize the Udp module. The Udp module in each device can send and receive UDP packets.

[0394] S1104, device 2 establishes a room.

[0395] S1105: Device 2 sends UDP packets to device 1 and device 3 respectively. The UDP packets include room information and room IP addresses. Therefore, S1105 may include S1105a and S1105b.

[0396] In S1106, device 1 and device 3 join the room respectively. Therefore, S1106 includes S1106a and S1106b.

[0397] In step S1107, device 1 and device 3 send a connection request to device 2 based on the room IP address. Therefore, step S1107 includes steps S1107a and S1107b.

[0398] S1108 , device 2 is connected to device 1 and device 3 respectively.

[0399] S1109, device 1, device 2 and device 3 synchronize game screens.

[0400] Figure 12 is a schematic diagram of the structure of an electronic device 1200 provided in an embodiment of the present application. The electronic device 1200 may be device 1, device 2, or device 3 as mentioned above. As shown in Figure 12, the electronic device 1200 may include: one or more processors 1201; one or more memories 1202; a communication interface 1203, and one or more computer programs 1204, and the above-mentioned devices may be connected via one or more communication buses 1205. The one or more computer programs 1204 are stored in the above-mentioned memory 1202 and are configured to be executed by the one or more processors 1201, and the one or more computer programs 1204 include instructions. For example, when the electronic device 1200 is device 1 as mentioned above, the instructions can be used to execute the relevant steps of device 1 in the corresponding embodiment above, for example, the steps of device 1 in the embodiment shown in Figures 3A, 4, 6, 7, 10, and 11. For example, when the electronic device 1200 is device 2 mentioned above, the instruction can be used to execute the relevant steps of device 2 in the corresponding embodiment above, for example, the relevant steps of device 2 in the embodiment shown in Figures 3A, 4, 6, 7, 10, and 11. For example, when the electronic device 1200 is device 3 mentioned above, the instruction can be used to execute the relevant steps of device 3 in the corresponding embodiment above, for example, the relevant steps of device 3 in the embodiment shown in Figures 4, 6, 7, 10, and 11. The communication interface 1203 is used to enable communication between the electronic device 1200 and other devices. For example, the communication interface can be a transceiver.

[0401] In the embodiments provided in the present application above, the method provided in the embodiment of the present application is introduced from the perspective of an electronic device (e.g., a mobile phone) as an execution subject. In order to implement the various functions in the method provided in the embodiment of the present application above, the electronic device may include a hardware structure and / or a software module to implement the above functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether a function of the above functions is executed in the form of a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.

[0402] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described above according to the embodiments of the present invention are generated. The aforementioned computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The aforementioned computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)). In the absence of conflict, the solutions of the above embodiments can be used in combination.

[0403] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0404] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each flow and / or box in the flow chart and / or block diagram, as well as the combination of the flow chart and / or box in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more flow charts and / or one or more boxes in the block diagram.

[0405] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0406] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0407] Obviously, those skilled in the art may make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include these modifications and variations.

Claims

1. A game task transfer method, characterized in that Applicable to a first device, the first device is currently in a game scenario, and the method includes: Receiving a trigger operation, the trigger operation is used to trigger a game task of the first device in the game scenario; Sending a task transfer request, the task transfer request is used to request other devices in the game scenario to execute the game task, and the other devices are other devices in the game scenario except the first device.

2. The method according to claim 1, characterized in that, Before sending the task transfer request, the method further includes: The first device determines that at least one of the following conditions is met: the game task is a preset task, the current running frame rate of the first device is lower than a first threshold, the current CPU usage rate of the first device is higher than a second threshold, and the current storage space occupancy rate of the first device is higher than a third threshold.

3. The method according to claim 1 or 2, characterized in that, The sending of the task transfer request includes: Sending the task transfer request to a host device, the host device includes a management device of the game scenario.

4. The method according to claim 1 or 2, characterized in that The sending of the task transfer request includes: Sending the task transfer request to a second device, the second device is a device elected by the first device from M devices according to at least one of device performance, game status, game character, and geographical location of the M devices, and the M devices are other devices in the game scenario except the first device, M is an integer and M≥2.

5. The method according to claim 4, characterized in that, The second device meets at least one of the following conditions: The second device is a device in the M devices with a current running frame rate higher than a fourth threshold; or, The second device is a device in the M devices with a current CPU usage rate lower than a fifth threshold; or, The second device is a device in the M devices with a current storage space occupancy rate lower than a sixth threshold; or, The second device is a device in the M devices that is currently in a spectator state; or, The second device is a device in the M devices that is currently in a dead state; or, The second device is a device corresponding to a specified game character in the M devices; or; The second device is a device in the M devices with a distance less than a first distance from the first device.

6. The method according to any one of claims 1-5, characterized in that, The task transfer request includes a task identifier of the game task.

7. The method according to any one of claims 1 to 6, characterized in that, The first device and the second device belong to the same team in the game scenario.

8. A game task transfer method, characterized in that, Applicable to a second device, the second device is currently in a game scenario, and the method includes: Receiving a task transfer request, the task transfer request is used to request the execution of a game task, and the game task is a task generated by a first device in the game scenario; Executing the game task.

9. The method according to claim 8, characterized in that The receiving of the task transfer request includes: Receiving the task transfer request from the first device or the host device, the host device includes a management device of the game scenario.

10. The method according to claim 8 or 9, characterized in that, Before executing the game task, the method further includes: the second device determines that at least one of the following conditions is met: The current running frame rate is higher than a seventh threshold; or, The current CPU usage rate is lower than an eighth threshold; or, The current storage space occupancy rate is lower than a ninth threshold; or, Currently in a spectator state; or, is currently dead; or, The corresponding game character is a designated game character.

11. The method according to claim 10, wherein The game scene also includes a third device, and the method further includes: When the second device determines that the condition is not met, it sends the task transfer request to the third device.

12. The method according to claim 11, wherein In addition to the first device and the second device, the game scene also includes P devices, where P is an integer and P≥2, and the third device is a device selected by the second device from the P devices based on at least one of the device performance, game status, game character, and geographic location of the P devices.

13. The method according to claim 12, characterized in that, The third device satisfies at least one of the following conditions: The third device is a device among the P devices whose current operating frame rate is higher than the tenth threshold; or, The third device is a device whose current CPU usage rate is lower than the eleventh threshold among the P devices; or, The third device is a device among the P devices whose current storage space occupancy rate is lower than the twelfth threshold; or, The third device is a device currently in a spectating state among the P devices; or, The third device is a device among the P devices that is currently in a dead state; or, The third device is a device corresponding to a designated game character among the P devices; or; The third device is a device among the P devices, the distance between the third device and the second device being smaller than a third distance.

14. The method according to any one of claims 8 - 13, characterized in that, The task transfer request includes the task identifier of the game task.

15. The method according to any one of claims 8-14, characterized in that, The first device and the second device belong to the same team in the game scene.

16. The method according to any one of claims 8-15, characterized in that, The method further comprises: The execution effect of the game task is rendered in the game screen.

17. A game task transfer method, characterized in that, Applicable to a host device, the host device includes a management device for a game scene, and the method includes: receiving a task transfer request sent by a first device, wherein the task transfer request is used to request execution of a game task, wherein the game task is generated by the first device; The task transfer request is sent to the second device, and both the first device and the second device are in the game scene.

18. The method according to claim 17, wherein The game scene further includes K devices in addition to the first device and the host device, where K is an integer and K≥2. Before sending the task transfer request to the second device, the method further includes: The second device is selected from the K devices according to at least one of device performance, game status, game character, and geographic location of the K devices.

19. The method according to claim 18, wherein The second device satisfies at least one of the following conditions: The second device is a device among the K devices whose current running frame rate is higher than the thirteenth threshold; or, The second device is a device among the K devices whose current CPU usage rate is lower than a fourteenth threshold; or, The second device is a device among the K devices whose current storage space occupancy rate is lower than the fifteenth threshold; or, The second device is a device currently in a spectating state among the K devices; or, The second device is a device among the K devices that is currently in a dead state; or, The second device is a device corresponding to a designated game character among the K devices; or; The second device is a device among the K devices whose distance from the first device is less than a fourth distance.

20. The method according to any one of claims 17-19, characterized in that, The task transfer request includes a task identifier of the game task.

21. The method according to any one of claims 17-20, characterized in that, The first device and the second device belong to the same team in the game scenario.

22. A game task transfer method, characterized in that, Applicable to a communication system, the communication system includes a first device and a second device, the first device and the second device are in the same game scenario, and the method includes: The first device receives a trigger operation, and the trigger operation is used to trigger a game task of the first device in the game scenario; The first device sends a task transfer request to the second device, and the task transfer request is used to request the execution of the game task; The second device executes the game task.

23. The method according to claim 22, characterized in that, The first device sending the task transfer request to the second device includes: The first device sends the task transfer request to a host device, and the host device includes a management device of the game scenario; The host device sends the task transfer request to the second device.

24. The method according to claim 22 or 23, characterized in that In addition to the first device in the game scenario, there are also Q devices, Q is an integer and Q>2, and the second device is a device elected from the Q devices according to at least one of the device performance, game state, game character, and geographical location of the Q devices.

25. The method according to claim 24, wherein The second device satisfies at least one of the following conditions: The second device is a device among the Q devices whose current running frame rate is higher than a sixteenth threshold; or, The second device is a device among the Q devices whose current CPU usage rate is lower than a seventeenth threshold; or, The second device is a device among the Q devices whose current storage space occupancy rate is lower than an eighteenth threshold; or, The second device is a device among the Q devices that is currently in a spectator state; or, The second device is a device among the Q devices that is currently in a dead state; or, The second device is a device corresponding to a specified game character among the Q devices; or; The second device is a device among the Q devices whose distance from the first device is less than a fifth distance.

26. The method according to any one of claims 22-25, characterized in that, Before the first device sends the task transfer request to the second device, the method further includes: The first device determines that it satisfies at least one of the following: the game task is a preset task, the current running frame rate of the first device is lower than a first threshold, the current CPU usage rate of the first device is higher than a second threshold, and the current storage space occupancy rate of the first device is higher than a third threshold.

27. An electronic device, characterized in that, Includes: A processor, a memory, and one or more programs; Wherein, the one or more programs are stored in the memory, and the one or more programs include instructions that, when executed by the processor, cause the electronic device to execute the method steps described in any one of claims 1 to 21.

28. A communication system, characterized in that, Includes: A first device and a second device; The first device is used to execute the method steps described in any one of claims 1-7; The second device is used to execute the method steps described in any one of claims 8-16.

29. The communication system according to claim 28, characterized in that, The communication system further includes: a host device, and the host device is configured to execute the method according to any one of claims 17-21.

30. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used for storing a computer program, and when the computer program runs on a computer, the computer is caused to execute the method according to any one of claims 1 to 26.

Citation Information

Patent Citations

  • Load balancing method and device and electronic equipment

    CN109840135A

  • Data processing method, user terminal, system and storage medium

    CN115814402A

  • Data processing method and related device

    CN118320411A

  • Communication game system and communication game processing method

    JP2019005533A

  • Game load management

    US20150072792A1