CN108650217B - Synchronous method, device, storage medium and the electronic device of action state - Google Patents
Synchronous method, device, storage medium and the electronic device of action state Download PDFInfo
- Publication number
- CN108650217B CN108650217B CN201810236885.3A CN201810236885A CN108650217B CN 108650217 B CN108650217 B CN 108650217B CN 201810236885 A CN201810236885 A CN 201810236885A CN 108650217 B CN108650217 B CN 108650217B
- Authority
- CN
- China
- Prior art keywords
- state
- client
- synchronization parameter
- action
- action state
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/131—Protocols for games, networked simulations or virtual reality
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
Abstract
The invention discloses a kind of synchronous method of action state, device, storage medium and electronic devices.Wherein, this method comprises: detecting that the action state of the first virtual role by the control of the first client is converted to the second state by first state in the first client;The corresponding object synchronization parameter of the second state is obtained from action state and synchronization parameter with corresponding relationship, wherein action state and synchronization parameter with corresponding relationship are had recorded in the first client;The first synchronizing information for carrying object synchronization parameter is sent to server, wherein the first synchronizing information is used to indicate server, by the action state of the first virtual role on server, is synchronized to the second state for having corresponding relationship with object synchronization parameter.The present invention solves the lower technical problem of synchronous efficiency of action state in the related technology.
Description
Technical field
The present invention relates to computer fields, are situated between in particular to a kind of synchronous method of action state, device, storage
Matter and electronic device.
Background technique
Under the application scenarios that some servers are interacted with client, need to carry out server strong authentication Network Synchronization to protect
The consistency of client and server action is demonstrate,proved, server strong authentication Network Synchronization refers to that client and server is successively held respectively
The identical code logic of row, obtains identical calculated result, reaches synchronous scheme with this.Server strong authentication net is carried out at present
The synchronous mode of network is the synchronization of action state to be carried out using traditional action state machine, or do not use action state completely
Machine directly carries out movement synchronization.When carrying out acting synchronous using traditional action state machine, due to next movement shape of entrance
State is highly dependent on current state and switch condition, it is easy to which appearance acts nonsynchronous situation, while in the feelings of disconnection reconnecting
Also the synchronization of recovery action state is difficult under condition.And the synchronous scheme of movement is directly carried out without using action state machine completely, again
Can not efficient technique of rainwater utilization personnel design movement conversion and movement mixing.
For above-mentioned problem, currently no effective solution has been proposed.
Summary of the invention
The embodiment of the invention provides a kind of synchronous method of action state, device, storage medium and electronic devices, so that
The lower technical problem of few synchronous efficiency for solving action state in the related technology.
According to an aspect of an embodiment of the present invention, a kind of synchronous method of action state is provided, comprising: in the first visitor
Detect that the action state of the destination virtual role by first client control is converted to second by first state on the end of family
State;The corresponding object synchronization parameter of second state is obtained from action state and synchronization parameter with corresponding relationship,
Wherein, the action state and synchronization parameter with corresponding relationship is had recorded in first client;It is sent to server
Carrying the first synchronizing information of the object synchronization parameter, wherein first synchronizing information is used to indicate the server,
The action state of the destination virtual role on the server is synchronized to, there is corresponding close with the object synchronization parameter
Second state of system.
According to another aspect of an embodiment of the present invention, a kind of synchronous method of action state is additionally provided, comprising: reception is taken
The first synchronizing information with object synchronization parameter, wherein first synchronizing information is used to indicate server, by the service
The action state of destination virtual role on device is synchronized to, and has the second state of corresponding relationship with the object synchronization parameter,
The destination virtual role is the virtual role controlled by the first client, and the object synchronization parameter is first client
In the case where detecting that the action state of the destination virtual role is converted to the second state by first state, closed from having to correspond to
The corresponding synchronization parameter of second state obtained in the action state and synchronization parameter of system;Respond first synchronizing information
Corresponding second state of the object synchronization parameter is obtained from synchronization parameter and action state with corresponding relationship;It will
The synchronous action state of the destination virtual role on the server is second state.
According to another aspect of an embodiment of the present invention, a kind of synchronous method of action state is additionally provided, comprising: reception is taken
The second synchronizing information with object synchronization parameter, wherein second synchronizing information is used to indicate the second client, will be described
The action state of destination virtual role in second client is synchronized to have corresponding relationship with the object synchronization parameter the
Two-state, the destination virtual role are the virtual role controlled by the first client, and the object synchronization parameter is described the
In the case that one client detects that the action state of the destination virtual role is converted to the second state by first state, from tool
There is the corresponding synchronization parameter of second state obtained in the action state and synchronization parameter of corresponding relationship;Respond described second
Synchronizing information obtains the object synchronization parameter corresponding described from synchronization parameter and action state with corresponding relationship
Two-state;The action state of the destination virtual role in second client is synchronized as second state.
According to another aspect of an embodiment of the present invention, a kind of synchronizing device of action state is additionally provided, comprising: detection mould
Block, for being detected in the first client by the action state of the destination virtual role of first client control by first
State is converted to the second state;First obtains module, for obtaining from action state and synchronization parameter with corresponding relationship
Second state corresponding object synchronization parameter, wherein had recorded in first client described with corresponding relationship
Action state and synchronization parameter;First sending module, for carrying the first of the object synchronization parameter to server transmission
Synchronizing information, wherein first synchronizing information is used to indicate the server, by the destination virtual on the server
The action state of role is synchronized to second state for having corresponding relationship with the object synchronization parameter.
According to another aspect of an embodiment of the present invention, a kind of synchronizing device of action state is additionally provided, comprising: first connects
Module is received, for receiving the first synchronizing information for carrying object synchronization parameter, wherein first synchronizing information is used to indicate
Server, by the action state of the destination virtual role on the server, be synchronized to the object synchronization parameter have pair
The second state that should be related to, the destination virtual role are the virtual role controlled by the first client, the object synchronization ginseng
Number is that first client detects that the action state of the destination virtual role is converted to the second state by first state
In the case of, the corresponding synchronization parameter of second state that is obtained from action state and synchronization parameter with corresponding relationship;
Second obtains module, obtains from synchronization parameter and action state with corresponding relationship for responding first synchronizing information
Corresponding second state of the object synchronization parameter;First synchronization module, for by the target on the server
The synchronous action state of virtual role is second state.
According to another aspect of an embodiment of the present invention, a kind of synchronizing device of action state is additionally provided, comprising: second connects
Module is received, for receiving the second synchronizing information for carrying object synchronization parameter, wherein second synchronizing information is used to indicate
The action state of destination virtual role in second client is synchronized to and is joined with the object synchronization by the second client
Number has the second state of corresponding relationship, and the destination virtual role is the virtual role controlled by the first client, the mesh
Mark synchronization parameter is that first client detects that the action state of the destination virtual role is converted to the by first state
In the case where two-state, second state obtained from action state and synchronization parameter with corresponding relationship is corresponding same
Walk parameter;Third obtains module, for responding second synchronizing information from synchronization parameter and movement shape with corresponding relationship
Corresponding second state of the object synchronization parameter is obtained in state;Second synchronization module is used for second client
On the destination virtual role action state it is synchronous be second state.
According to another aspect of an embodiment of the present invention, a kind of storage medium is additionally provided, which is characterized in that the storage is situated between
Computer program is stored in matter, wherein the computer program is arranged to execute described in any of the above-described when operation
Method.
According to another aspect of an embodiment of the present invention, a kind of electronic device, including memory and processor are additionally provided,
It is characterized in that, computer program is stored in the memory, and the processor is arranged to hold by the computer program
Method described in row any of the above-described.
In embodiments of the present invention, using detected in the first client by the first client control destination virtual angle
The action state of color is converted to the second state by first state;It is obtained from action state and synchronization parameter with corresponding relationship
The corresponding object synchronization parameter of second state, wherein action state with corresponding relationship and same is had recorded in the first client
Walk parameter;The first synchronizing information for carrying object synchronization parameter is sent to server, wherein the first synchronizing information is used to indicate
Server, by the action state of the destination virtual role on server, being synchronized to has corresponding relationship with object synchronization parameter
The mode of second state has recorded action state and synchronization parameter with corresponding relationship in the first client, when detect by
The action state of the destination virtual role of first client control is converted to the second state by first state, searches above-mentioned corresponding pass
System obtains the corresponding object synchronization parameter of the second state, and the first synchronizing information for carrying the object synchronization parameter is sent to clothes
Business device indicates that the action state of destination virtual role is synchronized to above-mentioned second state according to object synchronization parameter by server, from
And realize that server is synchronous with the action state of client, so as to avoid using traditional action state machine to carry out action state
Dependence when synchronous for reset condition and switch condition, so that the conversion of the action state of the destination virtual role on server
It is only related with the second state that it is presently in, so that the synchronous accuracy rate of action state is improved, in addition, compared to not using
Action state machine and the mode for directly carrying out state synchronized, using with corresponding relationship action state and synchronization parameter to movement
State synchronizes can be to the process that efficiently record virtual role action state is converted, to realize raising action state
Synchronous efficiency technical effect, and then the technical problem that the synchronous efficiency that solves action state in the related technology is lower.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair
Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is a kind of schematic diagram one of the synchronous method of optional action state according to an embodiment of the present invention;
Fig. 2 is a kind of application environment schematic diagram of the synchronous method of optional action state according to an embodiment of the present invention
One;
Fig. 3 is a kind of application environment schematic diagram of the synchronous method of optional action state according to an embodiment of the present invention
Two;
Fig. 4 is a kind of schematic diagram of the synchronous method of optional action state of optional embodiment according to the present invention
One;
Fig. 5 is a kind of schematic diagram of the synchronous method of optional action state of optional embodiment according to the present invention
Two;
Fig. 6 is a kind of schematic diagram of the synchronous method of optional action state of optional embodiment according to the present invention
Three;
Fig. 7 is a kind of schematic diagram of the synchronous method of optional action state of optional embodiment according to the present invention
Four;
Fig. 8 is a kind of schematic diagram two of the synchronous method of optional action state according to an embodiment of the present invention;
Fig. 9 is a kind of schematic diagram three of the synchronous method of optional action state according to an embodiment of the present invention;
Figure 10 is a kind of schematic diagram one of the synchronizing device of optional action state according to an embodiment of the present invention;
Figure 11 is a kind of schematic diagram two of the synchronizing device of optional action state according to an embodiment of the present invention;
Figure 12 is a kind of schematic diagram three of the synchronizing device of optional action state according to an embodiment of the present invention;
Figure 13 a is a kind of application scenarios schematic diagram of the synchronous method of optional action state according to an embodiment of the present invention
One;
Figure 13 b is a kind of application scenarios schematic diagram of the synchronous method of optional action state according to an embodiment of the present invention
Two;And
Figure 14 is a kind of schematic diagram of optional electronic device according to an embodiment of the present invention.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention
Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only
The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people
The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work
It encloses.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, "
Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way
Data be interchangeable under appropriate circumstances, so as to the embodiment of the present invention described herein can in addition to illustrating herein or
Sequence other than those of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover
Cover it is non-exclusive include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to
Step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, product
Or other step or units that equipment is intrinsic.
According to an aspect of an embodiment of the present invention, a kind of synchronous method of action state is provided, as shown in Figure 1, should
Method includes:
S102 is detected by the action state of the destination virtual role of the first client control in the first client by the
One state is converted to the second state;
S104 obtains the corresponding object synchronization ginseng of the second state from action state and synchronization parameter with corresponding relationship
Number, wherein action state and synchronization parameter with corresponding relationship are had recorded in the first client;
S106 sends the first synchronizing information for carrying object synchronization parameter to server, wherein the first synchronizing information is used
In instruction server, the action state of the destination virtual role on server is synchronized to object synchronization parameter with corresponding
Second state of relationship.
Optionally, in the present embodiment, the synchronous method of above-mentioned action state can be applied to the first visitor as shown in Figure 2
In the hardware environment that family end 202 and server 204 are constituted.As shown in Fig. 2, the first client 202 is in the first client 202
Detect that the action state of the destination virtual role controlled by the first client 202 is converted to the second state by first state, the
One client 202 obtains the corresponding object synchronization ginseng of the second state from action state and synchronization parameter with corresponding relationship
Number, wherein have recorded action state and synchronization parameter with corresponding relationship in the first client 202, the first client 202 to
Server 204 sends the first synchronizing information for carrying object synchronization parameter, wherein the first synchronizing information is used to indicate server
204, by the action state of the destination virtual role on server 204, being synchronized to has corresponding relationship with object synchronization parameter
Second state.Server 204 receives the first synchronizing information for carrying object synchronization parameter, and responds the first synchronizing information from tool
Have and obtain corresponding second state of object synchronization parameter in the synchronization parameter and action state of corresponding relationship, then by server 204
On destination virtual role action state it is synchronous be the second state.
Optionally, in the present embodiment, the synchronous method of above-mentioned action state can also be applied to as shown in Figure 3 first
In the hardware environment that client 202, server 204 and the second client 302 are constituted.As shown in figure 3, server 204 is connecing
After receiving the first synchronizing information for carrying object synchronization parameter, object synchronization parameter is carried to the transmission of the second client 302
The second synchronizing information, wherein the second synchronizing information is used to indicate the second client 302 for the target in the second client 302
The action state of virtual role is synchronized to the second state for having corresponding relationship with object synchronization parameter.Second client 302 connects
The second synchronizing information for carrying object synchronization parameter is received, and responds the second synchronizing information from the synchronization parameter with corresponding relationship
With obtain corresponding second state of object synchronization parameter in action state, then by the destination virtual role in the second client 302
Action state it is synchronous be the second state.
Optionally, in the present embodiment, the synchronous method of above-mentioned action state can be, but not limited to be applied to server
In the scene synchronized with the action state of the virtual role in client.Wherein, above-mentioned client can be, but not limited to for
Various types of applications, for example, online education application, instant messaging application, community space application, game application, shopping application,
Browser application, financial application, multimedia application, live streaming application etc..Specifically, can be, but not limited to be applied in above-mentioned game
In the scene synchronized in the action state of the virtual role on server and client side, or can with but be not limited to
Applied in the scene synchronized in above-mentioned shopping application to the action state of the virtual role on server and client side,
To improve synchronous efficiency when synchronizing to action state.Above-mentioned is only a kind of example, is not done in the present embodiment to this any
It limits.
Optionally, in the present embodiment, the synchronous method of above-mentioned action state can be, but not limited to be applied to terminal side, on
Stating terminal can be, but not limited to include: mobile phone, tablet computer, laptop, PC computer, intelligent wearable device, intelligent family
Occupy equipment, intelligent transportation equipment etc..Above-mentioned first client may be mounted in the terminal.
Optionally, in the present embodiment, by taking game application as an example, the action state of virtual role can be, but not limited to wrap
It includes: walking (walk), run (run), hit winged (hitfly), jump (jump), dead (dead), fall (fall), injured (hurt)
Etc..These action states, which can be, to be designed by art designer in the development of games stage.
Optionally, in the present embodiment, the first client can be recorded by way of storage configuration table has corresponding close
The action state and synchronization parameter of system.Such as: as shown in figure 4, its corresponding synchronization parameter is arranged for each action state, and incite somebody to action
The corresponding relationship of the two is recorded in allocation list, which can be the form of key-value, wherein with action state
It is identified as key, synchronization parameter value.
Optionally, in the present embodiment, by taking game application as an example, in playing a game for one innings of the first client and the second client
In game, the first client controls destination virtual role in the first client and the virtual role of the second client control carries out
Battle, in strong authentication Network Synchronization, needs in the first client, server, the second client to destination virtual role's
Action state synchronizes, and after the destination virtual role in the first client enters so-and-so action state, notifies on server
Destination virtual role also enters this action state, is then broadcast in the second client by the destination virtual role on server
Destination virtual role, notify it also to enter this action state, thus guarantee between client carry out game fighting when can
Simultaneous display.
In an optional embodiment, in one innings of game fighting, the destination virtual role's of the first client is dynamic
Make state and be converted to by free position to hit for winged state, as shown in figure 5, the first client is detecting above-mentioned state conversion
Afterwards, it is got from the allocation list of the action state and synchronization parameter with corresponding relationship as shown in Figure 4 and hits winged state correspondence
Object synchronization parameter be " 1007 ", to server send carry object synchronization parameter be " 1007 " the first synchronizing information with
Instruction server by the action state of the destination virtual role on server be synchronized to object synchronization parameter " 1007 " have pair
What should be related to hits winged state.
As it can be seen that through the above steps, action state and synchronization parameter with corresponding relationship are had recorded in the first client,
The second state is converted to by first state by the action state of destination virtual role of the first client control when detecting, is searched
Above-mentioned corresponding relationship obtains the corresponding object synchronization parameter of the second state, will carry the first synchronous letter of the object synchronization parameter
Breath is sent to server, and the action state of destination virtual role is synchronized to above-mentioned the according to object synchronization parameter by instruction server
Two-state, to realize that server is synchronous with the action state of client, so as to avoid use traditional action state machine into
The dependence taken action when making state synchronized for reset condition and switch condition, so that the movement of the destination virtual role on server
The conversion of state is only related with the second state that it is presently in, so that the synchronous accuracy rate of action state is improved, in addition, phase
Than in directly carrying out the mode of state synchronized without using action state machine, using with corresponding relationship action state with it is synchronous
Parameter synchronizes action state and can mention to the process that efficiently record virtual role action state is converted to realize
The technical effect of the synchronous efficiency of high action state, and then the lower skill of synchronous efficiency for solving action state in the related technology
Art problem.
As a kind of optional scheme, the destination virtual role controlled by the first client is detected in the first client
Action state the second state be converted to by first state include:
S1 detects the destination virtual angle in the first client when the action state of destination virtual role is first state
In the case that the action state that color performs destination virtual role after target action is converted to the second state, target is confirmly detected
The action state of virtual role is converted to the second state by first state;
S2, the action state for obtaining destination virtual role are converted to the letter of the movement in the second state procedure by first state
Breath, wherein first state, the second state and switch condition are carried in action message, wherein switch condition is used to indicate mesh
Mark acts corresponding action parameter;
Using action message, by destination virtual role, the corresponding first action state machine in the first client is synchronized to S3
Second state.
Optionally, in the present embodiment, the action state of virtual role can be recorded by action state machine, act shape
A series of finite state machine that state machine is made of the action state node and its switch condition of virtual roles, as shown in fig. 6, its
It may include three parts: action state node, state conversion and action parameter table.State conversion therein includes three elements:
Source state, purpose state, switch condition are that the state of AnyState state to Base Layer.HitFly turn as shown in Figure 7
It changes, source state is AnyState, and purpose state is Base Layer.HitFly, and switch condition is that Boolean BeHitFly is
True and BeGround are false.
Optionally, in the present embodiment, for synchronizing the first movement of the action state of virtual role in the first client
State machine is properly termed as host state machine, the second action state machine on server and the third action state machine in the second client
It is properly termed as from state machine, host state machine can be provided by the technology fine arts personnel applied, can be by main shape from state machine
State machine automatically generates.
As a kind of optional scheme, the second state pair is obtained from action state and synchronization parameter with corresponding relationship
The object synchronization parameter answered includes:
S1 determines that the action state that destination virtual role is presently in is the second state from the first action state machine;
S2 searches the status indicator of the second state from action state and synchronization parameter with corresponding relationship;
The corresponding synchronization parameter of status indicator is determined as object synchronization ginseng in the case where finding status indicator by S3
Number.
Optionally, in the present embodiment, the corresponding relationship of action state and synchronization parameter can be with key-value pair (key-
Value form) is stored in allocation list, detects that the action state of destination virtual role is transformed into the second shape from first state
When state, can first according to the first action state machine in first state the first client synchronous with the action parameter detected,
Determine that the action state of destination virtual role has been turned into the second state, from first state machine again with the shape of the second state
State mark searches allocation list for key and the corresponding value of the key is determined as object synchronization parameter if found.
As a kind of optional scheme, sent to server carry object synchronization parameter the first synchronizing information it
Afterwards, further includes:
S1, server receive the first synchronizing information;
S2, server respond the first synchronizing information and obtain target from synchronization parameter and action state with corresponding relationship
Corresponding second state of synchronization parameter;
S3, server are synchronous for the second state by the action state of the destination virtual role on server;
S4, server send the second synchronizing information for carrying object synchronization parameter to the second client, wherein second is same
Step information is used to indicate the second client and the action state of the destination virtual role in the second client is synchronized to the second state.
Optionally, in the present embodiment, to server send carry object synchronization parameter the first synchronizing information it
Afterwards, server receives first synchronizing information, can be according to the object synchronization parameter synchronization carried in first synchronizing information
The action state of destination virtual role on server, while the second synchronizing information for carrying object synchronization parameter being sent to
Second client is to indicate that the second client synchronizes the action state of destination virtual role.
Optionally, in the present embodiment, server can be recorded by way of storage configuration table with corresponding relationship
Synchronization parameter and action state.Such as: the corresponding relationship of synchronization parameter and action state is recorded in allocation list by server, should
Allocation list can be the form of key-value, wherein with synchronization parameter be key, action state is identified as value.
It optionally, in the present embodiment, can when server receives the first synchronizing information for carrying object synchronization parameter
To be that key searches above-mentioned allocation list with object synchronization parameter, if found, will be moved indicated by the corresponding value of the key
It is determined as corresponding second state of object synchronization parameter as state.Wherein above-mentioned value can be the mark of action state.
As a kind of optional scheme, sends in server to the second client and carry the second same of object synchronization parameter
After step information, further includes:
S1, the second client receive the second synchronizing information;
S2, second the second synchronizing information of client end response are obtained from synchronization parameter and action state with corresponding relationship
Corresponding second state of object synchronization parameter;
S3, the second client are synchronous for the second state by the action state of the destination virtual role in the second client.
Optionally, in the present embodiment, what the second client received server transmission carries object synchronization parameter
Second synchronizing information, it is according to the instruction of second synchronizing information that the action state of the destination virtual role in the second client is same
It walks to the second state.
Optionally, in the present embodiment, the second client can be recorded by way of storage configuration table has corresponding close
The synchronization parameter and action state of system.Such as: the corresponding relationship of synchronization parameter and action state is recorded in by the second client matches
It sets in table, which can be the form of key-value, wherein with synchronization parameter be key, action state is identified as
value。
Optionally, in the present embodiment, the second client receives the second synchronizing information for carrying object synchronization parameter
When, it can be that key searches above-mentioned allocation list with object synchronization parameter, it is if found, the corresponding value of the key is signified
The action state shown is determined as corresponding second state of object synchronization parameter.Wherein above-mentioned value can be the mark of action state
Know.
Other side according to an embodiment of the present invention additionally provides the synchronous method of another action state, such as Fig. 8 institute
Show, this method comprises:
S802 receives the first synchronizing information for carrying object synchronization parameter, wherein the first synchronizing information is used to indicate clothes
The action state of destination virtual role on server is synchronized to have corresponding relationship with object synchronization parameter the by device of being engaged in
Two-state, destination virtual role are the virtual role controlled by the first client, and object synchronization parameter is the detection of the first client
To destination virtual role action state the second state is converted to by first state in the case where, from the movement with corresponding relationship
The corresponding synchronization parameter of the second state obtained in state and synchronization parameter;
S804, the first synchronizing information of response obtain object synchronization from synchronization parameter and action state with corresponding relationship
Corresponding second state of parameter;
S806, the action state of the destination virtual role on server is synchronous for the second state.
Optionally, in the present embodiment, the synchronous method of above-mentioned action state can be, but not limited to be applied to server side,
The server can be, but not limited to as the corresponding server of the first client.
Optionally, in the present embodiment, by taking game application as an example, the action state of virtual role can be, but not limited to wrap
It includes: walking (walk), run (run), hit winged (hitfly), jump (jump), dead (dead), fall (fall), injured (hurt)
Etc..These action states, which can be, to be designed by art designer in the development of games stage.
Optionally, in the present embodiment, server can be recorded by way of storage configuration table with corresponding relationship
Synchronization parameter and action state.Such as: after its corresponding synchronization parameter is arranged for each action state, by the corresponding relationship of the two
Be recorded in allocation list, which can be the form of key-value, wherein synchronization parameter with for key, action state
It is identified as value.
It is as a kind of optional scheme, the action state of the destination virtual role on server is synchronous for the second state packet
It includes:
The corresponding second action state machine of destination virtual role on server is synchronized to by S1 using object synchronization parameter
Second state.
Optionally, in the present embodiment, the action state of virtual role can be recorded by action state machine, act shape
A series of finite state machine that state machine is made of the action state node and its switch condition of virtual roles.
Optionally, in the present embodiment, for synchronizing the first movement of the action state of virtual role in the first client
State machine is properly termed as host state machine, and the second action state machine on server is properly termed as from state machine, and host state machine can be with
It is provided by the technology fine arts personnel applied, can be automatically generated from state machine by host state machine.
As a kind of optional scheme, after reception carries the first synchronizing information of object synchronization parameter, further includes:
S1 sends the second synchronizing information for carrying object synchronization parameter to the second client, wherein the second synchronizing information
It is used to indicate the second client, by the action state of the destination virtual role in the second client, is synchronized to and joins with object synchronization
Number has the second state of corresponding relationship.
Optionally, in the present embodiment, server can send the second synchronizing information for carrying object synchronization parameter
To the second client, to indicate that the second client synchronizes the action state of destination virtual role.
Other side according to an embodiment of the present invention additionally provides the synchronous method of another action state, such as Fig. 9 institute
Show, this method comprises:
S902 is received and is carried the second synchronizing information of object synchronization parameter, wherein the second synchronizing information is used to indicate the
The action state of destination virtual role in second client is synchronized to object synchronization parameter with corresponding by two clients
Second state of relationship, destination virtual role are the virtual role controlled by the first client, and object synchronization parameter is the first visitor
In the case that family end detects that the action state of destination virtual role is converted to the second state by first state, closed from having to correspond to
The corresponding synchronization parameter of the second state obtained in the action state and synchronization parameter of system;
S904, the second synchronizing information of response obtain object synchronization from synchronization parameter and action state with corresponding relationship
Corresponding second state of parameter;
S906, the action state of the destination virtual role in the second client is synchronous for the second state.
Optionally, in the present embodiment, the synchronous method of above-mentioned action state can be, but not limited to be applied to terminal side, on
Stating terminal can be, but not limited to include: mobile phone, tablet computer, laptop, PC computer, intelligent wearable device, intelligent family
Occupy equipment, intelligent transportation equipment etc..Above-mentioned second client may be mounted in terminal.
Optionally, in the present embodiment, by taking game application as an example, the action state of virtual role can be, but not limited to wrap
It includes: walking (walk), run (run), hit winged (hitfly), jump (jump), dead (dead), fall (fall), injured (hurt)
Etc..These action states, which can be, to be designed by art designer in the development of games stage.
Optionally, in the present embodiment, the second client can be recorded by way of storage configuration table has corresponding close
The synchronization parameter and action state of system.Such as: its corresponding synchronization parameter is set for each action state, and by the correspondence of the two
In allocation list, which can be the form of key-value for relation record, wherein with synchronization parameter is key, acts shape
State is identified as value.
It is as a kind of optional scheme, the action state of the destination virtual role in the second client is synchronous for the second shape
State includes:
S1, it is using object synchronization parameter that the corresponding third action state machine of destination virtual role in the second client is same
It walks to the second state;Alternatively,
S2, the destination virtual role controlled in the second client show the second state.
Optionally, in the present embodiment, the action state of virtual role can be recorded by action state machine, act shape
A series of finite state machine that state machine is made of the action state node and its switch condition of virtual roles.
Optionally, in the present embodiment, for synchronizing the first movement of the action state of virtual role in the first client
State machine is properly termed as host state machine, and the third action state machine in the second client is properly termed as from state machine, host state machine
It can be provided by the technology fine arts personnel applied, can be automatically generated from state machine by host state machine.
Optionally, in the present embodiment, because action state and synchronization parameter are one-to-one, it may be considered that from state
Machine is replaced using action group.After the host state machine of first client enters an action state, for example enter " Base
Layer.HitFly " sends corresponding object synchronization parameter to the second client, and the second client is according to the object synchronization received
Parameter, finding its corresponding action state is " Base Layer.HitFly ", can be in action group directly in the second client
The upper movement for playing HitFly.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of
Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because
According to the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know
It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules is not necessarily of the invention
It is necessary.
Through the above description of the embodiments, those skilled in the art can be understood that according to above-mentioned implementation
The method of example can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but it is very much
In the case of the former be more preferably embodiment.Based on this understanding, technical solution of the present invention is substantially in other words to existing
The part that technology contributes can be embodied in the form of software products, which is stored in a storage
In medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, calculate
Machine, server or network equipment etc.) execute method described in each embodiment of the present invention.
Other side according to an embodiment of the present invention additionally provides a kind of for implementing the side of synchronization of above-mentioned action state
The synchronizing device of the action state of method, as shown in Figure 10, which includes:
1) detection module 1002, for detecting the destination virtual role controlled by the first client in the first client
Action state the second state is converted to by first state;
2) first module 1004 is obtained, for obtaining the second shape from action state and synchronization parameter with corresponding relationship
The corresponding object synchronization parameter of state, wherein action state and synchronization parameter with corresponding relationship are had recorded in the first client;
3) the first sending module 1006, for sending the first synchronizing information for carrying object synchronization parameter to server,
Wherein, the first synchronizing information is used to indicate server, and the action state of the destination virtual role on server is synchronized to and mesh
Mark the second state that synchronization parameter has corresponding relationship.
Optionally, in the present embodiment, the synchronizing device of above-mentioned action state can be applied to the first visitor as shown in Figure 2
In the hardware environment that family end 202 and server 204 are constituted.As shown in Fig. 2, the first client 202 is in the first client 202
Detect that the action state of the destination virtual role controlled by the first client 202 is converted to the second state by first state, the
One client 202 obtains the corresponding object synchronization ginseng of the second state from action state and synchronization parameter with corresponding relationship
Number, wherein have recorded action state and synchronization parameter with corresponding relationship in the first client 202, the first client 202 to
Server 204 sends the first synchronizing information for carrying object synchronization parameter, wherein the first synchronizing information is used to indicate server
The action state of destination virtual role on server 204 is synchronized to have corresponding relationship with object synchronization parameter the by 204
Two-state.Server 204, which receives, carries the first synchronizing information of object synchronization parameter, and responds the first synchronizing information from having
Corresponding second state of object synchronization parameter is obtained in the synchronization parameter and action state of corresponding relationship, then will be on server 204
Destination virtual role action state it is synchronous be the second state.
Optionally, in the present embodiment, the synchronizing device of above-mentioned action state can also be applied to as shown in Figure 3 first
In the hardware environment that client 202, server 204 and the second client 302 are constituted.As shown in figure 3, server 204 is connecing
After receiving the first synchronizing information for carrying object synchronization parameter, object synchronization parameter is carried to the transmission of the second client 302
The second synchronizing information, wherein the second synchronizing information is used to indicate the second client 302 for the target in the second client 302
The action state of virtual role is synchronized to the second state for having corresponding relationship with object synchronization parameter.Second client 302 connects
The second synchronizing information for carrying object synchronization parameter is received, and responds the second synchronizing information from the synchronization parameter with corresponding relationship
With obtain corresponding second state of object synchronization parameter in action state, then by the destination virtual role in the second client 302
Action state it is synchronous be the second state.
Optionally, in the present embodiment, the synchronizing device of above-mentioned action state can be, but not limited to be applied to server
In the scene synchronized with the action state of the virtual role in client.Wherein, above-mentioned client can be, but not limited to for
Various types of applications, for example, online education application, instant messaging application, community space application, game application, shopping application,
Browser application, financial application, multimedia application, live streaming application etc..Specifically, can be, but not limited to be applied in above-mentioned game
In the scene synchronized in the action state of the virtual role on server and client side, or can with but be not limited to
Applied in the scene synchronized in above-mentioned shopping application to the action state of the virtual role on server and client side,
To improve synchronous efficiency when synchronizing to action state.Above-mentioned is only a kind of example, is not done in the present embodiment to this any
It limits.
Optionally, in the present embodiment, the synchronizing device of above-mentioned action state can be, but not limited to be applied to terminal side, on
Stating terminal can be, but not limited to include: mobile phone, tablet computer, laptop, PC computer, intelligent wearable device, intelligent family
Occupy equipment, intelligent transportation equipment etc..Above-mentioned first client may be mounted in the terminal.
Optionally, in the present embodiment, by taking game application as an example, the action state of virtual role can be, but not limited to wrap
It includes: walking (walk), run (run), hit winged (hitfly), jump (jump), dead (dead), fall (fall), injured (hurt)
Etc..These action states, which can be, to be designed by art designer in the development of games stage.
Optionally, in the present embodiment, the first client can be recorded by way of storage configuration table has corresponding close
The action state and synchronization parameter of system.Such as: as shown in figure 4, its corresponding synchronization parameter is arranged for each action state, and incite somebody to action
The corresponding relationship of the two is recorded in allocation list, which can be the form of key-value, wherein with action state
It is identified as key, synchronization parameter value.
Optionally, in the present embodiment, by taking game application as an example, in playing a game for one innings of the first client and the second client
In game, the first client controls destination virtual role in the first client and the virtual role of the second client control carries out
Battle, in strong authentication Network Synchronization, needs in the first client, server, the second client to destination virtual role's
Action state synchronizes, and after the destination virtual role in the first client enters so-and-so action state, notifies on server
Destination virtual role also enters this action state, is then broadcast in the second client by the destination virtual role on server
Destination virtual role, notify it also to enter this action state, thus guarantee between client carry out game fighting when can
Simultaneous display.
In an optional embodiment, in one innings of game fighting, the destination virtual role's of the first client is dynamic
Make state and be converted to by free position to hit for winged state, as shown in figure 5, the first client is detecting above-mentioned state conversion
Afterwards, it is got from the allocation list of the action state and synchronization parameter with corresponding relationship as shown in Figure 4 and hits winged state correspondence
Object synchronization parameter be " 1007 ", to server send carry object synchronization parameter be " 1007 " the first synchronizing information with
Instruction server by the action state of the destination virtual role on server be synchronized to object synchronization parameter " 1007 " have pair
What should be related to hits winged state.
As it can be seen that action state and synchronization parameter with corresponding relationship are had recorded in the first client by above-mentioned apparatus,
The second state is converted to by first state by the action state of destination virtual role of the first client control when detecting, is searched
Above-mentioned corresponding relationship obtains the corresponding object synchronization parameter of the second state, will carry the first synchronous letter of the object synchronization parameter
Breath is sent to server, and the action state of destination virtual role is synchronized to above-mentioned the according to object synchronization parameter by instruction server
Two-state, to realize that server is synchronous with the action state of client, so as to avoid use traditional action state machine into
The dependence taken action when making state synchronized for reset condition and switch condition, so that the movement of the destination virtual role on server
The conversion of state is only related with the second state that it is presently in, so that the synchronous accuracy rate of action state is improved, in addition, phase
Than in directly carrying out the mode of state synchronized without using action state machine, using with corresponding relationship action state with it is synchronous
Parameter synchronizes action state and can mention to the process that efficiently record virtual role action state is converted to realize
The technical effect of the synchronous efficiency of high action state, and then the lower skill of synchronous efficiency for solving action state in the related technology
Art problem.
As a kind of optional scheme, detection module includes:
1) the first determination unit detects the first client when first state for the action state in destination virtual role
The case where action state that destination virtual role on end performs destination virtual role after target action is converted to the second state
Under, the action state for confirmly detecting destination virtual role is converted to the second state by first state;
2) acquiring unit, the action state for obtaining destination virtual role are converted to the second state procedure by first state
In action message, wherein first state, the second state and switch condition are carried in action message, wherein switch condition
It is used to indicate the corresponding action parameter of target action;
3) the first synchronization unit, for using action message by destination virtual role corresponding first in the first client
Action state machine is synchronized to the second state.
Optionally, in the present embodiment, the action state of virtual role can be recorded by action state machine, act shape
A series of finite state machine that state machine is made of the action state node and its switch condition of virtual roles, as shown in fig. 6, its
It may include three parts: action state node, state conversion and action parameter table.State conversion therein includes three elements:
Source state, purpose state, switch condition are that the state of AnyState state to Base Layer.HitFly turn as shown in Figure 7
It changes, source state is AnyState, and purpose state is Base Layer.HitFly, and switch condition is that Boolean BeHitFly is
True and BeGround are false.
Optionally, in the present embodiment, for synchronizing the first movement of the action state of virtual role in the first client
State machine is properly termed as host state machine, the second action state machine on server and the third action state machine in the second client
It is properly termed as from state machine, host state machine can be provided by the technology fine arts personnel applied, can be by main shape from state machine
State machine automatically generates.
As a kind of optional scheme, the first acquisition module includes:
1) the second determination unit, the movement shape being presently in for determining destination virtual role from the first action state machine
State is the second state;
2) searching unit, for searching the state of the second state from action state and synchronization parameter with corresponding relationship
Mark;
3) third determination unit, in the case where finding status indicator, by the corresponding synchronization parameter of status indicator
It is determined as object synchronization parameter.
Optionally, in the present embodiment, the corresponding relationship of action state and synchronization parameter can be with key-value pair (key-
Value form) is stored in allocation list, detects that the action state of destination virtual role is transformed into the second shape from first state
When state, can first according to the first action state machine in first state the first client synchronous with the action parameter detected,
Determine that the action state of destination virtual role has been turned into the second state, from first state machine again with the shape of the second state
State mark searches allocation list for key and the corresponding value of the key is determined as object synchronization parameter if found.
Other side according to an embodiment of the present invention additionally provides another for implementing the synchronization of above-mentioned action state
The synchronizing device of the action state of method, as shown in figure 11, which includes:
1) the first receiving module 1102, for receiving the first synchronizing information for carrying object synchronization parameter, wherein first
Synchronizing information is used to indicate server, by the action state of the destination virtual role on server, is synchronized to and joins with object synchronization
Number has the second state of corresponding relationship, and destination virtual role is the virtual role controlled by the first client, object synchronization ginseng
In the case that number detects that the action state of destination virtual role is converted to the second state by first state for the first client, from
The corresponding synchronization parameter of the second state obtained in action state and synchronization parameter with corresponding relationship;
2) second obtain module 1104, for respond the first synchronizing information from corresponding relationship synchronization parameter and movement
Corresponding second state of object synchronization parameter is obtained in state;
3) the first synchronization module 1106, for the action state of the destination virtual role on server is synchronous for the second shape
State.
Optionally, in the present embodiment, the synchronizing device of above-mentioned action state can be, but not limited to be applied to server side,
The server can be, but not limited to as the corresponding server of the first client.
Optionally, in the present embodiment, by taking game application as an example, the action state of virtual role can be, but not limited to wrap
It includes: walking (walk), run (run), hit winged (hitfly), jump (jump), dead (dead), fall (fall), injured (hurt)
Etc..These action states, which can be, to be designed by art designer in the development of games stage.
Optionally, in the present embodiment, server can be recorded by way of storage configuration table with corresponding relationship
Synchronization parameter and action state.Such as: after its corresponding synchronization parameter is arranged for each action state, by the corresponding relationship of the two
Be recorded in allocation list, which can be the form of key-value, wherein synchronization parameter with for key, action state
It is identified as value.
As a kind of optional scheme, the first synchronization module includes:
1) the second synchronization unit, for using object synchronization parameter by the destination virtual role corresponding second on server
Action state machine is synchronized to the second state.
Optionally, in the present embodiment, the action state of virtual role can be recorded by action state machine, act shape
A series of finite state machine that state machine is made of the action state node and its switch condition of virtual roles.
Optionally, in the present embodiment, for synchronizing the first movement of the action state of virtual role in the first client
State machine is properly termed as host state machine, and the second action state machine on server is properly termed as from state machine, and host state machine can be with
It is provided by the technology fine arts personnel applied, can be automatically generated from state machine by host state machine.
As a kind of optional scheme, above-mentioned apparatus further include:
1) the second sending module, for sending the second synchronizing information for carrying object synchronization parameter to the second client,
Wherein, the second synchronizing information is used to indicate the second client the action state of the destination virtual role in the second client is synchronous
To second state with object synchronization parameter with corresponding relationship.
Optionally, in the present embodiment, server can send the second synchronizing information for carrying object synchronization parameter
To the second client, to indicate that the second client synchronizes the action state of destination virtual role.
Other side according to an embodiment of the present invention additionally provides another for implementing the synchronization of above-mentioned action state
The synchronizing device of the action state of method, as shown in figure 12, which includes:
1) the second receiving module 1202, for receiving the second synchronizing information for carrying object synchronization parameter, wherein second
Synchronizing information is used to indicate the second client, and the action state of the destination virtual role in the second client is synchronized to and mesh
The second state that synchronization parameter has corresponding relationship is marked, destination virtual role is the virtual role controlled by the first client, mesh
Mark synchronization parameter is that the first client detects that the action state of destination virtual role is converted to the second state by first state
In the case of, the corresponding synchronization parameter of the second state that is obtained from action state and synchronization parameter with corresponding relationship;
2) third obtain module 1204, for respond the second synchronizing information from corresponding relationship synchronization parameter and movement
Corresponding second state of object synchronization parameter is obtained in state;
3) the second synchronization module 1206, for by the action state of the destination virtual role in the second client it is synchronous be the
Two-state.
Optionally, in the present embodiment, the synchronizing device of above-mentioned action state can be, but not limited to be applied to terminal side, on
Stating terminal can be, but not limited to include: mobile phone, tablet computer, laptop, PC computer, intelligent wearable device, intelligent family
Occupy equipment, intelligent transportation equipment etc..Above-mentioned second client may be mounted in terminal.
Optionally, in the present embodiment, by taking game application as an example, the action state of virtual role can be, but not limited to wrap
It includes: walking (walk), run (run), hit winged (hitfly), jump (jump), dead (dead), fall (fall), injured (hurt)
Etc..These action states, which can be, to be designed by art designer in the development of games stage.
Optionally, in the present embodiment, the second client can be recorded by way of storage configuration table has corresponding close
The synchronization parameter and action state of system.Such as: its corresponding synchronization parameter is set for each action state, and by the correspondence of the two
In allocation list, which can be the form of key-value for relation record, wherein with synchronization parameter is key, acts shape
State is identified as value.
As a kind of optional scheme, the second synchronization module includes:
1) third synchronization unit, for using object synchronization parameter that the destination virtual role in the second client is corresponding
Third action state machine is synchronized to the second state;Alternatively,
2) control unit shows the second state for controlling the destination virtual role in the second client.
Optionally, in the present embodiment, the action state of virtual role can be recorded by action state machine, act shape
A series of finite state machine that state machine is made of the action state node and its switch condition of virtual roles.
Optionally, in the present embodiment, for synchronizing the first movement of the action state of virtual role in the first client
State machine is properly termed as host state machine, and the third action state machine in the second client is properly termed as from state machine, host state machine
It can be provided by the technology fine arts personnel applied, can be automatically generated from state machine by host state machine.
The application environment of the embodiment of the present invention can be, but not limited to referring to the application environment in above-described embodiment, the present embodiment
In this is repeated no more.The embodiment of the invention provides the optional tools of one kind of the connection method for implementing above-mentioned real time communication
Body application example.
As a kind of optional embodiment, the synchronous method of above-mentioned action state can be, but not limited to be applied to such as Figure 13 a
With in the scene that is synchronized in gaming to the action state of destination virtual role shown in Figure 13 b.In this scene, first
The action state of the destination virtual role controlled by the first action state machine record by the first client in client, server
The action state of destination virtual role is above recorded by the second action state machine, passes through third action state machine in the second client
Record the action state of destination virtual role.
Optionally, in the present embodiment, above-mentioned first action state machine is known as host state machine, by the second action state machine
It is known as with third action state machine from state machine.Host state machine is all action state machine from state machine, is by a series of angles
The finite state machine of color action state node and its switch condition composition, including three parts: action state node, state conversion and
Action parameter table.State conversion includes three elements: source state, purpose state and switch condition.
Optionally, in the present embodiment, as depicted in fig. 13 a, the state in host state machine converts AnyState-Base
Layer.HitFly is becoming a new state conversion in state machine, and switch condition is synchronization parameter (Remote) ginseng
Numerical value is equal to 1007, this parameter value is provided by configuration file, and each action state has a corresponding Remote value, than
Such as " Base Layer.HitFly " correspondence " 1007 ".After host state machine enters an action state, for example enter " Base
Layer.HitFly ", then can find corresponding Remote value by configuration file is 1007, then note that from state machine,
As illustrated in fig. 13b, it is 1007 that its state machine parameter Remote value, which is arranged, this makes the action state from state machine in switch condition
It is lower to enter " Base Layer.HitFly " action state.Thus achieve the purpose that action state is synchronous, and this is acted
It synchronizes and does not depend on current action state.And when server disconnection reconnecting, server can issue Remote parameter to visitor
The slave state machine at family end, client can be easily from Remote parameter synchronization action state, to keep one with server
It causes.
Another aspect according to an embodiment of the present invention additionally provides a kind of for implementing the synchronization of above-mentioned action state
Electronic device, as shown in figure 14, the electronic device include: one or more (one is only shown in figure) processors 1402, storage
Device 1404, sensor 1406, encoder 1408 and transmitting device 1410 are stored with computer program in the memory, at this
Reason device is arranged to execute the step in any of the above-described embodiment of the method by computer program.
Optionally, in the present embodiment, above-mentioned electronic device can be located in multiple network equipments of computer network
At least one network equipment.
Optionally, in the present embodiment, above-mentioned processor can be set to execute following steps by computer program:
S1, detected in the first client by first client control destination virtual role action state by
First state is converted to the second state;
S2 obtains the corresponding object synchronization of second state from action state and synchronization parameter with corresponding relationship
Parameter, wherein the action state and synchronization parameter with corresponding relationship is had recorded in first client;
S3 sends the first synchronizing information for carrying the object synchronization parameter to server, wherein described first is synchronous
Information be used to indicate the server by the action state of the destination virtual role on the server be synchronized to it is described
Object synchronization parameter has second state of corresponding relationship.
Optionally, in the present embodiment, above-mentioned processor may be also configured to execute following step by computer program
It is rapid:
S1 sends the first synchronizing information for carrying the object synchronization parameter to server, wherein described first is synchronous
Information be used to indicate the server by the action state of the destination virtual role on the server be synchronized to it is described
Object synchronization parameter has second state of corresponding relationship;
S2 responds first synchronizing information and obtains the mesh from synchronization parameter and action state with corresponding relationship
Mark corresponding second state of synchronization parameter;
S3 synchronizes the action state of the destination virtual role on the server for second state.
Optionally, in the present embodiment, above-mentioned processor may be also configured to execute following step by computer program
It is rapid:
S1 receives the second synchronizing information for carrying object synchronization parameter, wherein second synchronizing information is used to indicate
The action state of destination virtual role in second client is synchronized to and the object synchronization parameter by the second client
The second state with corresponding relationship, the destination virtual role are the virtual role controlled by the first client, the target
Synchronization parameter is that first client detects that the action state of the destination virtual role is converted to second by first state
Second state obtained from action state and synchronization parameter with corresponding relationship in the case where state is corresponding synchronous
Parameter;
S2 responds second synchronizing information and obtains the mesh from synchronization parameter and action state with corresponding relationship
Mark corresponding second state of synchronization parameter;
S3 synchronizes the action state of the destination virtual role in second client for second state.
Optionally, it will appreciated by the skilled person that structure shown in Figure 14 is only to illustrate, electronic device can also
To be smart phone (such as Android phone, iOS mobile phone), tablet computer, palm PC and mobile internet device
The terminal devices such as (Mobile Internet Devices, MID), PAD.Figure 14 it does not make to the structure of above-mentioned electronic device
At restriction.For example, electronic device may also include more or less component (such as network interface, display dress than shown in Figure 14
Set), or with the configuration different from shown in Figure 14.
Wherein, memory 1402 can be used for storing software program and module, such as the action state in the embodiment of the present invention
Synchronous method and the corresponding program instruction/module of device, processor 1404 by operation be stored in it is soft in memory 1402
Part program and module realize the controlling party of above-mentioned target element thereby executing various function application and data processing
Method.Memory 1402 may include high speed random access memory, can also include nonvolatile memory, such as one or more magnetism
Storage device, flash memory or other non-volatile solid state memories.In some instances, memory 1402 can further comprise
The memory remotely located relative to processor 1404, these remote memories can pass through network connection to terminal.Above-mentioned net
The example of network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Above-mentioned transmitting device 1410 is used to that data to be received or sent via a network.Above-mentioned network specific example
It may include cable network and wireless network.In an example, transmitting device 1410 includes a network adapter (Network
Interface Controller, NIC), can be connected by cable with other network equipments with router so as to interconnection
Net or local area network are communicated.In an example, transmitting device 1410 is radio frequency (Radio Frequency, RF) module,
For wirelessly being communicated with internet.
Wherein, specifically, memory 1402 is for storing application program.
The embodiments of the present invention also provide a kind of storage medium, computer program is stored in the storage medium, wherein
The computer program is arranged to execute the step in any of the above-described embodiment of the method when operation.
Optionally, in the present embodiment, above-mentioned storage medium can be set to store by executing based on following steps
Calculation machine program:
S1, detected in the first client by first client control destination virtual role action state by
First state is converted to the second state;
S2 obtains the corresponding object synchronization of second state from action state and synchronization parameter with corresponding relationship
Parameter, wherein the action state and synchronization parameter with corresponding relationship is had recorded in first client;
S3 sends the first synchronizing information for carrying the object synchronization parameter to server, wherein described first is synchronous
Information be used to indicate the server by the action state of the destination virtual role on the server be synchronized to it is described
Object synchronization parameter has second state of corresponding relationship.
Optionally, in the present embodiment, above-mentioned storage medium may be also configured to store for executing following steps
Computer program:
S1 sends the first synchronizing information for carrying the object synchronization parameter to server, wherein described first is synchronous
Information be used to indicate the server by the action state of the destination virtual role on the server be synchronized to it is described
Object synchronization parameter has second state of corresponding relationship;
S2 responds first synchronizing information and obtains the mesh from synchronization parameter and action state with corresponding relationship
Mark corresponding second state of synchronization parameter;
S3 synchronizes the action state of the destination virtual role on the server for second state.
Optionally, in the present embodiment, above-mentioned storage medium may be also configured to store for executing following steps
Computer program:
S1 receives the second synchronizing information for carrying object synchronization parameter, wherein second synchronizing information is used to indicate
The action state of destination virtual role in second client is synchronized to and the object synchronization parameter by the second client
The second state with corresponding relationship, the destination virtual role are the virtual role controlled by the first client, the target
Synchronization parameter is that first client detects that the action state of the destination virtual role is converted to second by first state
Second state obtained from action state and synchronization parameter with corresponding relationship in the case where state is corresponding synchronous
Parameter;
S2 responds second synchronizing information and obtains the mesh from synchronization parameter and action state with corresponding relationship
Mark corresponding second state of synchronization parameter;
S3 synchronizes the action state of the destination virtual role in second client for second state.
Optionally, storage medium is also configured to store for executing step included in the method in above-described embodiment
Computer program, this is repeated no more in the present embodiment.
Optionally, in the present embodiment, those of ordinary skill in the art will appreciate that in the various methods of above-described embodiment
All or part of the steps be that the relevant hardware of terminal device can be instructed to complete by program, the program can store in
In one computer readable storage medium, storage medium may include: flash disk, read-only memory (Read-Only Memory,
ROM), random access device (Random Access Memory, RAM), disk or CD etc..
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
If the integrated unit in above-described embodiment is realized in the form of SFU software functional unit and as independent product
When selling or using, it can store in above-mentioned computer-readable storage medium.Based on this understanding, skill of the invention
Substantially all or part of the part that contributes to existing technology or the technical solution can be with soft in other words for art scheme
The form of part product embodies, which is stored in a storage medium, including some instructions are used so that one
Platform or multiple stage computers equipment (can be personal computer, server or network equipment etc.) execute each embodiment institute of the present invention
State all or part of the steps of method.
In the above embodiment of the invention, it all emphasizes particularly on different fields to the description of each embodiment, does not have in some embodiment
The part of detailed description, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed client, it can be by others side
Formula is realized.Wherein, the apparatus embodiments described above are merely exemplary, such as the division of the unit, and only one
Kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or
It is desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or discussed it is mutual it
Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of unit or module
It connects, can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered
It is considered as protection scope of the present invention.
Claims (15)
1. a kind of synchronous method of action state characterized by comprising
It is detected in the first client by the action state of the destination virtual role of first client control by the first shape
State is converted to the second state;
The corresponding object synchronization parameter of second state is obtained from action state and synchronization parameter with corresponding relationship,
In, the action state and synchronization parameter with corresponding relationship, the object synchronization ginseng are had recorded in first client
Number is used to indicate second state;
The first synchronizing information for carrying the object synchronization parameter is sent to server, wherein first synchronizing information is used
The action state of the destination virtual role on the server is synchronized to and the target in the instruction server
Synchronization parameter has second state of corresponding relationship, and the movement shape with corresponding relationship is had recorded in the server
State and synchronization parameter.
2. the method according to claim 1, wherein being detected in the first client by first client
The action state of the destination virtual role of control is converted to second state by the first state and includes:
When the action state of the destination virtual role is the first state, detect described in first client
After destination virtual role performs target action, the action state of the destination virtual role is converted to the feelings of second state
Under condition, the action state for confirmly detecting the destination virtual role is converted to second state by the first state;
The action state for obtaining the destination virtual role is converted to moving in second state procedure by the first state
Make information, wherein the first state, second state and switch condition are carried in the action message, wherein institute
It states switch condition and is used to indicate the corresponding action parameter of the target action;
Using the action message by the destination virtual role the corresponding first action state machine in first client
It is synchronized to second state.
3. according to the method described in claim 2, it is characterized in that, from the action state with corresponding relationship and synchronous ginseng
The corresponding object synchronization parameter of second state is obtained in number includes:
Determine that the action state that the destination virtual role is presently in is second shape from the first action state machine
State;
The status indicator of second state is searched from the action state and synchronization parameter with corresponding relationship;
In the case where finding the status indicator, it is same that the corresponding synchronization parameter of the status indicator is determined as the target
Walk parameter.
4. the method according to claim 1, wherein carrying the object synchronization to server transmission
After first synchronizing information of parameter, the method also includes:
The server receives first synchronizing information;
The server responds first synchronizing information and obtains institute from synchronization parameter and action state with corresponding relationship
State corresponding second state of object synchronization parameter;
The server synchronizes the action state of the destination virtual role on the server for second state;
The server sends the second synchronizing information for carrying the object synchronization parameter to the second client, wherein described
Second synchronizing information is used to indicate second client for the movement of the destination virtual role in second client
State synchronized is to second state.
5. according to the method described in claim 4, being carried it is characterized in that, being sent in the server to the second client
After the second synchronizing information for stating object synchronization parameter, the method also includes:
Second client receives second synchronizing information;
Second synchronizing information described in second client end response is obtained from synchronization parameter and action state with corresponding relationship
Take corresponding second state of the object synchronization parameter;
It is described that second client, which synchronizes the action state of the destination virtual role in second client,
Two-state.
6. a kind of synchronous method of action state characterized by comprising
Receiving the first synchronizing information for carrying object synchronization parameter, wherein first synchronizing information is used to indicate server,
By the action state of the destination virtual role on the server, being synchronized to has corresponding relationship with the object synchronization parameter
Second state, the destination virtual role are the virtual role controlled by the first client, and the object synchronization parameter is described
In the case that first client detects that the action state of the destination virtual role is converted to the second state by first state, from
The corresponding synchronization parameter of second state obtained in action state and synchronization parameter with corresponding relationship, the target are same
Step parameter is used to indicate second state;
It responds first synchronizing information and obtains the object synchronization from synchronization parameter and action state with corresponding relationship
Corresponding second state of parameter, wherein the action state with corresponding relationship and same is had recorded in the server
Walk parameter;
The action state of the destination virtual role on the server is synchronized as second state.
7. according to the method described in claim 6, it is characterized in that, by the dynamic of the destination virtual role on the server
Making state synchronized is that second state includes:
Using the object synchronization parameter by the corresponding second action state machine of the destination virtual role on the server
It is synchronized to second state.
8. according to the method described in claim 6, it is characterized in that, carrying described the of the object synchronization parameter receiving
After one synchronizing information, the method also includes:
The second synchronizing information for carrying the object synchronization parameter is sent to the second client, wherein the described second synchronous letter
Breath is used to indicate second client, and the action state of the destination virtual role in second client is synchronous
Extremely, there is second state of corresponding relationship with the object synchronization parameter.
9. a kind of synchronous method of action state characterized by comprising
Receive the second synchronizing information for carrying object synchronization parameter, wherein second synchronizing information is used to indicate the second visitor
Family end, by the action state of the destination virtual role in second client, being synchronized to has with the object synchronization parameter
Second state of corresponding relationship, the destination virtual role are the virtual role controlled by the first client, the object synchronization
Parameter is that first client detects that the action state of the destination virtual role is converted to the second state by first state
In the case where, the corresponding synchronous ginseng of second state obtained from action state and synchronization parameter with corresponding relationship
Number, the object synchronization parameter are used to indicate second state;
It responds second synchronizing information and obtains the object synchronization from synchronization parameter and action state with corresponding relationship
Corresponding second state of parameter, wherein the action state with corresponding relationship is had recorded in second client
And synchronization parameter;
The action state of the destination virtual role in second client is synchronized as second state.
10. according to the method described in claim 9, it is characterized in that, by the destination virtual angle in second client
The synchronous action state of color is that second state includes:
The corresponding third of the destination virtual role in second client is acted into shape using the object synchronization parameter
State machine is synchronized to second state;Alternatively,
The destination virtual role controlled in second client shows second state.
11. a kind of synchronizing device of action state characterized by comprising
Detection module, for detecting the movement of the destination virtual role by first client control in the first client
State is converted to the second state by first state;
First obtains module, corresponding for obtaining second state from action state and synchronization parameter with corresponding relationship
Object synchronization parameter, wherein have recorded the action state with corresponding relationship in first client and synchronous join
Number, the object synchronization parameter are used to indicate second state;
First sending module, for sending the first synchronizing information for carrying the object synchronization parameter to server, wherein institute
It states the first synchronizing information and is used to indicate the server, by the action state of the destination virtual role on the server,
It is synchronized to second state that there is corresponding relationship with the object synchronization parameter, having recorded in the server described has
The action state and synchronization parameter of corresponding relationship.
12. a kind of synchronizing device of action state characterized by comprising
First receiving module, for receiving the first synchronizing information for carrying object synchronization parameter, wherein the described first synchronous letter
Breath is used to indicate server, and the action state of the destination virtual role on the server is synchronized to and the object synchronization
Parameter has the second state of corresponding relationship, and the destination virtual role is the virtual role controlled by the first client, described
Object synchronization parameter is that first client detects that the action state of the destination virtual role is converted to by first state
In the case where second state, second state obtained from action state and synchronization parameter with corresponding relationship is corresponding
Synchronization parameter, the object synchronization parameter are used to indicate second state;
Second obtains module, for responding first synchronizing information from synchronization parameter and action state with corresponding relationship
Obtain corresponding second state of the object synchronization parameter, wherein have recorded in the server described with corresponding pass
The action state and synchronization parameter of system;
First synchronization module is described second for synchronizing the action state of the destination virtual role on the server
State.
13. a kind of synchronizing device of action state characterized by comprising
Second receiving module, for receiving the second synchronizing information for carrying object synchronization parameter, wherein the described second synchronous letter
Breath be used to indicate the second client, by the action state of the destination virtual role in second client, be synchronized to it is described
Object synchronization parameter has the second state of corresponding relationship, and the destination virtual role is the virtual angle controlled by the first client
Color, the object synchronization parameter are that first client detects the action state of the destination virtual role by first state
In the case where being converted to the second state, second state that is obtained from action state and synchronization parameter with corresponding relationship
Corresponding synchronization parameter, the object synchronization parameter are used to indicate second state;
Third obtains module, for responding second synchronizing information from synchronization parameter and action state with corresponding relationship
Obtain corresponding second state of the object synchronization parameter, wherein having recorded in second client described has pair
The action state and synchronization parameter that should be related to;
Second synchronization module, for being described by the action state synchronization of the destination virtual role in second client
Second state.
14. a kind of storage medium, which is characterized in that be stored with computer program in the storage medium, wherein the computer
Program is arranged to execute method described in any one of claims 1 to 10 when operation.
15. a kind of electronic device, including memory and processor, which is characterized in that be stored with computer journey in the memory
Sequence, the processor are arranged to execute method described in any one of claims 1 to 10 by the computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810236885.3A CN108650217B (en) | 2018-03-21 | 2018-03-21 | Synchronous method, device, storage medium and the electronic device of action state |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810236885.3A CN108650217B (en) | 2018-03-21 | 2018-03-21 | Synchronous method, device, storage medium and the electronic device of action state |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108650217A CN108650217A (en) | 2018-10-12 |
CN108650217B true CN108650217B (en) | 2019-07-23 |
Family
ID=63744687
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810236885.3A Active CN108650217B (en) | 2018-03-21 | 2018-03-21 | Synchronous method, device, storage medium and the electronic device of action state |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108650217B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109731334B (en) * | 2018-11-22 | 2020-08-11 | 腾讯科技(深圳)有限公司 | State switching method and device, storage medium and electronic device |
CN113379590B (en) * | 2021-06-07 | 2023-06-30 | 腾讯科技(上海)有限公司 | Animation data processing method, device, computer equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103942697A (en) * | 2013-11-20 | 2014-07-23 | 中网一号电子商务有限公司 | Three-dimensional virtual character inviting team forming method based on B/S mode |
CN106385408A (en) * | 2016-09-01 | 2017-02-08 | 网易(杭州)网络有限公司 | Motion state changing indication and processing method and device |
CN106582005A (en) * | 2016-11-14 | 2017-04-26 | 深圳市豆娱科技有限公司 | Data synchronous interaction method and device in virtual games |
WO2018006371A1 (en) * | 2016-07-07 | 2018-01-11 | 深圳狗尾草智能科技有限公司 | Method and system for synchronizing speech and virtual actions, and robot |
-
2018
- 2018-03-21 CN CN201810236885.3A patent/CN108650217B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103942697A (en) * | 2013-11-20 | 2014-07-23 | 中网一号电子商务有限公司 | Three-dimensional virtual character inviting team forming method based on B/S mode |
WO2018006371A1 (en) * | 2016-07-07 | 2018-01-11 | 深圳狗尾草智能科技有限公司 | Method and system for synchronizing speech and virtual actions, and robot |
CN106385408A (en) * | 2016-09-01 | 2017-02-08 | 网易(杭州)网络有限公司 | Motion state changing indication and processing method and device |
CN106582005A (en) * | 2016-11-14 | 2017-04-26 | 深圳市豆娱科技有限公司 | Data synchronous interaction method and device in virtual games |
Also Published As
Publication number | Publication date |
---|---|
CN108650217A (en) | 2018-10-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102247675B1 (en) | Localization decisions for mixed reality systems | |
CN105703807B (en) | A kind of Bluetooth pairing methods, apparatus and system | |
CN107409434A (en) | The alternate system comprising sensor connection with emission mechanism of motion sensing clothes | |
CN105335064A (en) | Information processing method, terminal, and computer storage medium | |
CN102710549B (en) | To be established a communications link the method for relation, terminal and system by shooting | |
CN105024919B (en) | A kind of groups of users method for building up and device | |
US20120169491A1 (en) | Relay node placement method in wireless body sensor network | |
CN108650217B (en) | Synchronous method, device, storage medium and the electronic device of action state | |
WO2013145614A1 (en) | Information processing device, server device, information processing method and program | |
CN110149553A (en) | Treating method and apparatus, storage medium and the electronic device of image | |
CN102375972A (en) | Distributive augmented reality platform based on mobile equipment | |
CN105516282B (en) | A kind of method and wearable device of data synchronization processing | |
CN110339571A (en) | Event generation method and device, storage medium and electronic device | |
CN107749789B (en) | Time synchronization method and related device | |
CN106504103A (en) | Set up the method and device of friend relation | |
CN205490872U (en) | Camera shutter control device and system | |
CN109753152A (en) | Exchange method and device based on human body attitude, computer equipment | |
CN105100629B (en) | A kind of image processing method and electronic equipment | |
US20130324235A1 (en) | Method and apparatus for generating online game packet for effective detection of illegal user | |
WO2019037073A1 (en) | Method, device and sever for data synchronization | |
CN106412682A (en) | Augmented reality information transmission method | |
CN105630402B (en) | The variation and change device of image data storage location | |
JP7156655B1 (en) | Monitoring system, monitoring method, and learning method for image recognition device for monitoring system | |
CN108525297A (en) | Cartoon display method, device, storage medium and electronic device | |
CN115908117B (en) | Two-dimensional building model image generation method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP02 | Change in the address of a patent holder | ||
CP02 | Change in the address of a patent holder |
Address after: 518000 Tencent Building, No. 1 High-tech Zone, Nanshan District, Shenzhen City, Guangdong Province, 35 Floors Patentee after: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd. Address before: 518000 35 / F, Tencent building, Keji Zhongyi Road, high tech Zone, Nanshan District, Zhuhai City, Guangdong Province Patentee before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd. |