Account login method and device in virtual scene, electronic equipment, computer readable storage medium and computer program product

By adopting a master-slave server architecture in game live streaming, data from different virtual characters is isolated, solving the problems of viewers being unable to participate in the game and server crashes, improving system security and stability, and enhancing user engagement and game enjoyment.

CN121060084APending Publication Date: 2025-12-05SHENZHEN TENCENT NETWORK INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410715300.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-03
Publication Date
2025-12-05

AI Technical Summary

Technical Problem

In existing technologies, viewers cannot participate in the game during game live streams, which leads to server crashes, a lack of fun, and data interference between different virtual characters.

Method used

By using different servers to correspond to different virtual roles and adopting a master-slave server architecture, data between different virtual roles is isolated, reducing interference and improving system security and stability.

Benefits of technology

This allows viewers to participate in the game, increasing user engagement and game enjoyment, while also enhancing system security and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121060084A_ABST
    Figure CN121060084A_ABST
Patent Text Reader

Abstract

The invention provides an account login method and device in a virtual scene, electronic equipment, a computer readable storage medium and a computer program product. The method comprises the steps of determining a virtual role of a target account in a target virtual scene in response to a login request of the target account for the target virtual scene; wherein the target virtual scene at least comprises a first virtual character and a second virtual character, and the types of the first virtual character and the second virtual character are different; based on the virtual role of the target account in the target virtual scene, controlling the target account to log in a target server in the server system; the server system comprises a master server corresponding to a first virtual role and at least one slave server corresponding to a second virtual role. According to the method and the device, data between different virtual roles can be isolated through different servers corresponding to different virtual roles, so that interference between different virtual roles is reduced, and the security and the stability of a system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the computer technology field, and particularly relates to a login method and device of an account in a virtual scene, an electronic device, a computer readable storage medium and a computer program product. BACKGROUND

[0002] The related technology captures, encodes and transmits game pictures and real-time audio and video content of a host to a live broadcast platform in the form of a video stream through special software and equipment, so that viewers can watch and send a barrage to interact with the host in real time. When watching a game live broadcast, the viewers can only watch in the form of receiving a video stream and cannot participate in the game to interact, which lacks interest and has poor user experience. Even if the viewers can participate in the game, it will interfere with the host who is playing the game, and a large number of viewers entering the game can easily cause the game server to crash. SUMMARY

[0003] The embodiments of the present application provide a login method and device of an account in a virtual scene, an electronic device, a computer readable storage medium and a computer program product, which can correspond to different virtual characters through different servers, isolate data between different virtual characters, reduce interference between different virtual characters, and improve the security and stability of the system.

[0004] The technical scheme of the embodiments of the present application is as follows:

[0005] The embodiments of the present application provide a login method of an account in a virtual scene, which comprises the following steps.

[0006] In response to a login request of a target account to a target virtual scene, a virtual character of the target account in the target virtual scene is determined.

[0007] The target virtual scene comprises at least a first virtual character and a second virtual character, and the types of the first virtual character and the second virtual character are different.

[0008] Based on the virtual character of the target account in the target virtual scene, the target account is controlled to log in to a target server in a server system.

[0009] The server system comprises a master server corresponding to the first virtual character and at least one slave server corresponding to the second virtual character.

[0010] The embodiments of the present application provide a login device of an account in a virtual scene, which comprises the following steps.

[0011] A determination module is configured to determine a virtual character of a target account in a target virtual scene in response to a login request of the target account to the target virtual scene.

[0012] The target virtual scene includes at least a first virtual role and a second virtual role, and the first virtual role and the second virtual role are different in type.

[0013] The control module is configured to control the target account to log in to a target server in a server system based on the virtual role of the target account in the target virtual scene.

[0014] The server system includes a master server corresponding to the first virtual role and at least one slave server corresponding to the second virtual role.

[0015] Embodiments of the present application provide an electronic device, which includes:

[0016] A memory is configured to store computer executable instructions.

[0017] A processor is configured to execute the computer executable instructions stored in the memory to implement the account login method in a virtual scene provided by embodiments of the present application.

[0018] Embodiments of the present application provide a computer readable storage medium storing computer programs or computer executable instructions for being executed by a processor to implement the account login method in a virtual scene provided by embodiments of the present application.

[0019] Embodiments of the present application provide a computer program product including computer programs or computer executable instructions, which are executed by a processor to implement the account login method in a virtual scene provided by embodiments of the present application.

[0020] Embodiments of the present application have the following beneficial effects:

[0021] In response to a login request of a target account for a target virtual scene, a virtual role of the target account in the target virtual scene is determined, the target virtual scene includes at least a first virtual role and a second virtual role, the first virtual role and the second virtual role are different in type, the target account is controlled to log in to a target server in a server system based on the virtual role of the target account in the target virtual scene, the server system includes a master server corresponding to the first virtual role and at least one slave server corresponding to the second virtual role, through the one master and multiple slave server architecture, audience users other than game users can enter the game, and different virtual roles are isolated by different servers, interference between different virtual roles is reduced, and compared with the related art in which different roles share one server, the security and stability of the system can be improved. BRIEF DESCRIPTION OF DRAWINGS

[0022] Figure 1 is an architecture schematic diagram of an account login system in a virtual scene provided by an embodiment of the present application;

[0023] Figure 2 is a structural schematic diagram of an electronic device provided by an embodiment of the present application;

[0024] Figure 3 is a first flow schematic diagram of an account login method in a virtual scene provided by an embodiment of the present application;

[0025] Figure 4 is a second flow schematic diagram of an account login method in a virtual scene provided by an embodiment of the present application;

[0026] Figure 5 is a schematic diagram of an open world game scene provided by an embodiment of the present application;

[0027] Figure 6 is a first principle schematic diagram of an account login in a virtual scene provided by an embodiment of the present application;

[0028] Figure 7 is a principle schematic diagram of a first virtual role login provided by an embodiment of the present application;

[0029] Figure 8 is a principle schematic diagram of a second virtual role login provided by an embodiment of the present application;

[0030] Figure 9 is a second principle schematic diagram of an account login in a virtual scene provided by an embodiment of the present application.

[0031] It should be noted that the above-mentioned "first", "second" are only used to distinguish different schemes, and do not represent the degree of superiority or priority in the implementation process. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings, and the described embodiments should not be regarded as limiting the present application. All other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0033] In the following description, "some embodiments" are described, which describe a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subset of all possible embodiments, and can be combined with each other without conflict.

[0034] In the following description, the terms "first", "second", "third" are merely used to distinguish similar objects, and do not represent a specific order or sequence of the objects. Understandably, the "first", "second", "third" can be interchanged in a specific order or sequence as allowed, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein.

[0035] In the embodiments of the present application, the term "module" "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined target, and can be implemented entirely or partially by using software, hardware (such as a processing circuit or a memory) or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an overall module or unit that includes the functions of the module or unit.

[0036] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by one skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0037] The relevant data collection process in the embodiments of the present application should strictly comply with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and within the scope of authorization of laws and regulations and the personal information subject, carry out subsequent data use and processing.

[0038] Before the embodiments of the present application are further described in detail, the terms and terms involved in the embodiments of the present application are explained, and the terms and terms involved in the embodiments of the present application are applicable to the following explanations.

[0039] 1) Open World Game, also known as Sandbox Game or Free Exploration Game, refers to a game with a large scene, a large number of online players in a single scene, and a high degree of freedom for players. It is a type of game that allows players to freely explore and adventure in a vast, free, and non-linear virtual world. In an open world game, players can usually play in a large-scale, detailed environment, which may include cities, villages, natural landscapes, underground structures, and various geographical and environmental areas. The game usually provides rich tasks and activities, including main tasks and a large number of side tasks, as well as various interactive elements such as non-player characters (NPCs), environmental interactions, animals, vehicles, etc., allowing players to experience the game at their own pace and interest, thereby providing a game experience closer to real life.

