CN109621405B - Cross-platform interaction method and device, computer equipment and storage medium - Google Patents

Cross-platform interaction method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN109621405B
CN109621405B CN201811393106.7A CN201811393106A CN109621405B CN 109621405 B CN109621405 B CN 109621405B CN 201811393106 A CN201811393106 A CN 201811393106A CN 109621405 B CN109621405 B CN 109621405B
Authority
CN
China
Prior art keywords
terminal
interaction
interactive
data
sending
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811393106.7A
Other languages
Chinese (zh)
Other versions
CN109621405A (en
Inventor
柳真理
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Roisoft Entertainment Shenzhen Co ltd
Original Assignee
Roisoft Entertainment Shenzhen Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Roisoft Entertainment Shenzhen Co ltd filed Critical Roisoft Entertainment Shenzhen Co ltd
Priority to CN201811393106.7A priority Critical patent/CN109621405B/en
Publication of CN109621405A publication Critical patent/CN109621405A/en
Application granted granted Critical
Publication of CN109621405B publication Critical patent/CN109621405B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/35Details of game servers
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/31Communication aspects specific to video games, e.g. between several handheld game devices at close range
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/40Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterised by details of platform network
    • A63F2300/402Communication between platforms, i.e. physical link to protocol
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/50Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers
    • A63F2300/51Server architecture

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Information Transfer Between Computers (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to a cross-platform interaction method, which comprises the following steps: receiving an interactive instruction sent by a first terminal through a target application; corresponding interactive data are obtained through calculation according to the interactive instruction, the interactive data are obtained through calculation based on a fraction code base, floating point type data in the fraction code base are expressed by fractions, and numerators and denominators of the fractions are integer type data; and sending the interactive data to each terminal corresponding to the target application so that each terminal completes corresponding interaction according to the interactive data. The method realizes cross-platform synchronous interaction. In addition, a cross-platform interaction device, a computer device and a storage medium are also provided.

Description

Cross-platform interaction method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a cross-platform interaction method and apparatus, a computer device, and a storage medium.
Background
Different types of terminal devices often have different results of calculation of the same data by different types of terminal devices due to different calculation accuracies of CPUs (central processing units). Therefore, the same application can only perform synchronous interaction on the same platform (the same type of terminal on the same platform) and cannot realize cross-platform synchronous interaction, for example, for a game application, a mobile terminal user can only fight with the mobile terminal user, but cannot fight with a PC (personal computer) end user.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a cross-platform interaction method, apparatus, computer device and storage medium that can implement cross-platform.
In a first aspect, an embodiment of the present invention provides a cross-platform interaction method, where the method includes:
receiving an interactive instruction sent by a first terminal through a target application;
corresponding interactive data are obtained through calculation according to the interactive instruction, the interactive data are obtained through calculation based on a fraction code base, floating point type data in the fraction code base are expressed by fractions, and numerators and denominators of the fractions are integer type data;
and sending the interactive data to each terminal corresponding to the target application so that each terminal completes corresponding interaction according to the interactive data.
In one embodiment, the interaction instruction comprises an interaction type and interaction information; the step of obtaining corresponding interactive data by calculation according to the interactive instruction further comprises: acquiring a calculation rule corresponding to the interaction type according to the interaction type; and calculating by adopting the calculation rule according to the interaction information to obtain corresponding interaction data.
In one embodiment, before the step of sending the interactive data to each terminal corresponding to the target application, the method further includes: compressing and packaging the interactive data to obtain compressed and packaged interactive data; acquiring terminal identifications of terminals corresponding to the target application; the step of sending the interactive data to each terminal corresponding to the target application comprises: and sending the compressed and packaged interactive data to the terminal corresponding to the terminal identification according to the terminal identification of each terminal.
In one embodiment, the interactive instruction further includes: a scene identifier and an application identifier; before the step of sending the interactive data to each terminal corresponding to the target application, the method further includes: acquiring a corresponding terminal identification set according to the scene identification and the application identification, wherein the terminal identification set comprises a plurality of terminal identifications; the step of sending the interactive data to each terminal corresponding to the target application includes: and sending the interactive data to a terminal corresponding to each terminal identifier in the terminal identifier set.
In one embodiment, the target application is a gaming application; the step of receiving the interactive instruction sent by the first terminal through the target application comprises the following steps: receiving an interactive instruction sent by a first terminal in a game scene of the game application; the step of sending the interactive data to each terminal corresponding to the target application comprises: and sending the interactive data to each corresponding terminal of the game application in the game scene.
In a second aspect, an embodiment of the present invention provides a cross-platform interaction apparatus, where the apparatus includes: the instruction receiving module is used for receiving an interactive instruction sent by the first terminal through the target application; the computing module is used for computing corresponding interactive data according to the interactive instruction, the interactive data are computed on the basis of a fraction code base, floating point type data in the fraction code base are represented by fractions, and numerators and denominators of the fractions are integer type data; and the sending module is used for sending the interactive data to each terminal corresponding to the target application so that each terminal completes corresponding interaction according to the interactive data.
In one embodiment, the interaction instruction comprises an interaction type and interaction information; the calculation module is also used for acquiring a calculation rule corresponding to the interaction type according to the interaction type; and calculating by adopting the calculation rule according to the interaction information to obtain corresponding interaction data.
In one embodiment, the apparatus further comprises: the compression module is used for compressing and packaging the interactive data to obtain compressed and packaged interactive data; the identification acquisition module is used for acquiring the terminal identification of each terminal corresponding to the target application; and the sending module is also used for sending the compressed and packaged interactive data to the terminal corresponding to the terminal identification according to the terminal identification of each terminal.
In one embodiment, the interactive instruction further includes: a scene identifier and an application identifier; the cross-platform interaction device further comprises: an identifier set obtaining module, configured to obtain a corresponding terminal identifier set according to the scene identifier and the application identifier, where the terminal identifier set includes multiple terminal identifiers; the sending module is further configured to send the interaction data to a terminal corresponding to each terminal identifier in the terminal identifier set.
In one embodiment, the target application is a game application; the instruction receiving module is further used for receiving an interactive instruction sent by the first terminal in a game scene of the game application; the sending module is further configured to send the interaction data to each terminal corresponding to the game application in the game scene.
In a third aspect, an embodiment of the present invention provides a computer device, including a memory and a processor, where the memory stores a computer program, and the computer program, when executed by the processor, causes the processor to execute the following steps:
receiving an interactive instruction sent by a first terminal through a target application;
corresponding interactive data are obtained through calculation according to the interactive instruction, the interactive data are obtained through calculation based on a fraction code base, floating point type data in the fraction code base are expressed by fractions, and numerators and denominators of the fractions are integer type data;
and sending the interactive data to each terminal corresponding to the target application so that each terminal completes corresponding interaction according to the interactive data.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the processor is caused to execute the following steps:
receiving an interactive instruction sent by a first terminal through a target application;
corresponding interactive data are obtained through calculation according to the interactive instruction, the interactive data are obtained through calculation based on a fraction code base, floating point type data in the fraction code base are expressed by fractions, and numerators and denominators of the fractions are integer type data;
and sending the interactive data to each terminal corresponding to the target application so that each terminal completes corresponding interaction according to the interactive data.
According to the cross-platform interaction method, the cross-platform interaction device, the computer equipment and the storage medium, after an interaction instruction sent by the first terminal through the target application is received, corresponding interaction data are obtained through calculation according to the interaction instruction, the interaction data are obtained through calculation based on the fraction code base, floating point type data in the fraction code base are represented by fractions, and numerator and denominator of the fractions are integer type data. As the results of the floating point type data obtained on different platforms may be different, the obtained interactive data can be suitable for each platform by representing the floating point type data by adopting fractions and representing the numerator and the denominator of the fractions by adopting integer data, and then each terminal completes interaction according to the interactive data by sending the interactive data to each terminal corresponding to the target application, thereby realizing cross-platform synchronous interaction.
Drawings
In order to more clearly illustrate the embodiments or technical solutions of the present invention, the drawings used in the embodiments or technical solutions of the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the structures shown in the drawings without creative efforts.
FIG. 1 is a flow diagram of a cross-platform interaction method in one embodiment;
FIG. 2 is a schematic diagram of cross-platform interaction in one embodiment;
FIG. 3 is a flow diagram of a cross-platform interaction method in another embodiment;
FIG. 4 is a block diagram of an architecture of a cross-platform interaction device in one embodiment;
FIG. 5 is a block diagram showing the structure of a cross-platform interactive apparatus according to another embodiment;
FIG. 6 is a block diagram showing the structure of a cross-platform interactive device in another embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, a cross-platform interaction method is provided, where the cross-platform interaction method is applied to a server, and the cross-platform interaction method specifically includes the following steps:
and 102, receiving an interactive instruction sent by the first terminal through the target application.
The target application refers to an application which interacts with each other across platforms. The target application may be a gaming application, a social application, or the like. The first terminal is a terminal which currently sends the interactive instruction. The server of the target application receives an interactive instruction sent by the first terminal through the target application, wherein the interactive instruction can be an attack instruction, a moving instruction, an avoidance instruction and the like. In a game scenario, the interactive instructions are used to instruct virtual control objects in the game scenario to perform corresponding actions, such as movements. The first terminal may be a mobile terminal, a desktop terminal, a PC terminal, a game machine, or the like.
And step 104, calculating to obtain corresponding interactive data according to the interactive instruction, wherein the interactive data are obtained by calculation based on a fraction code base, floating point type data in the fraction code base are expressed by fractions, and numerator and denominator of the fractions are integer type data.
The interactive data refers to interactive result data calculated by the server according to the received interactive instruction. The fractional code base is a data code base which is independently developed, and the fractional code base adopts fractional numbers to replace traditional floating point (Float) data. Because the CPUs of different platforms are different, the results obtained by performing floating point calculation are often different, and in order to realize cross-platform interaction, a fractional form is adopted to replace floating point type calculation. The numerator and denominator of the fraction are respectively represented by integer (Int), and the cross-platform synchronization can be achieved because the results obtained by the calculation of integer under each platform are the same.
And 106, sending the interactive data to each terminal corresponding to the target application so that each terminal completes corresponding interaction according to the interactive data.
In order to realize synchronization of different platforms, the obtained interactive data is sent to terminals corresponding to the different platforms, including the first terminal. And the terminal of each platform can complete cross-platform interaction according to the received interaction data. As shown in fig. 2, in one embodiment, a cross-platform timing diagram is implemented, which includes three different terminals, namely a smartphone, a PC terminal, and a PCVR terminal (virtual reality device, for example, VR glasses device). The intelligent mobile phone sends an interactive command to the server, the server obtains interactive data through calculation based on the fractional code base according to the interactive command, then the interactive data are sent to the intelligent mobile phone, the PC terminal and the PCVR terminal at the same time, and the three complete interaction according to the received interactive data, so that cross-platform synchronous interaction is realized.
According to the cross-platform interaction method, after an interaction instruction sent by a first terminal through a target application is received, corresponding interaction data are obtained through calculation according to the interaction instruction, the interaction data are obtained through calculation based on a fraction code base, floating point type data in the fraction code base are represented by fractions, and numerators and denominators of the fractions are integer type data. Because the results obtained by the floating point type data on different platforms may be different, the obtained interactive data can be suitable for each platform by representing the floating point type data by adopting fractions and representing the numerator and the denominator of the fractions by adopting integer data, and then the interactive data is simultaneously sent to each terminal corresponding to the target application, and each terminal completes corresponding interaction according to the interactive data, thereby realizing cross-platform synchronous interaction.
In one embodiment, the interaction instructions include an interaction type and interaction information; the step of obtaining corresponding interactive data by calculation according to the interactive instruction further comprises: acquiring a calculation rule corresponding to the interaction type according to the interaction type; and calculating by adopting a calculation rule according to the interaction information to obtain corresponding interaction data.
The interaction type refers to a type of an interaction instruction, such as an attack type, an avoidance type, or a move type. The interactive information refers to specific interactive contents, for example, if the interactive contents are of a mobile type, the interactive information is a corresponding mobile distance. The calculation rules corresponding to different interaction types are different, for example, for an attack type, the calculation rule may be to calculate a distance between an attacker and an attacked to determine whether the attack is successful. For the type of movement, the calculation rule may be to determine the current position according to the distance moved. Therefore, the corresponding calculation rule is firstly obtained according to the interaction type, and then the corresponding interaction data is obtained by adopting the calculation rule according to the interaction information.
As shown in fig. 3, in one embodiment, a cross-platform interaction method is provided, including:
step 302, receiving an interactive instruction sent by the first terminal through the target application.
And step 304, corresponding interactive data is obtained through calculation according to the interactive instruction, the interactive data is obtained through calculation based on a fraction code base, floating point type data in the fraction code base are expressed by fractions, and numerators and denominators of the fractions are integer type data.
And step 306, compressing and packaging the interactive data to obtain compressed and packaged interactive data.
The interactive data obtained by calculation may be relatively large, which easily results in large transmission data volume, and before transmission, the corresponding interactive data needs to be compressed and packaged, so that the corresponding data transmission volume is reduced.
And 308, acquiring the terminal identification of each terminal corresponding to the target application.
Wherein, at the same time, a plurality of terminals of different platforms participate in the interaction of the target application. Therefore, the corresponding target application can simultaneously correspond to a plurality of terminals to obtain the terminal identification of each terminal, so that the interactive data can be conveniently sent according to the terminal identification in the follow-up process. In a game scene, the terminal identifier of each terminal corresponding to the target application refers to the terminal identifier of each terminal participating in the current game.
And 310, sending the compressed and packaged interactive data to the terminal corresponding to the terminal identifier according to the terminal identifier of each terminal.
And after the terminal identification of each terminal is obtained, the compressed and packaged interactive data is sent to the terminal corresponding to the terminal identification. The terminal here may be a terminal of a different platform, for example, a PC terminal, a mobile phone, or another terminal. By compressing and packaging the interactive data and then sending the data, the transmission quantity of the data is reduced, the bandwidth is saved, and the transmission speed is increased.
In one embodiment, the interactive instruction further comprises: a scene identifier and an application identifier; before the step of sending the interactive data to each terminal corresponding to the target application, the method further comprises the following steps: acquiring a corresponding terminal identification set according to the scene identification and the application identification, wherein the terminal identification set comprises a plurality of terminal identifications; the step of sending the interactive data to each terminal corresponding to the target application comprises the following steps: and sending the interactive data to a terminal corresponding to each terminal identifier in the terminal identifier set.
Wherein the application identifier is used to uniquely identify an application. The scene identification is used to uniquely identify a scene. The terminals of different platforms in the same scene in the same application realize cross-platform interaction, so the scene identification and the application identification are acquired to determine the corresponding terminal identification set. The terminal identification set comprises all terminal identifications under the same application scene, including the first terminal identification. And sending the interaction number to a terminal corresponding to each terminal identifier in the terminal identifier combination, thereby realizing cross-platform interaction under the same scene of the same application.
In one embodiment, the target application is a gaming application; the step of receiving the interactive instruction sent by the first terminal through the target application comprises the following steps: receiving an interactive instruction sent by a first terminal in a game scene of a game application; the step of sending the interactive data to each terminal corresponding to the target application comprises the following steps: and sending the interactive data to each corresponding terminal of the game application in the game scene.
When the target application is a game application, the server receives an interaction instruction sent by the first terminal in a game scene of the game application, and sends interaction data to each corresponding terminal in the game scene according to the interaction instruction after obtaining the interaction data, so that cross-platform game interaction is realized in the game scene.
As shown in fig. 4, in one embodiment, a cross-platform interaction apparatus is proposed, the apparatus comprising:
an instruction receiving module 402, configured to receive an interaction instruction sent by a first terminal through a target application;
a calculating module 404, configured to calculate corresponding interaction data according to the interaction instruction, where the interaction data is calculated based on a fractional code library, floating point type data in the fractional code library is represented by a fraction, and a numerator and a denominator of the fraction are integer type data;
a sending module 406, configured to send the interaction data to each terminal corresponding to the target application, so that each terminal completes corresponding interaction according to the interaction data.
In one embodiment, the interaction instruction comprises an interaction type and interaction information; the calculation module is further used for acquiring a calculation rule corresponding to the interaction type according to the interaction type; and calculating by adopting the calculation rule according to the interaction information to obtain corresponding interaction data.
As shown in fig. 5, in an embodiment, the cross-platform interaction apparatus further includes:
the compression module 408 is configured to perform compression and encapsulation on the interactive data to obtain compressed and encapsulated interactive data;
an identifier obtaining module 410, configured to obtain a terminal identifier of each terminal corresponding to the target application;
the sending module 406 is further configured to send the compressed and encapsulated interactive data to a terminal corresponding to the terminal identifier according to the terminal identifier of each terminal.
As shown in fig. 6, in an embodiment, the interaction instruction further includes: a scene identifier and an application identifier; the cross-platform interaction device further comprises:
an identifier set obtaining module 405, configured to obtain a corresponding terminal identifier set according to the scene identifier and the application identifier, where the terminal identifier set includes multiple terminal identifiers;
the sending module 406 is further configured to send the interaction data to a terminal corresponding to each terminal identifier in the terminal identifier set.
In one embodiment, the target application is a gaming application; the instruction receiving module 402 is further configured to receive an interaction instruction sent by the first terminal in a game scene of the game application; the sending module 406 is further configured to send the interaction data to each terminal corresponding to the game application in the game scene.
FIG. 7 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may be a server. As shown in fig. 7, the computer device includes a processor, a memory, and a network interface connected by a system bus. The memory comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program that, when executed by the processor, causes the processor to implement a cross-platform interaction method. The internal memory may also have stored therein a computer program that, when executed by the processor, causes the processor to perform a cross-platform interaction method. The network interface is used for communicating with an external device. Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the cross-platform interaction method provided by the present application can be implemented in the form of a computer program, and the computer program can be run on a computer device as shown in fig. 7. The memory of the computer device can store various program templates which form the cross-platform interaction device. Such as an instruction receiving module 402, a calculating module 404, and a sending module 406.
A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of: receiving an interactive instruction sent by a first terminal through a target application; corresponding interactive data are obtained through calculation according to the interactive instruction, the interactive data are obtained through calculation based on a fraction code base, floating point type data in the fraction code base are expressed by fractions, and numerators and denominators of the fractions are integer type data; and sending the interactive data to each terminal corresponding to the target application so that each terminal completes corresponding interaction according to the interactive data.
In one embodiment, the interaction instruction comprises an interaction type and interaction information; the step of obtaining corresponding interactive data by calculation according to the interactive instruction further comprises: acquiring a calculation rule corresponding to the interaction type according to the interaction type; and calculating by adopting the calculation rule according to the interaction information to obtain corresponding interaction data.
In an embodiment, before the step of sending the interaction data to the terminals corresponding to the target application, when executed by the processor, the computer program is further configured to perform the following steps: compressing and packaging the interactive data to obtain compressed and packaged interactive data; acquiring terminal identifications of terminals corresponding to the target application; the step of sending the interactive data to each terminal corresponding to the target application includes: and sending the compressed and packaged interactive data to the terminal corresponding to the terminal identification according to the terminal identification of each terminal.
In one embodiment, the interaction instruction further includes: a scene identifier and an application identifier; before the step of sending the interactive data to the terminals corresponding to the target application, when the computer program is executed by the processor, the computer program is further configured to perform the following steps: acquiring a corresponding terminal identification set according to the scene identification and the application identification, wherein the terminal identification set comprises a plurality of terminal identifications; the step of sending the interactive data to each terminal corresponding to the target application includes: and sending the interactive data to a terminal corresponding to each terminal identifier in the terminal identifier set.
In one embodiment, the target application is a gaming application; the step of receiving the interactive instruction sent by the first terminal through the target application comprises the following steps: receiving an interactive instruction sent by a first terminal in a game scene of the game application; the step of sending the interactive data to each terminal corresponding to the target application comprises: and sending the interactive data to each corresponding terminal of the game application in the game scene.
A computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of: receiving an interactive instruction sent by a first terminal through a target application; corresponding interactive data are obtained through calculation according to the interactive instruction, the interactive data are obtained through calculation based on a fraction code base, floating point type data in the fraction code base are expressed by fractions, and numerators and denominators of the fractions are integer type data; and sending the interactive data to each terminal corresponding to the target application so that each terminal completes corresponding interaction according to the interactive data.
In one embodiment, the interaction instruction comprises an interaction type and interaction information; the step of obtaining corresponding interactive data by calculation according to the interactive instruction further comprises: acquiring a calculation rule corresponding to the interaction type according to the interaction type; and calculating by adopting the calculation rule according to the interaction information to obtain corresponding interaction data.
In an embodiment, before the step of sending the interaction data to the terminals corresponding to the target application, when executed by the processor, the computer program is further configured to perform the following steps: compressing and packaging the interactive data to obtain compressed and packaged interactive data; acquiring terminal identifications of terminals corresponding to the target application; the step of sending the interactive data to each terminal corresponding to the target application includes: and sending the compressed and packaged interactive data to the terminal corresponding to the terminal identification according to the terminal identification of each terminal.
In one embodiment, the interactive instruction further includes: a scene identifier and an application identifier;
before the step of sending the interactive data to the terminals corresponding to the target application, when the computer program is executed by the processor, the computer program is further configured to perform the following steps: acquiring a corresponding terminal identification set according to the scene identification and the application identification, wherein the terminal identification set comprises a plurality of terminal identifications; the step of sending the interactive data to each terminal corresponding to the target application includes: and sending the interactive data to a terminal corresponding to each terminal identifier in the terminal identifier set.
In one embodiment, the target application is a gaming application; the step of receiving the interactive instruction sent by the first terminal through the target application comprises the following steps: receiving an interactive instruction sent by a first terminal in a game scene of the game application; the step of sending the interactive data to each terminal corresponding to the target application comprises: and sending the interactive data to each corresponding terminal of the game application in the game scene.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct Rambus Dynamic RAM (DRDRAM), and Rambus Dynamic RAM (RDRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, and these are all within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (4)

1. A cross-platform interaction method, the method comprising:
receiving an interactive instruction sent by a first terminal through a target application;
corresponding interactive data are obtained through calculation according to the interactive instruction, the interactive data are obtained through calculation based on a fraction code base, floating point type data in the fraction code base are expressed by fractions, and numerators and denominators of the fractions are integer type data;
sending the interactive data to each terminal corresponding to the target application so that each terminal completes corresponding interaction according to the interactive data, wherein the interactive instruction comprises an interaction type and interaction information;
the step of obtaining corresponding interactive data by calculation according to the interactive instruction further comprises:
acquiring a calculation rule corresponding to the interaction type according to the interaction type;
calculating according to the interaction information by adopting the calculation rule to obtain corresponding interaction data;
the interaction type refers to the type of an interaction instruction and comprises an attack type, an avoidance type and a movement type;
different interactive types correspond to different calculation rules;
for the attack type, the calculation rule is to calculate the distance between an attacker and an attacked to judge whether the attack is successful or not; for the movement type, the calculation rule is to judge the current position according to the movement distance;
before the step of sending the interactive data to each terminal corresponding to the target application, the method further includes:
compressing and packaging the interactive data to obtain compressed and packaged interactive data;
acquiring terminal identifications of terminals corresponding to the target application;
the step of sending the interactive data to each terminal corresponding to the target application comprises:
according to the terminal identification of each terminal, sending the compressed and packaged interactive data to the terminal corresponding to the terminal identification, wherein the interactive instruction further comprises: a scene identifier and an application identifier;
before the step of sending the interactive data to each terminal corresponding to the target application, the method further includes:
acquiring a corresponding terminal identification set according to the scene identification and the application identification, wherein the terminal identification set comprises a plurality of terminal identifications;
the step of sending the interactive data to each terminal corresponding to the target application includes:
sending the interaction data to a terminal corresponding to each terminal identifier in the terminal identifier set, where the step of receiving an interaction instruction sent by a first terminal through a target application includes:
receiving an interactive instruction sent by a first terminal in a game scene of the game application;
the step of sending the interactive data to each terminal corresponding to the target application includes:
and sending the interactive data to each corresponding terminal of the game application in the game scene.
2. A cross-platform interaction apparatus, the apparatus comprising:
the instruction receiving module is used for receiving an interactive instruction sent by the first terminal through the target application;
the computing module is used for computing corresponding interactive data according to the interactive instruction, the interactive data are computed on the basis of a fraction code base, floating point type data in the fraction code base are represented by fractions, and numerators and denominators of the fractions are integer type data;
the obtaining of the corresponding interactive data by calculation according to the interactive instruction specifically includes:
acquiring a calculation rule corresponding to the interaction type according to the interaction type;
calculating according to the interaction information by adopting the calculation rule to obtain corresponding interaction data;
the interaction type refers to the type of an interaction instruction and comprises an attack type, an avoidance type and a movement type;
different interactive types have different corresponding calculation rules;
for the attack type, the calculation rule is to calculate the distance between an attacker and an attacked to judge whether the attack is successful; for the movement type, the calculation rule is to judge the current position according to the movement distance;
the sending module is used for sending the interactive data to each terminal corresponding to the target application so that each terminal can complete corresponding interaction according to the interactive data, and the interactive instruction comprises an interactive type and interactive information; the interaction instruction further comprises: a scene identifier and an application identifier;
before the sending the interactive data to each terminal corresponding to the target application, the method further includes:
acquiring a corresponding terminal identification set according to the scene identification and the application identification, wherein the terminal identification set comprises a plurality of terminal identifications;
the sending the interactive data to each terminal corresponding to the target application includes:
sending the interaction data to a terminal corresponding to each terminal identifier in the terminal identifier set, wherein the step of receiving an interaction instruction sent by a first terminal through a target application comprises that the target application comprises a game application:
receiving an interactive instruction sent by a first terminal in a game scene of the game application;
the sending the interactive data to each terminal corresponding to the target application includes:
sending the interactive data to each corresponding terminal of the game application in the game scene;
the calculation module is further used for acquiring a calculation rule corresponding to the interaction type according to the interaction type; calculating according to the interaction information by adopting the calculation rule to obtain corresponding interaction data;
the device further comprises:
the compression module is used for compressing and packaging the interactive data to obtain compressed and packaged interactive data;
the identification acquisition module is used for acquiring the terminal identification of each terminal corresponding to the target application;
and the sending module is further used for sending the compressed and packaged interactive data to the terminal corresponding to the terminal identification according to the terminal identification of each terminal.
3. A computer arrangement comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to carry out the steps of the method as claimed in claim 1.
4. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, causes the processor to carry out the steps of the method as claimed in claim 1.
CN201811393106.7A 2018-11-21 2018-11-21 Cross-platform interaction method and device, computer equipment and storage medium Active CN109621405B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811393106.7A CN109621405B (en) 2018-11-21 2018-11-21 Cross-platform interaction method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811393106.7A CN109621405B (en) 2018-11-21 2018-11-21 Cross-platform interaction method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109621405A CN109621405A (en) 2019-04-16
CN109621405B true CN109621405B (en) 2023-04-14

Family

ID=66068847

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811393106.7A Active CN109621405B (en) 2018-11-21 2018-11-21 Cross-platform interaction method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109621405B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905521A (en) * 2021-03-26 2021-06-04 潍坊歌尔电子有限公司 Dual-system data communication method, device, equipment and medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101645017A (en) * 2009-09-07 2010-02-10 深圳市茁壮网络股份有限公司 Cross-platform byte order processing method, device and byte code running platform
US10209986B2 (en) * 2011-12-22 2019-02-19 Intel Corporation Floating point rounding processors, methods, systems, and instructions
CN102880452A (en) * 2012-02-01 2013-01-16 日照市国软软件有限公司 Programming language capable of cross-language reusing
CN104702696B (en) * 2015-03-23 2018-08-28 北京合生共济投资咨询有限责任公司 The cross-platform instant data interactive method of one kind, device and system
CN108379833A (en) * 2018-03-05 2018-08-10 苏州蜗牛数字科技股份有限公司 The game interaction method and system for multi-user scene based on P2P computing
CN108509179B (en) * 2018-04-04 2021-11-30 百度在线网络技术(北京)有限公司 Method for detecting human face and device for generating model

Also Published As

Publication number Publication date
CN109621405A (en) 2019-04-16

Similar Documents

Publication Publication Date Title
CN107368410B (en) Performance test method and device of game engine, storage medium and electronic device
CN109621404B (en) Cross-platform interaction system, method and device, computer equipment and storage medium
CN111111167B (en) Sound effect playing method and device in game scene and electronic device
CN111659115A (en) Virtual role control method and device, computer equipment and storage medium
CN110765320B (en) Data processing method, device, storage medium and computer equipment
CN110166280A (en) A kind of network expansion method and device
CN109621405B (en) Cross-platform interaction method and device, computer equipment and storage medium
CN107659430B (en) A kind of Node Processing Method, device, electronic equipment and computer storage medium
CN111080755B (en) Motion calculation method and device, storage medium and electronic equipment
CN109985386B (en) Method and device for generating map
CN113419809B (en) Real-time interactive program interface data rendering method and equipment
CN109073398B (en) Map establishing method, positioning method, device, terminal and storage medium
CN110517414A (en) Automatic delivering method and device based on express delivery cabinet system
CN110310359A (en) The transform method and device of object state in a kind of game
CN108389124B (en) Data processing method, data processing device, computer equipment and storage medium
CN110321824B (en) Binding determination method and device based on neural network
CN109360215B (en) Method, device and equipment for searching outer contour of three-dimensional model and storage medium
CN105204883B (en) A kind of plug-in unit loading processing method and device
CN111367528A (en) Compiling method and device of software development kit, software development system and server
CN115641397A (en) Method and system for synthesizing and displaying virtual image
CN113487041B (en) Transverse federal learning method, device and storage medium
US20210224632A1 (en) Methods, devices, chips, electronic apparatuses, and storage media for processing data
CN111311150A (en) Distribution task grouping method, platform, electronic equipment and storage medium
CN112308868A (en) Image edge sawtooth point determination method, device, equipment and storage medium
CN111539592B (en) Task allocation method and device, readable storage medium and electronic equipment

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