[0040] 2) User-Generated Content (UGC) refers to content created, published, and shared by end users (i.e., ordinary people rather than professional creators), such as users can create games themselves and upload them to open-world games.

[0041] 3) InGame, in a game, one or more independent games are embedded. In open-world games, each player can construct their own game in the world, make detailed and specific game rules, and allow other players to participate or watch their own games. InGame is a good platform for UGC. For the platform, it can quickly enrich the platform content and attract more players because of the great freedom given to players. For players, they can commercialize by charging other players to participate in the game. Thus, it is relatively easy to form a virtuous cycle, for example, the game created by users themselves and uploaded to the open-world game is an InGame.

[0042] 4) Real, refers to a specific character object created in the game server, representing an independent character in the game world, with its own attributes, state, and behavior. For example, in a multiplayer online role-playing game, players can design their own characters according to their preferences and game goals and participate in the game world. The server creates corresponding real instances based on the content defined by the players.

[0043] 5) Ghost, relative to Real, is a copy of Real, created after receiving the instance creation message from the server. Ghost can synchronize the changes of Real in real time, so that Ghost and Real have exactly the same content.

[0044] 6) Gate Cluster, which can be referred to as Gate, is a cluster composed of multiple gateway devices, aiming to provide higher availability, scalability, and load balancing. In the game field, the gateway connecting the client and the server is usually a server, responsible for processing data packets, routing and forwarding operations. The gateway server acts as an intermediary between the client and the server, ensuring that game data can be safely and efficiently transmitted between the two. For example, a large-scale multiplayer online game may require a gate cluster to handle connections and data transmission from players around the world. When each player interacts with other players or game servers in the game, data needs to be routed and forwarded through the gate cluster.

[0045] For watching game live, related technologies only send game pictures to users in the form of video streams, and in the actual application process, there are still the following technical problems:

[0046] 1. Different virtual roles interfere with each other, and the server is prone to collapse.

[0047] 2. Users cannot participate in the game, and the game lacks interest.

[0048] 3. Users cannot rotate the viewing angle according to their preferences.

[0049] Embodiments of the present application provide a method and device for logging into an account in a virtual scene, electronic equipment, computer readable storage medium and computer program product, which can correspond to different virtual roles by different servers, isolate data between different virtual roles, reduce interference between different virtual roles, improve the security and stability of the system, and the following describes an exemplary application of a virtual scene account login system provided by embodiments of the present application.

[0050] Referring to Figure 1 , Figure 1 is an architecture diagram of a virtual scene account login system provided by embodiments of the present application, to implement support for an application, in the system 100, the terminal 400 is connected to the master server 200-1, the slave server 200-2 and the slave server 200-3 in the server system through the network 300, and the network 300 can be a wide area network or a local area network, or a combination of the two.

[0051] The terminal 400 is configured to send a login request of a target account to a target virtual scene to the network 300.

[0052] The graphical interface 410 is configured to display the target virtual scene.

[0053] The gateway server (gateway) in the server system is configured to determine a virtual role of the target account in the target virtual scene after receiving the login request, and control the target account to log in to the target server based on the virtual role of the target account in the target virtual scene.

[0054] The master server 200-1 is configured to log in the target account whose virtual role in the target virtual scene is a first virtual role.

[0055] The slave server (exemplarily given the slave server 200-2 and the slave server 200-3) is configured to log in the target account whose virtual role in the target virtual scene is a second virtual role.

[0056] In some embodiments, the master server 200-1, the slave server 200-2 and the slave server 200-3 can be independent physical servers, can be a server cluster or a distributed system composed of multiple physical servers, or can be a cloud server providing basic cloud computing services such as cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, content delivery network (CDN), and big data and artificial intelligence platform. The terminal and the server can be connected directly or indirectly through wired or wireless communication, which is not limited in the embodiments of the present application.

[0057] The electronic device for implementing the account login method in the virtual scene provided in the embodiments of the present application is described below.

[0058] Referring to Figure 2 , Figure 2 is a structural schematic diagram of an electronic device provided by the embodiments of the present application, Figure 2 The electronic device 500 shown in the figure includes at least one processor 510, a memory 550, at least one network interface 520 and a user interface 530. The various components in the electronic device 500 are coupled together through a bus system 540. It can be understood that the bus system 540 is used to realize the connection communication between the components. In addition to the data bus, the bus system 540 also includes a power bus, a control bus and a status signal bus. However, for the purpose of clear illustration, all kinds of buses are marked as the bus system 540 in Figure 2 .

[0059] The processor 510 can be an integrated circuit chip with signal processing capability, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc., wherein the general-purpose processor can be a microprocessor or any conventional processor.

[0060] The user interface 530 includes one or more output devices 531 that enable the presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 530 also includes one or more input devices 532, including user interface components that facilitate user input, such as a keyboard, a mouse, a microphone, a touch screen display, a camera, other input buttons and controls.

[0061] The memory 550 can be removable, non-removable or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 550 can optionally include one or more storage devices that are physically located away from the processor 510.

[0062] The memory 550 includes volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. The nonvolatile memory can be read only memory (ROM), and the volatile memory can be random access memory (RAM). The memory 550 described in the embodiments of the present application is intended to include any suitable type of memory.

[0063] In some embodiments, the memory 550 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, which are exemplarily explained below.

[0064] The operating system 551 includes system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks;

[0065] The network communication module 552 is used to communicate with other electronic devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 including Bluetooth, wireless compatibility authentication (WiFi), and universal serial bus (USB), and the like;

[0066] The presentation module 553 is used to enable the presentation of information via one or more output devices 531 associated with the user interface 530 (e.g., a display screen, a speaker, and the like) (e.g., a user interface for operating peripheral devices and displaying content and information);

[0067] The input processing module 554 is used to detect and interpret one or more user inputs or interactions from one or more input devices 532.

[0068] In some embodiments, the account login device in the virtual scene provided by the embodiments of the present application can be implemented in a software manner, Figure 2 An account login device in a virtual scene 555 stored in the memory 550 is shown, which can be software in the form of programs and plug-ins, including the following software modules: determination module 5551 and control module 5552, which are logical, and thus can be combined or further split according to the functions implemented. The functions of each module will be explained below.

[0069] In other embodiments, the account login device in the virtual scene provided in this application embodiment can be implemented in hardware. As an example, the account login device in the virtual scene provided in this application embodiment can be a processor in the form of a hardware decoding processor, which is programmed to execute the account login method in the virtual scene provided in this application embodiment. For example, the processor in the form of a hardware decoding processor can be one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0070] In some embodiments, the terminal or server can implement the login method in the virtual scene provided in this application embodiment by running various computer-executable instructions or computer programs. For example, computer-executable instructions can be microprogram-level commands, machine instructions, or software instructions. Computer programs can be native programs or software modules in the operating system; they can be native applications (APPs), i.e., programs that need to be installed in the operating system to run, such as game APPs; or they can be applets that can be embedded in any APP, i.e., programs that only need to be downloaded to the browser environment to run. In summary, the above-mentioned computer-executable instructions can be any form of instruction, and the above-mentioned computer programs can be any form of application, module, or plugin.

[0071] The account login method in a virtual scene provided in this application will be described in conjunction with exemplary applications and implementations of the electronic device provided in the embodiments of this application. As mentioned above, the electronic device implementing the account login method in a virtual scene in the embodiments of this application can be a terminal, a server, or a combination of both.

[0072] The account login method in the virtual scene of this application embodiment will be described. The server system corresponding to the account login method in the virtual scene of this application embodiment includes a master server, at least one slave server, and a gateway server. The aforementioned electronic device can be a gateway server. See [link to relevant documentation]. Figure 3 , Figure 3 This is a schematic diagram of the first process of the account login method in a virtual scenario provided in the embodiments of this application, which will be combined with Figure 3The steps 101 to 102 are shown for illustration.

[0073] In step 101, in response to a login request of a target account for a target virtual scene, a virtual role of the target account in the target virtual scene is determined.

[0074] The target virtual scene includes at least a first virtual role and a second virtual role, and the first virtual role and the second virtual role are of different types.

[0075] In some embodiments, the target virtual scene can be a game, a virtual classroom, a virtual cultural tourism resource, etc. When the target virtual scene is a game, the first virtual role can be a game user (e.g., an actor in the game), and the second virtual role can be a spectator user who watches the game user play the game. When the target virtual scene is a virtual classroom, the first virtual role can be a virtual teacher, and the second virtual role can be a virtual student who listens to the virtual teacher. When the target virtual scene is a virtual cultural tourism resource, the first virtual role can be a virtual scenic spot, cultural relic, museum, or cultural relic, etc., and the second virtual role can be a virtual tourist.

[0076] In some embodiments, the target virtual scene can be included in an open virtual scene, and the open virtual scene includes at least one target virtual scene. For example, when the target virtual scene is a game, the open virtual scene can be an open world game, and multiple InGame (i.e., target virtual scenes) can be embedded in the open world game. When the target virtual scene is a virtual classroom, the open virtual scene can be a virtual campus, and multiple virtual classrooms exist in the virtual campus. When the target virtual scene is a virtual cultural tourism resource, the open virtual scene can be a collection of virtual cultural tourism resources, which covers multiple virtual cultural tourism resources.

[0077] In some embodiments, when the target virtual scene is included in the open virtual scene, in step 102, the virtual role of the target account in the target virtual scene is determined based on the virtual role of the target account in the open virtual scene. Figure 3 Before the step 101 shown, the login request of the target account for the target virtual scene can be determined by the following technical solution: receiving a scene transfer request of the target account, the scene transfer request being used to request that a virtual role of the target account in an open virtual scene be transferred into a target virtual scene by the open virtual scene; and determining the scene transfer request as the login request for the target virtual scene.

[0078] As an example, the target account has a corresponding virtual role in the open virtual scene, and the user can control the virtual role by clicking or sliding the display interface of the client. When the user controls the virtual role to transfer into the target virtual scene, the client sends a scene transfer request to the gateway, and the scene transfer request is the login request of the target account for the target virtual scene.

[0079] In some embodiments, referring to Figure 4 , Figure 4 is a second flowchart of the account login method in a virtual scene provided by the embodiments of the present application, Figure 3 The step 101 shown can be implemented by the following steps 1011 to 1013, which are described in detail below.

[0080] In step 1011, the login request of the target account for the target virtual scene is parsed to obtain the role identifier associated with the target account.

[0081] In some embodiments, after receiving the login request of the target account for the target virtual scene, the login request is parsed to obtain the role identifier associated with the target account. The role identifier associated with the target account is generally defaulted to the second role identifier. When the target account meets the set conditions, the first role identifier is obtained, and the default second role identifier is changed to the first role identifier.

[0082] As an example, taking the target virtual scene as a game, the following is an example. Suppose that the game is set as a basketball match, the players are taken as the first virtual role, and the spectators are taken as the second virtual role. The role identifier associated with the account is defaulted to the spectator identifier. Before the start of the basketball match, the players register through their own accounts. The players who successfully register have the corresponding accounts obtaining the actor identifier. At this time, the role identifier associated with the account is changed to the actor identifier. The players who fail to register or do not register have the role identifier as the default spectator identifier.

[0083] In some embodiments, before parsing the login request of the target account for the target virtual scene to obtain the role identifier associated with the target account, the authority of the target account can also be identified by the following technical solution: parsing the login request of the target account for the target virtual scene to obtain the verification information of the target account; determining that the target account passes the verification according to the verification information.

[0084] As an example, when the account logs in, the legality of the account needs to be verified. The login request carries the verification information of the account, which can be used to verify the legality of the account, i.e., to authenticate the account. For example, the verification information can be a username and a password, etc. After receiving the login request, the gateway will communicate with the internal authentication server or database to check the verification information of the account. For example, the user logs in through a username and a password. The gateway first checks whether the provided username exists in the user database of the system. If the username does not exist, the login request will generally be rejected. If the username exists, the gateway will further verify whether the provided password is correct. If the password is correct, it is confirmed that the account corresponding to the username passes the verification.

[0085] In step 1012, if the role identifier is the first role identifier, it is determined that the virtual role of the target account in the target virtual scene is the first virtual role.

[0086] As an example, if the role identifier is the actor identifier, it is determined that the virtual role of the target account in the basketball game scene is a player.

[0087] In step 1013, if the role identifier is the second role identifier, it is determined that the virtual role of the target account in the target virtual scene is the second virtual role.

[0088] As an example, if the role identifier is the spectator identifier, it is determined that the virtual role of the target account in the basketball game scene is a spectator.

[0089] Through steps 1011 to 1013, the virtual role corresponding to the target account can be determined through the role identifier, so that the viewer also has the permission to enter the game, improving the user's participation and game interest, and also facilitating subsequent determination of the corresponding server according to different virtual roles, thereby improving the security and stability of the system.

[0090] Continuing to refer to Figure 3 , the step 101 is explained.

[0091] In step 102, based on the virtual role of the target account in the target virtual scene, the target account is controlled to log in to the target server in the server system.

[0092] The server system includes a master server corresponding to the first virtual role and at least one slave server corresponding to the second virtual role.

[0093] In some embodiments, if the virtual role of the target account in the target virtual scene is the first virtual role, the target account is controlled to log in to the master server in the server system; if the virtual role of the target account in the target virtual scene is the second virtual role, the target account is controlled to log in to the slave server in the server system.

[0094] In some embodiments, step 102 can also be implemented through the following technical solutions: the first virtual role and the second virtual role are respectively a virtual player role and a virtual spectator role; if the virtual role of the target account in the target virtual scene is the virtual player role, the target account is controlled to log in to the master server in the server system; if the virtual role of the target account in the target virtual scene is the virtual spectator role, the target account is controlled to log in to the slave server in the server system.

[0095] As an example, the target virtual scene can be a virtual scene corresponding to a game, or a virtual scene corresponding to an InGame game in an open-world game. For example, the game or the InGame game can be set as a basketball game, and the target virtual scene can be a basketball match scene corresponding to the basketball game, in which a first virtual role and a second virtual role are respectively a virtual player role (i.e., a virtual player role) and a virtual spectator role. If the virtual role of the target account in the basketball match scene is the virtual player role, the target account is controlled to log in to the master server in the server system; if the virtual role of the target account in the basketball match scene is the virtual spectator role, the target account is controlled to log in to the slave server in the server system.

[0096] It should be noted that the virtual role corresponding to each target account has a corresponding role image in the client. The following will be specifically explained that the role data of the virtual role in the target server is acquired; and the role data is sent to the client. The server sends the role data of the virtual role (the role data includes: role model data, role position and direction, animation state and playing parameter, equipment data, blood volume and state data, other role related data, which are not limited by the embodiments of the present application, and can be set according to actual conditions) to the gateway, the gateway forwards the role data to the client, and the client renders according to the role data to obtain the role image of the virtual role. The virtual images of the virtual roles in the same server are visible to each other, and the virtual images of the virtual roles in different servers are not visible.

[0097] In some embodiments, when the number of slave servers is multiple, the target account can be controlled to log in to at least one slave server in the server system by the following technical solutions: if the virtual role of the target account in the target virtual scene is the second virtual role, a target slave server is selected from the multiple slave servers; and the target account is controlled to log in to the target slave server.

[0098] As an example, the above-mentioned selecting a target slave server from multiple slave servers can be achieved by the following technical solutions: acquiring the number of logged-in accounts in each slave server; and selecting a slave server with a number less than a number threshold as the target slave server from the multiple slave servers.

[0099] The following will be specifically explained that, for example, the virtual role of the account in the basketball match scene is a spectator, the number of spectators that the server system can accommodate is related to the load capacity of the slave server, and the number of spectator accounts that the slave server can accept is limited. In order to accommodate more spectators to watch the basketball match, two or more slave servers can be set.

[0100] When the number of the slave servers is multiple, a target slave server needs to be selected from the multiple slave servers as the slave server for the account login. The target slave server can be randomly selected, can be distributed by a load balancing algorithm, specifically, can be distributed in a round-robin distribution order, and can be selected from the slave servers in which the number of the already logged-in accounts is less than a threshold number of accounts of each slave server according to the load capacity of each slave server, or can be selected as the slave server in which the number of the already logged-in accounts is the least. The embodiments of the present application do not limit this, and the selection can be made according to actual conditions. It should be noted that the number of the servers can be increased or decreased according to the number of the audience accounts. If the number of the already logged-in accounts in each slave server reaches the threshold number, the slave servers can be increased, and the number of the newly added slave servers can be set according to actual conditions. The slave servers can also be set with a deletion threshold according to actual conditions. When the number of the already logged-in accounts in a slave server reaches the deletion threshold, the slave server can be deleted, and the already logged-in accounts can be migrated to other slave servers.

[0101] Through the above scheme, more audience users can be accommodated into the game, and the data between different virtual roles corresponding to different servers is isolated, the interference between different virtual roles is reduced, and the security and stability of the system are improved.

[0102] In some embodiments, when the virtual role of the target account in the target virtual scene is a first virtual role, the method further includes: Figure 3 After step 102 in the method, the role instance of the first virtual role can also be created by the following technical scheme: receiving an instance creation message sent by the master server, the instance creation message being sent by the master server after creating the role instance of the first virtual role and being used to indicate an instance copy of the created role instance; and sending the instance creation message to each slave server respectively, so that each slave server creates an instance copy of the role instance based on the instance creation message.

[0103] As an example, when the virtual role of the target account in the target virtual scene is a first virtual role, and the target account logs in to the master server, the master server creates a role instance of the first virtual role, and after completing the creation of the role instance of the first virtual role, sends an instance creation message to the gateway, the instance creation message is used to indicate the creation of an instance copy of the role instance, and the instance creation message further includes a role ID (a unique identifier of the virtual role instance, used to distinguish different virtual roles), a role name (a readable name used to identify the role, facilitating user identification and operation), role attributes (detailed information describing the role, including the responsibilities, permissions, characteristics, health, defense, speed value, etc. of the role), and role status (actual data interacting with the role behavior and the environment, such as changes in the health of the role, or whether the role is defeated, whether the role is injured, etc.), and other data fields required for the creation of the instance copy of the role instance, which are not limited by the embodiments of the application, and can be set according to actual conditions. The gateway receives the instance creation message sent by the master server, and sends the instance creation message to each slave server respectively. Each slave server creates an instance copy of the role instance of the first virtual role according to the instance creation message and the data fields.

[0104] For example, after the account corresponding to player A in the basketball game scene logs in to the master server, the master server creates a role instance of player A, which includes: a role ID, which can be a combination of numbers or letters generated automatically by the system or a user-defined identifier according to business requirements, such as 123ABC; a role name, which can be user-defined text, for example, Zhang San; role attributes, which can be the running speed and physical value of player A; and role status, which can indicate whether a goal is scored or whether a collision with other players occurs, which is not limited by the embodiments of the application and can be set according to actual conditions. When sending the instance creation message to the gateway, the above data fields are included. Each slave server receives the instance creation message and can create an instance copy of the role instance of player A according to the instance creation message and the data fields.

[0105] Through the above technical solution, a copy of the role instance of the first virtual role in the master server can be created in the slave server, so that the spectator user logged in to the slave server can see the role image of the first virtual role in the client, and the user's sense of participation is improved.

[0106] In some embodiments, after sending the instance creation message to each slave server respectively, the following technical solution can be used to realize the switching of the virtual role: in response to a switching request of the target account switching the first virtual role to a second virtual role, the target account is switched from logging in to the master server to logging in to the slave server, so as to create a role instance of the second virtual role on the slave server.

[0107] As an example, the target account can initiate a switching request of switching the first virtual role to the second virtual role to the gateway through the client, the gateway controls the target account to be switched from being logged in to the master server to being logged in to the slave server in response to the switching request, and the slave server creates the role instance of the second virtual role corresponding to the target account after the target account is logged in to the slave server. When the target account is logged out of the master server, the master server deletes the role instance of the first virtual role of the target account, and simultaneously sends an instance deletion message to the gateway, the instance deletion message being used to indicate deletion of the instance copy of the role instance, the gateway receives the instance deletion message sent by the master server, and sends the instance deletion message to each slave server respectively, and each slave server deletes the instance copy of the role instance of the first virtual role according to the instance deletion message.

[0108] For example, after the account corresponding to player A in a basketball game scenario is logged in to the master server, the master server creates the role instance of player A. However, at this time, player A does not want to participate in the game before the game starts, and the user can apply to quit the game on the client. When the exit application is approved, the account of the user is switched from being logged in to the master server to being logged in to the slave server. It should be noted that the implementation of being logged in to the slave server is the same as that of controlling the target account to be logged in to the slave server in the server system described above, and will not be described herein again. At this time, the virtual role corresponding to the account is switched from player A to spectator A, and the slave server creates the role instance of the spectator role corresponding to the account. Compared with the player role, the role ID and the role name do not change, and the role attribute can be the walking speed, and the role state can indicate whether a collision with other spectators occurs, and the like. The embodiments of the present application are not limited thereto, and can be set according to actual conditions.

[0109] The master server sends an instance deletion message to the gateway, the gateway receives the instance deletion message sent by the master server, and sends the instance deletion message to each slave server respectively, and each slave server deletes the instance copy of the role instance of player A according to the instance deletion message.

[0110] Through the above technical solution, the switching of the virtual role can be realized, and the participation of the user and the interest of the game are further improved.

[0111] In some embodiments, when the virtual role of the target account in the target virtual scene is the second virtual role, and the target server is a target slave server in the at least one slave server, in Figure 3 After step 102 in the method, the creation of the role instance of the second virtual role can also be realized through the following technical solution: receiving an instance creation completion message sent by the target slave server, the instance creation completion message being used to indicate that the role instance of the second virtual role is created on the target slave server; and sending the instance creation completion message to the client of the target account.

[0112] As an example, when the virtual role of the target account in the target virtual scene is the second virtual role, the target slave server will create a role instance of the second virtual role when the target account logs in to the target slave server, and will send an instance creation completion message to the gateway after completing the creation of the role instance of the second virtual role. The instance creation completion message is used to indicate that the role instance of the second virtual role is created on the target slave server. The gateway sends the instance creation completion message to the client of the target account.

[0113] For example, after the account corresponding to the spectator B in the basketball game scene logs in to the target slave server, the target slave server will create a role instance of the spectator B, and will send an instance creation completion message to the gateway after completing the creation of the role instance of the spectator B. The gateway sends the instance creation completion message to the client of the account.

[0114] As an example, the above-mentioned sending of the instance creation completion message to the client of the target account can be implemented by the following technical solution: obtaining the client identifier corresponding to the role instance indicated by the instance creation completion message; and sending the instance creation completion message to the client of the target account based on the client identifier.

[0115] For example, when the number of slave servers is multiple, the role instances created on different slave servers are different, the instance creation completion message carries the client identifier corresponding to the role instance created by the slave server, and after receiving the instance creation completion message sent by the target slave server, the client identifier corresponding to the role instance indicated by the instance creation completion message is obtained, and then the instance creation completion message is sent to the client of the target account according to the client identifier.

[0116] Through the above technical solution, the virtual role of the spectator user can be created, the spectator user can immerse in the game process of the player, the participation of the user is improved, and the spectator user with the virtual role can control the virtual role to change the perspective of the virtual role at will, further improving the participation of the user and the interest of the game.

[0117] In some embodiments, after receiving the instance creation completion message sent by the slave server to which the target account logs in, the switching of the virtual role can also be implemented by the following technical solution: in response to the switching request of the target account switching the second virtual role to the first virtual role, controlling the target account to switch from logging in to the target slave server to logging in to the master server; receiving the instance creation message sent by the master server, the instance creation message being sent by the master server after creating the role instance of the first virtual role, and being used to indicate the instance copy of the created role instance; and sending the instance creation message to each slave server respectively, so that each slave server creates the instance copy of the role instance on the slave server based on the instance creation message.

[0118] As an example, the target account can initiate a switching request of switching the second virtual role to the first virtual role to the gateway through the client, the gateway controls the target account to switch from being logged in to the target slave server to being logged in to the master server in response to the switching request, when the target account is logged in to the master server, the master server creates a role instance of the first virtual role corresponding to the target account, and when the master server sends an instance creation message, each slave server receives the instance creation message, and creates an instance copy of the role instance of the first virtual role according to the instance creation message and the data field. When the target account logs out of the target slave server, the target slave server deletes the role instance of the second virtual role of the target account.

[0119] For example, after the account corresponding to the spectator B in the basketball game scenario is logged in to the target slave server, the target slave server creates a role instance of the spectator B, but at this time, if a player does not want to participate in the game before the game starts and successfully exits, the user can apply to join the game on the client, and when the joining application is approved, the account of the user is switched from being logged in to the target slave server to being logged in to the master server. At this time, the virtual role corresponding to the account is switched from the spectator B to the player B, the master server creates a role instance of the player corresponding to the account and an instance copy of the role instance of the player B on each slave server, and the specific implementation manner can refer to the player A, which will not be described herein again.

[0120] Through the technical solutions described above, the switching of the virtual role can be realized, and the participation of the user and the interest of the game are further improved.

[0121] In some embodiments, the instance copy of the role instance can also be updated through the following technical solutions: receiving an instance update message sent by the master server, the instance update message being sent by the master server after detecting that the role instance of the first virtual role exists update, and being used to indicate the instance copy of the role instance to be updated; and sending the instance update message to each slave server respectively, so that each slave server updates the instance copy of the role instance based on the instance update message.

[0122] As an example, when the master server creates the role instance of the first virtual role, the master server detects whether the role instance of the first virtual role exists update in real time, if the master server detects that the role instance of the first virtual role exists update, the master server sends an instance update message to the gateway, the instance update message carries the updated data, which can be data in the role attribute or the role state, the instance update message is used to indicate the instance copy of the role instance to be updated, and the gateway sends the instance update message to each slave server respectively after receiving the instance update message. Each slave server updates the instance copy of the role instance of the first virtual role according to the instance update message and the updated data.

[0123] For example, in a basketball game scenario, the virtual character corresponding to the account of the user is player C, and the user can operate player C to move on the client side. For example, the user operates player C to move to the right, inputs a right-moving instruction on the client side, the client side analyzes the input moving instruction and generates corresponding moving instruction data, including moving direction, speed, target position, etc. The client side sends the moving instruction data to the gateway, and the gateway forwards the moving instruction data to the main server. After the main server receives the moving instruction data, it starts processing and verification. The main server verifies the role state and the feasibility of the moving instruction. If the moving instruction data passes the verification, the server will update the position of player C according to the moving instruction data. When the position of player C is updated, the main server will send an instance update message to the gateway, and the gateway will send the instance update message to each slave server. According to the instance update message and the updated data of the position of player C, each slave server synchronously updates the instance copy of the role instance of player C.

[0124] Through the above technical solution, the instance copy of the role instance in the slave server can be synchronized with the role instance in the main server, the delay of the audience user's watching can be reduced, the user's experience can be improved, and the user's participation can be further improved.

[0125] In some embodiments, the second virtual characters in different slave servers can also be made visible to each other through the following technical solution: the number of slave servers is multiple, the multiple slave servers include a first slave server and a second slave server, the target account logs in to the first slave server, the server system further includes a view server, the view server is connected with each slave server, and the logged-in accounts in different slave servers are different; in response to a data acquisition request of the target account for a second virtual character corresponding to an account logged in to the second slave server, forwarding the data acquisition request to the view server; receiving the role data sent by the view server, the role data being obtained by the view server from the second slave server; and sending the role data to the client of the target account.

[0126] As an example, when the number of slave servers in the server system is multiple, and the server system further comprises a view server connected with each slave server, when the target account logs in the first slave server, in the client corresponding to the target account, the user can only see the rendered character image of the other second virtual character in the first slave server. If the user wants to see the second virtual character in the other slave server (for example, the second slave server), the client can send a data acquisition request for the second virtual character corresponding to the account logged in the second slave server to the gateway, the gateway forwards the data acquisition request to the view server, the view server calculates the view of the second virtual character of the target account, obtains the character data of the second virtual character in the view of the second virtual character of the target account from the second slave server, and sends the obtained character data to the gateway, and the gateway sends the character data to the client of the target account. The client renders according to the character data, and after rendering, the virtual character is displayed on the display interface of the client.

[0127] It should be noted that the second slave server represents any one slave server different from the first slave server, and in the embodiment of the present application, the first slave server and the second slave server represent two different slave servers in two or more slave servers, rather than only two slave servers.

[0128] Through the above technical solution, the audience users in different slave servers can be visible to each other, the authenticity of the game is improved, and the participation of the user and the interest of the game are further improved.

[0129] The embodiment of the present application constructs a one master and multiple slave server architecture, isolates the data between different virtual characters by corresponding different virtual characters in different servers, reduces the interference between different virtual characters, improves the security and stability of the system, allocates game users to the master server and audience users to the slave server, and connects multiple slave servers through the branch technology, improves the number of audience users accommodated by the game system, changes the viewing mode of the game or the embedded game, the audience users can directly watch the game process of the game users in the game, and can move and change the viewing angle at will, improves the participation of the user and the interest of the game, and can switch the role identity, the audience users and the game users can exchange identities under the condition of complying with the game rules, further improves the participation of the user and the interest of the game, and the view server can break the isolation between the slave servers, so that the audience users in different slave servers can be visible to each other.

[0130] In the following, an example application of the embodiment of the present application in an actual application scenario will be described.

[0131] The embodiment of the application can provide a Master-MultiSlave-based technical architecture scheme for an InGame type game, can support players to participate in the InGame, and can enable a large number of audiences to watch the InGame. A typical scenario is as follows: the InGame is a basketball game, players can freely register to participate in the basketball game, or can watch other people playing in the audience stand; the InGame is a concert, players can freely register to sing, or can watch other people singing in the audience stand.

[0132] The embodiment of the application abstractly models the scenario (such as a concert, a sports game, a theater, etc.) in real life with performers (first virtual roles) and viewers (second virtual roles) as follows:

[0133] Performers: all performers.

[0134] Viewers: all viewers.

[0135] Performance area (target virtual scene): corresponding to a normal area. The performance area refers to a concert, a sports game, a theater, etc. Performers perform on the stage, while viewers watch in the audience area. Generally, the number of performers is within 50, while the number of viewers can reach tens of thousands. The performers are the focus of the whole scene, and all the viewers need to clearly see the performance of the performers.

[0136] The difference between the two roles can be summarized in the following table:

[0137]

[0138] For example, as in real life, in an open world game scenario, most areas are normal areas, and some performance areas are allowed. These performance areas can be designed by using the InGame scheme, that is, an independent game embedded in the open world game. See Figure 5 , Figure 5 is a schematic diagram of an open world game scenario provided by the embodiment of the application. As shown in Figure 5 , areas 1-14 jointly constitute part of the scene of the open world game, areas 1, 3, 4, 6, 7, 13, and 14 are normal areas, and areas 2, 5, 8-12 are performance areas (among them, area 9 is a performer area, the master server is responsible for the simulation of the performers, and areas 2, 5, 8, 10-12 are audience areas, the slave server is responsible for the simulation of the audience).

[0139] Corresponding to the game implementation technology, because the carrying capacity of a single game server is in the order of several hundred people, in order to carry tens of thousands of audiences and allow the audiences to see all the performers and interact with the performers, a set of efficient server system architecture is needed.

[0140] Referring to Figure 6 , Figure 6 is a first principle schematic diagram of account login in a virtual scene provided by an embodiment of the present application. As shown in Figure 6 , the core of the server system architecture is a Master-MultiSlave architecture, that is, one Master DS and multiple Slave DSs (one master server and multiple slave servers).

[0141] The server refers to a dedicated game server (DS). The master server 604 (Master DS) is only responsible for the simulation of actors (first virtual roles), that is, the role instance 608 of the first virtual role, and all actors log in to the Master DS. The slave server (Slave DS), including the slave server 1 605, the slave server 2 606,..., and the slave server n 607, is responsible for the simulation of audiences (second virtual roles), that is, the role instance 609 of the second virtual role in the slave server 1, the role instance 6010 of the second virtual role in the slave server 2, and the role instance 6011 of the second virtual role in the slave server n, and the audiences log in to the Slave DS. Because the number of audiences is large, there are multiple Slave DSs, and the audiences are evenly distributed to multiple Slave DSs by using the gateway cluster 603 through the branching technology. In order to realize that the audiences can see all the actors, the Ghost (copy 6012 of the role instance of the first virtual role) of the actor on the Master DS is created on all Slave DSs and kept synchronized.

[0142] Actor Client (actor client 601): logs in to the Master DS.

[0143] Audience Client (audience client 602): selects a Slave DS to log in according to a load balancing algorithm. Because all actors are replicated on the Slave DS, the audiences can see all the actors, but because the Slave DS uses the branching technology, the audiences can only see the audiences on the Slave DS where they are currently located and cannot see the audiences on other Slave DSs.

[0144] Advantages of the architecture:

[0145] 1) The number of actors is small, and one Master DS is used to independently bear the actors, so that the real simulation of the actors is realized.

[0146] 2) The number of audience is large, and a single server cannot bear it. The audience is evenly distributed to multiple Slave DSs. Slave DSs have the ability of parallel expansion, and can be increased or decreased according to the actual number of people. Because the audience does not need fine simulation, Slave DSs can be optimized to bear more audience.

[0147] 3) The simulation of actors is the focus, and all audiences need to see the real simulation of actors. Therefore, the Ghost of the actor is created on all Slave DSs and kept synchronized. Because the number of actors is not large, the overhead is small.

[0148] 4) Because the number of audience is large enough, the audience and the audience do not need to be completely visible. Therefore, partial visibility is achieved through the technology of splitting.

[0149] Key processes:

[0150] It should be noted that the server system architecture provided by the embodiments of the application has completed the connection of Master DS to all Slave DSs in the initialization stage.

[0151] The key processes of the server system architecture provided by the embodiments of the application are described in detail below

[0152] I. Process 1: Actor directly logs in.

[0153] Referring to Figure 7 , Figure 7 is a schematic diagram of the principle of the first virtual role login provided by the embodiments of the application.

[0154] Before the actor directly logs in, initialization is performed, and the connection between the master server and the multiple slave servers is established through the gateway.

[0155] a) The Client logs in through the Gate and completes authentication.

[0156] b) The Client connects to the Master DS through the Gate.

[0157] c) The Ghost of the actor is created on all Slave DSs.

[0158] Specifically, if the virtual role corresponding to the user is an actor, the user inputs the account and password on the client, and after passing the gateway authentication, the account logs in to the master server, and the Real of the actor is created on the Master DS. The Master DS sends the data of the Real and the instruction of creating the Ghost of the actor to all Slave DSs through the Gate, and all Slave DSs create the Ghost of the actor after receiving the instruction.

[0159] II. Process 2: the audience directly logs in Slave DS.

[0160] Referring to Figure 8 , Figure 8 is a principle diagram of the second virtual role login provided by the embodiment of the present application.

[0161] a) The Client logs in through the Gate and completes authentication.

[0162] b) According to the load conditions of all Slave DSs, a Slave DS is selected for connection.

[0163] Specifically, if the virtual role corresponding to the user is an audience, the user inputs the account and password at the client, and after passing the authentication of the Gate, the Gate uses the branching technology to select a Slave DS for logging in the account according to the load conditions of all Slave DSs.

[0164] III. Process 3: the actors on the Master DS are synchronized to all Slave DSs.

[0165] The Master DS iterates all actors at each game frame, and multicasts the changed actor data to all Slave DSs to realize the synchronization of Ghost to Real.

[0166] IV. Process 4: the user enters the performance area from the normal area.

[0167] a) According to the identity of the user, it is determined whether the user is an actor or an audience (the identity of the user has been determined before entering the performance area, for example, in a basketball game, the user needs to register in advance to become a player, that is, an actor, and the user who does not register is an audience).

[0168] b) If the user is an actor, the user is transferred or migrated from the normal area to the Master DS, and a Ghost is created on all Slave DSs.

[0169] c) If the user is an audience, the user is transferred or migrated from the normal area to the selected Slave DS.

[0170] The following will be specifically described by examples.

[0171] For example, in the open world game scene of Figure 5 , the performance area is a basketball game venue, the actor area is a court, the audience area is a venue audience seat, user A successfully registers, and user B fails to register.

[0172] When user A enters the performance area from the normal area, the client logs in the Gate, completes authentication, judges that user A is a player (actor), and then the client connects to the Master DS, i.e., user A is transferred or migrated from the normal area to the Master DS, and a Ghost of user A is created on all Slave DSs. The Master DS traverses all actors at each game frame, and all changes of user A in the actor area are broadcast to all Slave DSs. That is, all actions of user A in the court are synchronized to the Ghost in all Slave DSs.

[0173] When user B enters the performance area from the normal area, the client logs in the Gate, completes authentication, and according to the load condition of the server, the client selects a randomly selected Slave DS to connect to, i.e., user B is transferred or migrated from the normal area to the selected Slave DS. Since the Ghost of user A is created on the Slave DS, user B can see all changes of user A in the audience area. That is, all actions of user A in the court are visible to user B.

[0174] Embodiments of the present application can also collect all audience views through a newly added view suit, so that the views of the actors and the audience are completely visible, but the core is still the Master-MultiSlave architecture capability. See Figure 9 , Figure 9 is a second principle diagram of account login in a virtual scene provided by an embodiment of the present application. As shown in Figure 9 , Figure 9 is a third principle diagram of account login in a virtual scene provided by an embodiment of the present application. As shown in Figure 6On the basis, the view server 901 is added. The view server is connected with the slave server 1 1605, the slave server 2 2606, …, and the slave server n 607 respectively, aggregates the role data of the role instance of the second virtual role in each slave server, and creates the data object of the second virtual role in the slave server 1 according to the role data of the role instance of the second virtual role 609 in the slave server 1, the data object of the second virtual role in the slave server 2 according to the role data of the role instance of the second virtual role 6010 in the slave server 2, and the data object of the second virtual role in the slave server n according to the role data of the role instance of the second virtual role 6011 in the slave server n. The view server sends the role data to the audience client 602 through the gateway cluster 603, and the audience client renders according to the received role data to present the role image. If the actor also wants to see the audience, the view server can also send the role data to the actor client 601 through the gateway cluster, and the actor client renders according to the received role data to present the role image. The view server does not need to calculate the instances of all the audiences, but only needs to aggregate the position data and related attribute information of other audiences in the audience's view and other role data, and the client renders the role image according to the obtained role data, so that the audiences can see each other through the view server.

[0175] The following continues to illustrate an exemplary structure of the implementation of the account login device 555 in the virtual scene provided by the embodiments of the application as a software module. In some embodiments, as shown in FIG. 5, the software module stored in the account login device 555 in the virtual scene of the memory 550 can include: Figure 2

[0176] The determining module 5551 is configured to determine a virtual role of a target account in a target virtual scene in response to a login request of the target account for the target virtual scene. The target virtual scene includes at least a first virtual role and a second virtual role, and the types of the first virtual role and the second virtual role are different.

[0177] The control module 5552 is configured to control the target account to log in to a target server in a server system based on the virtual role of the target account in the target virtual scene. The server system includes a master server corresponding to the first virtual role and at least one slave server corresponding to the second virtual role.

[0178] In some embodiments, the determining module 5551 is further configured to receive a scene entry request of the target account, the scene entry request being used to request that the virtual role of the target account in the open virtual scene enters the target virtual scene from the open virtual scene, and determine the scene entry request as the login request for the target virtual scene.​

[0179] In some embodiments, the determining module 5551 is further configured to parse a login request of a target account for a target virtual scene to obtain a role identifier associated with the target account; if the role identifier is a first role identifier, determine that a virtual role of the target account in the target virtual scene is the first virtual role; if the role identifier is a second role identifier, determine that the virtual role of the target account in the target virtual scene is the second virtual role.

[0180] In some embodiments, the control module 5552 is further configured to, if the virtual role of the target account in the target virtual scene is the second virtual role, select a target slave server from the plurality of slave servers; and control the target account to log in to the target slave server.

[0181] In some embodiments, the control module 5552 is further configured to obtain a number of accounts logged in each of the slave servers; and select a slave server with a number less than the number threshold as a target slave server from the plurality of slave servers.

[0182] In some embodiments, the apparatus further comprises:

[0183] The creating module is configured to receive an instance creation message sent by the master server, the instance creation message being sent by the master server after creating a role instance of the first virtual role, and used to instruct to create an instance copy of the role instance; and send the instance creation message to each of the slave servers respectively, so that each of the slave servers creates an instance copy of the role instance based on the instance creation message.

[0184] In some embodiments, the apparatus further comprises:

[0185] The switching module is configured to, in response to a switching request of the target account switching the first virtual role to the second virtual role, control the target account to switch from logging in to the master server to logging in to the slave server, so as to create a role instance of the second virtual role on the slave server.

[0186] In some embodiments, the creating module is further configured to receive an instance creation completion message sent by the target slave server, the instance creation completion message being used to instruct that the creation of the role instance of the second virtual role on the target slave server is completed; and send the instance creation completion message to a client of the target account.

[0187] In some embodiments, the creating module is further configured to: obtain a client identifier corresponding to the role instance indicated by the instance creation completion message; and send the instance creation completion message to a client of the target account based on the client identifier.

[0188] In some embodiments, the switching module is further configured to: in response to a switching request of the target account to switch the second virtual role to the first virtual role, control the target account to switch from being logged in to the target slave server to being logged in to the master server; receive an instance creation message sent by the master server, the instance creation message being sent by the master server after creating the role instance of the first virtual role, and being used to indicate an instance copy of the role instance; and send the instance creation message to each of the slave servers, so that each of the slave servers creates an instance copy of the role instance based on the instance creation message.

[0189] In some embodiments, the apparatus further includes:

[0190] The updating module is configured to: receive an instance update message sent by the master server, the instance update message being sent by the master server after detecting that the role instance of the first virtual role has an update, and being used to indicate an update of the instance copy of the role instance; and send the instance update message to each of the slave servers, so that each of the slave servers updates the instance copy of the role instance based on the instance update message.

[0191] In some embodiments, the apparatus further includes:

[0192] The view module is configured to: in response to a data obtaining request of the target account for a second virtual role corresponding to an account logged in to the second slave server, forward the data obtaining request to the view server; receive role data sent by the view server, the role data being obtained by the view server from the second slave server; and send the role data to a client of the target account.

[0193] In some embodiments, the control module 5552 is further configured to: if the virtual role of the target account in the target virtual scene is the virtual player role, control the target account to log in to the master server in the server system; and if the virtual role of the target account in the target virtual scene is the virtual spectator role, control the target account to log in to the slave server in the server system.

[0194] The embodiment of the present application provides a computer program product, which comprises a computer program or computer executable instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer executable instructions from the computer readable storage medium, and the processor executes the computer executable instructions, so that the electronic device executes the account login method in the virtual scene provided by the embodiment of the present application.

[0195] The embodiment of the present application provides a computer readable storage medium, which stores computer executable instructions or computer programs. When the computer executable instructions or computer programs are executed by the processor, the processor executes the account login method in the virtual scene provided by the embodiment of the present application, for example, the account login method in the virtual scene shown in the figure. Figures 3 to 4 The embodiment of the present application provides a computer readable storage medium, which stores computer executable instructions or computer programs. When the computer executable instructions or computer programs are executed by the processor, the processor executes the account login method in the virtual scene provided by the embodiment of the present application, for example, the account login method in the virtual scene shown in the figure.

[0196] In some embodiments, the computer readable storage medium can be RAM, ROM, flash memory, magnetic surface memory, optical disc, or CD-ROM memory, etc. It can also be various devices including one or any combination of the above storage.

[0197] In some embodiments, the computer executable instructions can be in the form of programs, software, software modules, scripts or codes, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and can be deployed in any form, including being deployed as independent programs or being deployed as modules, components, subroutines or other units suitable for use in a computing environment.

[0198] As an example, the computer executable instructions can but not necessarily correspond to files in a file system, can be stored in a part of a file storing other programs or data, for example, stored in one or more scripts in a Hyper Text Markup Language (HTML) document, stored in a single file dedicated to the program in question, or stored in multiple cooperative files (for example, files storing one or more modules, subroutines or code parts).

[0199] As an example, the computer executable instructions can be deployed to execute on one electronic device, or on multiple electronic devices located in one place, or on multiple electronic devices distributed in multiple places and interconnected through a communication network.

[0200] In summary, the master-slave server architecture constructed by the embodiments of the present application can correspond different virtual roles by different servers, isolate data between different virtual roles, reduce interference between different virtual roles, improve the security and stability of the system, and also improve the number of audience users accommodated by the game system, so that the viewing mode of the game or the embedded game is changed, the audience users can directly watch the game process of the game users in the game, and can move and change the viewing angle at will, improving the user's participation and the interest of the game, and the audience users and the game users can exchange identities under the condition of complying with the game rules, further improving the user's participation and the interest of the game, and the isolation between the slave servers can be broken through the field of view server, so that the audience users in different slave servers can also be visible to each other, through actual test, a single virtual scene can accommodate 50 first virtual roles and 10,000 second virtual roles, and the server frame rate is stable at 15-20, improving the use experience of InGame and the experience of game live broadcast.

[0201] The above merely describes the embodiments of the present application, but is not used to limit the protection scope of the present application. Any modification, equivalent replacement and improvement made within the spirit and scope of the present application shall be included in the protection scope of the present application.

Claims

1. A method for logging into an account in a virtual scene, characterized by, The method comprises: in response to a login request of a target account for a target virtual scene, determining a virtual role of the target account in the target virtual scene; wherein the target virtual scene comprises at least a first virtual role and a second virtual role, the first virtual role and the second virtual role being different in type; based on the virtual role of the target account in the target virtual scene, controlling the target account to log in to a target server in a server system; wherein the server system comprises a master server corresponding to the first virtual role and at least one slave server corresponding to the second virtual role.

2. The method of claim 1, wherein, The target virtual scene is included in an open virtual scene, and the open virtual scene comprises at least one target virtual scene; Before the step of determining the virtual role of the target account in the target virtual scene in response to the login request of the target account for the target virtual scene, the method further comprises: receiving a scene entry request of the target account, the scene entry request being used to request that a virtual role of the target account in the open virtual scene be transferred from the open virtual scene to the target virtual scene; determining the scene entry request as the login request for the target virtual scene.

3. The method of claim 1, wherein, The step of determining the virtual role of the target account in the target virtual scene in response to the login request of the target account for the target virtual scene comprises: parsing the login request of the target account for the target virtual scene to obtain a role identifier associated with the target account; if the role identifier is a first role identifier, determining that the virtual role of the target account in the target virtual scene is the first virtual role; if the role identifier is a second role identifier, determining that the virtual role of the target account in the target virtual scene is the second virtual role.

4. The method of claim 1, wherein, The number of the slave servers is a plurality, and the method further comprises: if the virtual role of the target account in the target virtual scene is the second virtual role, selecting a target slave server from the plurality of slave servers; controlling the target account to log in to the target slave server.

5. The method of claim 4, wherein, The step of selecting a target slave server from the plurality of slave servers comprises: obtaining the number of accounts logged in each of the slave servers; selecting a slave server with a number less than the number threshold as a target slave server from the plurality of slave servers.

6. The method of claim 1, wherein, If the virtual role of the target account in the target virtual scene is the first virtual role, and the target server is the master server, after the step of controlling the target account to log in to the target server in the server system, the method further comprises: receiving an instance creation message sent by the master server, the instance creation message being sent by the master server after creating a role instance of the first virtual role, and being used to indicate that an instance copy of the role instance is created; sending the instance creation message to each of the slave servers respectively, so that each of the slave servers creates an instance copy of the role instance on the slave server based on the instance creation message.

7. The method of claim 6, wherein, After the instance creation message is sent to each of the slave servers respectively, the method further comprises: In response to a switching request of the target account switching the second virtual role to the first virtual role, the target account is controlled to switch from being logged in to the target slave server to being logged in to the master server.

8. The method of claim 1, wherein, If the virtual role of the target account in the target virtual scene is the second virtual role, and the target server is a target slave server in the at least one slave server, after the target account is controlled to log in to the target server in the server system, the method further comprises: An instance creation completion message sent by the target slave server is received, the instance creation completion message being used to indicate that the role instance of the second virtual role is created on the target slave server; The instance creation completion message is sent to a client of the target account.

9. The method of claim 8, wherein, The number of the slave servers is a plurality, and the role instances created on different slave servers are different; The instance creation completion message is sent to the client of the target account, comprising: A client identifier corresponding to the role instance indicated by the instance creation completion message is acquired; Based on the client identifier, the instance creation completion message is sent to the client of the target account.

10. The method of claim 8, wherein, After the instance creation completion message sent by the target slave server is received, the method further comprises: In response to a switching request of the target account switching the second virtual role to the first virtual role, the target account is controlled to switch from being logged in to the target slave server to being logged in to the master server; An instance creation message sent by the master server is received, the instance creation message being sent by the master server after creating the role instance of the first virtual role, and being used to indicate an instance copy of the role instance; The instance creation message is sent to each of the slave servers respectively, so that each of the slave servers creates an instance copy of the role instance on the slave server based on the instance creation message.

11. The method according to claim 6 or 10, characterized in that, The method further comprises: An instance update message sent by the master server is received, the instance update message being sent by the master server after detecting that the role instance of the first virtual role exists an update, and being used to indicate an instance copy of the role instance; The instance update message is sent to each of the slave servers respectively, so that each of the slave servers updates the instance copy of the role instance on the slave server based on the instance update message.

12. The method of claim 1, wherein, The number of the slave servers is a plurality, and the plurality of slave servers comprises a first slave server and a second slave server, the target account is logged in to the first slave server, the server system further comprises a view server, the view server is connected with each of the slave servers, logged-in accounts in different slave servers are different, and the method further comprises: In response to a data acquisition request of the target account for a second virtual role corresponding to an account logged in to the second slave server, the data acquisition request is forwarded to the view server; In response to a data acquisition request of the target account for a second virtual role corresponding to an account logged in to the second slave server, the data acquisition request is forwarded to the view server; receive role data sent by the field-of-view server, the role data being obtained by the field-of-view server from the second slave server; send the role data to a client of the target account.

13. The method of claim 1, wherein, The first virtual role and the second virtual role are respectively a virtual player role and a virtual audience role. The method comprises: if the virtual role of the target account in the target virtual scene is the virtual player role, controlling the target account to log in to the master server in the server system; if the virtual role of the target account in the target virtual scene is the virtual audience role, controlling the target account to log in to the slave server in the server system.

14. An account login apparatus in a virtual scene, characterized by comprising: The apparatus comprises: a determination module configured to determine a virtual role of a target account in a target virtual scene in response to a login request of the target account to the target virtual scene, wherein the target virtual scene comprises at least a first virtual role and a second virtual role, and the first virtual role and the second virtual role are of different types; a control module configured to control the target account to log in to a target server in a server system based on the virtual role of the target account in the target virtual scene, wherein the server system comprises a master server corresponding to the first virtual role and at least one slave server corresponding to the second virtual role.

15. An electronic device, comprising: The electronic device comprises: a memory configured to store computer executable instructions; a processor configured to execute the computer executable instructions stored in the memory to implement the account login method in a virtual scene according to any one of claims 1 to 13.

16. A computer-readable storage medium storing computer-executable instructions or a computer program, wherein the computer-executable instructions or the computer program comprise the steps of: The computer executable instructions or the computer program are executed by the processor to implement the account login method in a virtual scene according to any one of claims 1 to 13.

17. A computer program product comprising computer-executable instructions or a computer program, characterized in that, The computer executable instructions or the computer program are executed by the processor to implement the account login method in a virtual scene according to any one of claims 1 to 13.