CN114699764A - Interactive data processing method and device, electronic equipment and storage medium - Google Patents

Interactive data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114699764A
CN114699764A CN202210392125.8A CN202210392125A CN114699764A CN 114699764 A CN114699764 A CN 114699764A CN 202210392125 A CN202210392125 A CN 202210392125A CN 114699764 A CN114699764 A CN 114699764A
Authority
CN
China
Prior art keywords
key
target
user
target user
key position
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.)
Pending
Application number
CN202210392125.8A
Other languages
Chinese (zh)
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.)
Suzhou Dajiaying Information Technology Co Ltd
Original Assignee
Suzhou Dajiaying Information Technology 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 Suzhou Dajiaying Information Technology Co Ltd filed Critical Suzhou Dajiaying Information Technology Co Ltd
Priority to CN202210392125.8A priority Critical patent/CN114699764A/en
Publication of CN114699764A publication Critical patent/CN114699764A/en
Pending legal-status Critical Current

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/20Input arrangements for video game devices
    • A63F13/21Input arrangements for video game devices characterised by their sensors, purposes or types
    • A63F13/214Input arrangements for video game devices characterised by their sensors, purposes or types for locating contacts on a surface, e.g. floor mats or touch pads
    • 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/20Input arrangements for video game devices
    • A63F13/21Input arrangements for video game devices characterised by their sensors, purposes or types
    • A63F13/218Input arrangements for video game devices characterised by their sensors, purposes or types using pressure sensors, e.g. generating a signal proportional to the pressure applied by the player
    • 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/20Input arrangements for video game devices
    • A63F13/22Setup operations, e.g. calibration, key configuration or button assignment
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the application discloses an interactive data processing method and device, electronic equipment and a storage medium. The method comprises the following steps: under the condition of receiving interactive data sent by a Bluetooth peripheral, analyzing key position operation information corresponding to each user, and setting variation parameters corresponding to each user as a first preset value; continuously receiving the verification parameters fed back by the game engine according to the preset frequency, judging whether the variation parameters are a first preset value or not each time the verification parameters are received, determining the key operation state corresponding to a target user according to the key identification of the target key corresponding to the target user identification and the key operation information corresponding to the target user when the variation parameters are the first preset value, setting the variation parameters to be a second preset value, sending the key operation state corresponding to the target user to the game engine, judging whether the target user performs the key operation of the target key and adjusting the display duration of the target key.

Description

Interactive data processing method and device, electronic equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of data processing, in particular to an interactive data processing method and device, electronic equipment and a storage medium.
Background
With the development of science and technology, people develop entertainment from off-line to on-line, and particularly, the game industry is developed rapidly. Currently, many development processes are developed based on the unity3D platform and the games developed by the unity3D platform, and the game APP usually includes a unity3D game engine, which is dedicated to logic processing and screen rendering of the games. For some games requiring interaction by using a bluetooth peripheral, for example, playing and controlling the games by using a bluetooth peripheral such as a dance mat, the bluetooth interaction data is transmitted to a game engine, and the game engine completes playing and controlling the games according to the bluetooth interaction data.
In the game process, the Bluetooth is required to be ensured to be in a connection state, the terminal carrying the game APP can transmit the data to the game engine for data processing after receiving the Bluetooth interaction data, and the processing process comprises a lot of basic processing on the data and wastes the computing power of the game engine. For an application scene that a plurality of people use the same Bluetooth peripheral to play a game together, on one hand, when the plurality of people use the same Bluetooth peripheral to play the game together, interactive data corresponding to each game user is mixed in the Bluetooth interactive data, the analysis of the Bluetooth interactive data is more complicated, and the analysis efficiency of the Bluetooth interactive data is reduced; on the other hand, because the content in the related bluetooth interaction data is more, the parsing process is more time-consuming, and meanwhile, the computing power of the game engine is greatly occupied, which further causes that the game engine cannot concentrate the computing power on the processing of the game logic and the rendering of the picture, thereby causing the problem of response delay in the game process.
Disclosure of Invention
The embodiment of the application provides an interactive data processing method, an interactive data processing device, electronic equipment and a storage medium, so as to improve the analysis efficiency of Bluetooth interactive data of multiple persons and save the computing power of a game engine.
In a first aspect, an embodiment of the present application provides an interactive data processing method, which is applied to an application embedded in a game engine, where the game engine is configured to control a game module in a running state in the application, and the method includes:
under the condition of receiving interactive data sent by a Bluetooth peripheral, analyzing key position operation information corresponding to each user from the interactive data, and setting variation parameters corresponding to the users as first preset values, wherein when the variation parameters are set as the first preset values, the key position operation information of the users corresponding to the variation parameters is indicated to be changed;
continuously receiving verification parameters fed back by the game engine according to preset frequency, and judging whether the variation parameters are a first preset value or not each time the verification parameters are received, wherein the verification parameters comprise at least one user identifier and a key position identifier of a target key position corresponding to each user identifier, and the target key position is a key position to be triggered and displayed to a user identified by the corresponding user identifier;
when the variation parameter is a first preset value, for any target user identification and the target user corresponding to the target user identification, determining the key operation state corresponding to the target user according to the key identification of the target key corresponding to the target user identification and the key operation information corresponding to the target user, and setting the variation parameter to be a second preset value;
and sending the key operation state corresponding to the target user to a game engine, so that the game engine judges whether the target user performs key operation on the target key according to the key operation state and adjusts the duration of displaying the target key.
In a second aspect, an embodiment of the present application further provides an interactive data processing apparatus, where the interactive data processing apparatus includes:
the analysis module is used for analyzing the key operation information corresponding to each user from the interactive data under the condition of receiving the interactive data sent by the Bluetooth peripheral equipment, setting the variation parameter corresponding to each user as a first preset value, and indicating that the key operation information of the user corresponding to the variation parameter is changed when the variation parameter is set as the first preset value;
the judging module is used for continuously receiving verification parameters fed back by a game engine according to preset frequency, and judging whether the variation parameters are a first preset value or not when the verification parameters are received each time, wherein the verification parameters comprise at least one user identifier and a key position identifier of a target key position corresponding to each user identifier, and the target key position is a key position to be triggered and displayed to a user identified by the corresponding user identifier;
a key operation state determining module, configured to, when the variation parameter is a first preset value, determine, for any target user identifier and its corresponding target user, a key operation state corresponding to the target user according to the key identifier of the target key corresponding to the target user identifier and the key operation information corresponding to the target user, and set the variation parameter to a second preset value;
and the sending module is used for sending the key operation state corresponding to the target user to a game engine so as to enable the game engine to judge whether the target user performs key operation on the target key according to the key operation state and adjust the duration of displaying the target key.
In a third aspect, an embodiment of the present application further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device to store one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the interactive data processing method provided by any embodiment of the present application.
In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the interactive data processing method provided in any embodiment of the present application.
According to the technical scheme of the embodiment of the application, the analysis process of the interactive data is completed by other data processing threads of the application program, the analysis result is sent to the game engine embedded in the application program, and the game engine directly carries out subsequent processing according to the received interactive data analysis result, so that the game engine can concentrate limited calculation on the processing of game logic and the rendering of pictures, the calculation consumed by the game engine in the interactive data analysis process is saved, and the problem of response delay possibly occurring in the game process is avoided. In addition, for the processing of the key position operation information corresponding to each user in the interactive data, corresponding change parameters are set for each user, each time the interactive data is received, the change parameters corresponding to the corresponding user are set to be first preset values, to indicate the key position operation information corresponding to the user is changed, and at the same time, continuously receive the verification parameters fed back by the game engine according to the preset frequency, and judging whether the variation parameter is a first preset value or not every time the verification parameter is received, and only when the variation parameter is the first preset value, for any target user identification and the corresponding target user, determining the key operation state corresponding to the target user based on the verification parameter and the key operation information corresponding to the target user, and setting the variation parameter as a second preset value, and then sending the key position operation state corresponding to the target user to the game engine. The verification parameters comprise at least one user identifier and key position identifiers of the target key positions corresponding to the user identifiers, and the target key positions are the key positions to be triggered displayed for the users identified by the corresponding user identifiers, namely, when the key position operation information corresponding to the users is verified, only the operation of the target key positions needs to be verified, and compared with the prior art in which all the key positions are verified, the processing efficiency of the interactive data is higher.
Drawings
Fig. 1 is a schematic flowchart of an interactive data processing method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a double dance mat according to an embodiment of the present application;
fig. 3 is a schematic flow chart for determining key operation states according to a first embodiment of the present application;
fig. 4 is a schematic flowchart of a game engine adjusting a display duration of a target key according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an interactive data processing apparatus according to a second embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to a third embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a schematic flowchart of an interactive data processing method according to an embodiment of the present application, which is applicable to an interactive data processing scenario. The method is applied to an application program embedded with a game engine, the game engine is used for controlling a game module in a running state in the application program, can be executed by an interactive data processing device, can be realized by adopting a hardware and/or software mode, can be generally integrated in electronic equipment such as a computer with data operation capability, and specifically comprises the following steps:
step 101, under the condition of receiving interactive data sent by a Bluetooth peripheral, analyzing key position operation information corresponding to each user from the interactive data, and setting variation parameters corresponding to each user as a first preset value.
It should be noted that, when the change parameter is set to the first preset value, the key position operation information of the user corresponding to the indication change parameter is changed. The Bluetooth peripheral is a peripheral which needs to be operated when a user plays games, and the peripheral can communicate with a game running end (a mobile phone, a tablet and the like) through a built-in Bluetooth module. In one specific example, the bluetooth peripheral may be a key operated device, such as a dance mat, a game pad, and the like. For convenience of description, the embodiment is described with the dance mat as an example.
In addition, the bluetooth peripheral may support multiple people to play a game, such as a dance mat, and two game areas may be provided, please refer to fig. 2, where fig. 2 is a schematic structural diagram of a double dance mat according to an embodiment of the present disclosure.
Two game areas, namely a first game area 201 and a second game area 202, are arranged in the double dance mat and are respectively used by two users, key position operation information corresponding to the two game areas can be packaged according to a preset data format, and packaged interactive data are sent to a game running end provided with the application program through the dance mat so as to perform subsequent interactive data processing.
It should be noted that, for the key position operating device, the key position is pressed and the key position is lifted to two key position states, which correspond to different key position operating information, respectively, taking the dancing blanket as an example, in a specific example, there are 4 direction keys in the dancing blanket, which are respectively "up, down, left and right", and also a standing key, for example, "middle", and different combinations between the key positions can correspond to different key position operations.
In order to adapt the actions of the user when using the dance mat and the corresponding key operation desired to be triggered, the combination of "up" and "middle" may be adapted to let the user trigger "up key operation", that is, when the user steps one foot on the standing key of "middle" and steps the other foot on the directional key of "up", the user is considered to trigger "up key operation".
The reason for guiding the standing keys is that people are accustomed to using one foot as a supporting foot to keep the body stable and the other foot for other operations. Based on this habit, when designing the dance mat, a standing key (such as an oval foot key in the game area in fig. 2) may be provided, and the standing key may be used for the user to stand, and may also be used for the user to keep his body stable when performing key operations.
Moreover, after the standing key is introduced, the use habits of most users can be adapted, and other interferences can be filtered. For example, when the user uses the dance mat without the standing key, the user steps on a certain direction key, if a child or a pet at home steps on other direction keys, the stepping operation on the other direction keys constitutes interference during game, which is a false touch, and therefore, the key position operation information corresponding to the user cannot be accurately judged.
After the standing key is introduced, the user has generated corresponding "key up operation" after simultaneously stepping on "middle" and "up", at this time, if the pet or child steps on other keys, the combination of the key positions is "middle", "up" and "other", and since there is no matching key position operation, the combination will not be recognized. Based on the scene, the standing key is introduced to effectively filter the false touch, so that the judgment error of key position operation is effectively avoided.
When the dance mat transmits values to the game running end, in order to distinguish key position operation information corresponding to each user, different element positions can be set for different users, it should be noted that the interactive data transmitted by the dance mat is a character string array, the character string array includes a plurality of elements, and each element has a corresponding element position in the character string array.
Correspondingly, when the interactive data is analyzed, for any target user in all users, the target element position corresponding to the target user is obtained according to the preset mapping relation between the user and each element position in the character string array, then the target element corresponding to the target element position in the character string array is extracted, and the key position operation information corresponding to the target user is generated according to the target element.
In a specific example, taking two users as an example, it is possible to set the element with the odd number of element positions as the key operation information corresponding to the user 1, and the element with the even number of element positions as the key operation information corresponding to the user 2. Then for user 1, a singular element position may be determined as the user's corresponding target element position, and for user 2, an even element position may be determined as the user's corresponding target element position.
Of course, the maximum number of users that different bluetooth peripherals can support the common operation is different, and therefore, when determining the target element position, the user identifier N corresponding to the target user may be obtained first, where N is 1, 2, 3, and N is the maximum number of users that the bluetooth peripherals support the common operation, and then the product of the user identifier N and the element M is determined as the target element position corresponding to the target user N, where M is 1, 2, 3.
Still taking the two users as examples, it should be noted that, when setting the user identifier, the user identifier may be sequentially set according to positive integers from small to large (i.e., 1, 2, 3, 4, 5.. eta.), for the user identifier 1, if a first element corresponding to the user identifier 1, that is, an element 1, is to be obtained, an element position of the element 1 corresponding to the user identifier 1 in the character string array is a product of 1 and 1, that is, an element position 1, and an element position of the element 2 corresponding to the user identifier 1 in the character string array is a product of 1 and 2, that is, an element position 2; the element position of the element 2 corresponding to the user identifier 2 in the character string array is the product of 2 and 2, i.e. the element position 4.
It should be noted that the maximum number of users that different bluetooth peripherals can support the common operation is different, that is, the N values corresponding to different bluetooth peripherals are different, so that the type of the bluetooth peripheral can be determined first, and then the N value corresponding to the bluetooth peripheral that is currently interacting with the game running end is determined according to the mapping relationship between the type of the bluetooth peripheral and the N value that is prestored.
Specifically, an element at a certain fixed element position in the interactive data may be set as the peripheral type determination element, and since the element position of an element in the character string array usually starts from the sequence number 0, the element position of the sequence number 0 may be set as the element position of the peripheral type determination element.
Therefore, the peripheral type judgment element is firstly analyzed from the interactive data, then the type of the Bluetooth peripheral is determined according to the peripheral type judgment element, and then the N value corresponding to the currently interactive Bluetooth peripheral is determined according to the mapping relation between the type of the Bluetooth peripheral and the N value which are prestored.
In addition, in this step, the key position operation information corresponding to the target user can be generated according to the target element in a single data transmission mode, wherein the single data transmission means that data at one position in the character string array represents a transmitted value.
Since the interactive data may contain other information, such as hardware information, in addition to the key operation information corresponding to the user, in a specific example, for an element of 16-bit data, the key operation information is generally set at the lower 8 bits, and the other information is set at the upper 8 bits, so that when the key operation information corresponding to the target user is generated according to the target element, the preset extraction value and the target element may be used to perform an and operation, so as to extract the data at the lower 8 bits as the key operation information.
It should be noted that the preset extraction value may be 16-bit 0xff, and the binary expression is "0000000011111111".
Based on the above process, the key position operation information corresponding to each user can be extracted. In order to improve the efficiency of data processing, the present embodiment introduces a variation parameter, and it should be noted that, the present embodiment sets a corresponding variation parameter for each user to indicate whether the key operation information corresponding to the user is changed.
It should be noted that, the bluetooth peripheral generally sends the interactive data only when the key position changes, specifically, because the bluetooth peripheral in this embodiment, the pressed and lifted keys correspond to different key positions respectively, when the user changes from operating a certain key position to operating another key position, the situation of lifted key position inevitably occurs, even if continuously operating a certain key position twice, the user needs to press again after the lifted key position, and the key position operation information corresponding to lifted key position is different from the key position operation information corresponding to pressed key position.
If the operation of pressing a certain key by the user is set as the effective operation, based on the above reasons, the corresponding interactive data of the key operation information corresponding to the two successive effective operations of the user is 3, that is, the key operation information corresponding to the "effective operation", the key operation information corresponding to the "key lifting", and the key operation information corresponding to the "next effective operation".
That is to say, the interactive data sent each time is changed compared with the previous interactive data, therefore, in this step, once the interactive data is received, after the key manipulation information corresponding to each user is analyzed, the change parameter corresponding to the user is set to be the first preset value, and the first preset value indicates that the key manipulation information of the user corresponding to the change parameter is changed.
It should be noted that the variation parameter is usually one of two values, which are respectively a first preset value and a second preset value, where the first preset value indicates that the key operation information of the user corresponding to the variation parameter is changed, and the second preset value indicates that the key operation information of the user corresponding to the variation parameter is not changed.
And 102, continuously receiving the verification parameters fed back by the game engine according to the preset frequency, and judging whether the change parameters are the first preset value every time the verification parameters are received.
In this step, the verification parameters include at least one user identifier and a key identifier of a target key corresponding to each user identifier, where the target key is a key to be triggered displayed to the user identified by the corresponding user identifier.
The game engine feeds back the verification parameters according to the preset frequency, specifically, when the game engine controls the game logic of the game, the game engine calculates the target key position displayed to the user each time so that the user can operate the target key position on the Bluetooth peripheral equipment, in order to improve the analysis efficiency of the interactive data, the game engine packages the key position identification corresponding to the target key position and the user identification of the user needing to operate as the verification parameters, and the verification parameters are continuously fed back at the preset frequency during the display period of the target key position.
Each time the verification parameter of the game engine is received, the application program determines whether the variation parameter corresponding to the corresponding user is the first preset value, and if the variation parameter is the first preset value, the contents of the subsequent step 103 are executed.
And 103, when the variation parameter is the first preset value, for any target user identifier and the target user corresponding to the target user identifier, determining the key operation state corresponding to the target user according to the key identifier of the target key corresponding to the target user identifier and the key operation information corresponding to the target user, and setting the variation parameter as a second preset value.
In this step, the key operation state may include an operation decision value and an operation velocity value, and specifically, the process of determining the key operation state may refer to fig. 3, where fig. 3 is a schematic flow chart of determining the key operation state provided in the first embodiment of the present application.
As shown in fig. 3, the process of determining the key operation state may include:
step 301, judging whether the key identifier of the target key corresponding to the target user identifier is matched with the key operation information corresponding to the target user, obtaining a judgment result, and determining an operation judgment value corresponding to the target user according to the judgment result.
It should be noted that this step may be determined by using swich statement. The switch statement may include a plurality of program blocks, each program block may correspond to a corresponding program block label, each program block determines an operation decision value of a key position, and when the operation decision value is determined, the operation decision value is determined based on a key position identifier of a corresponding key position.
Correspondingly, the verification parameters fed back by the game engine comprise key position identification of the target key position, and the key position identification can be used as an integer variable in brackets of the switch statement, and the switch statement can execute a program block with the program block label as the integer variable. That is to say, in this embodiment, only the program block corresponding to the key identifier of the target key is executed, and compared with the manner in the prior art in which each key is determined, the manner in this embodiment can improve the efficiency of determining the key to a certain extent, thereby improving the efficiency of processing the interactive data.
In addition, "match" in this step means the same or corresponding. Specifically, when the same, the mark number of the program block needs to be directly set as the mark corresponding to each aforementioned key operation, and the key mark also needs to be set as the mark corresponding to each aforementioned key operation.
For the corresponding mode, the mapping relation between the key identification and the key operation needs to be established, and if the mapping relation exists between the key identification and the key operation information, the key identification of the target key corresponding to the target user identification is determined to be matched with the key operation information corresponding to the target user.
It should be noted that, when determining the operation decision value according to the decision result, if the key identification of the target key corresponding to the target user identification matches with the key operation information corresponding to the target user, setting the operation decision value as a first decision value indicating that the target user has performed the key operation on the target key;
if the key position identification of the target key position corresponding to the target user identification is not matched with the key position operation information corresponding to the target user, setting the operation judgment value as a second judgment value, wherein the second judgment value indicates that the target user does not perform the key position operation on the target key position.
It should be noted that, both the first decision value and the second decision value can be predefined, as long as the mapping relationship is set between the predefined value and "whether to perform key operation" and the game engine can determine whether the target user performs key operation on the target key according to the mapping relationship.
Step 302, obtaining a reference time and a comparison time of the key operation information corresponding to the current analysis target user, wherein the comparison time includes: and analyzing the first time of the key position operation information corresponding to the target user or determining the second time of the operation judgment value.
And step 303, determining an operation speed value corresponding to the target user according to the reference time and the comparison time.
It should be noted that there may be two ways for determining the operation speed value, one is to represent the speed of the user operating the bluetooth peripheral, and the other is to represent the reaction speed of the user operating according to the displayed target key position.
For the first, the time for analyzing the key manipulation information corresponding to the target user this time may be taken as a reference time, the time for analyzing the key manipulation information corresponding to the target user the previous time is taken as a first reference time, then a time difference between the reference time and the first reference time is determined, and an inverse of the time difference is determined as an operation velocity value corresponding to the target user, the operation velocity value being used for representing the number of operations per unit time of the target user.
For the second kind, the time for analyzing the key operation information corresponding to the target user at this time may be taken as a reference time, the time for determining the operation determination value at this time is taken as a second reference time, then a time difference between the reference time and the second reference time is determined, and a reciprocal of the time difference is determined as an operation velocity value corresponding to the target user, where the operation velocity value is used to indicate the number of operations per unit time of the target user.
Taking the first comparison time as an example, if the acquired reference time is 2022-03-22-08-33-45-050 and the first comparison time is 2022-03-22-08-33-43-650, the time difference between the two times is 400 ms in 1 second, that is, 1400 ms, that is, the difference between the two times is 1400 ms, and the number of operations in a unit time (taking ms as an example), that is, the operation speed value is 1/1400.
And step 304, packaging the operation judgment value and the operation speed value into a key position operation state corresponding to the target user.
In this step, the data format of the package corresponds to the analysis mode of the game engine for analyzing the data, and for the data packaging process, reference may be made to the related technology, which is not described herein again.
And 104, sending the key operation state corresponding to the target user to the game engine, so that the game engine judges whether the target user performs key operation on the target key according to the key operation state and adjusts the duration of displaying the target key.
In this step, after sending the key operation state to the game engine, the game engine will determine whether the user has performed the key operation on the target key according to the mapping relationship between the pre-established operation decision value and "whether to perform the operation".
Further, the duration of displaying the target key position can be adjusted according to the operating speed value. Specifically, referring to fig. 4, fig. 4 is a schematic flow chart illustrating that the game engine adjusts the display duration of the target key position according to an embodiment of the present application.
As shown in fig. 4, the process of the game engine adjusting the display duration of the target key position may include:
step 401, the game engine determines a target speed interval where the operation speed value is located based on a preset speed interval table.
In this step, the preset speed interval table may be as shown in table 1.
TABLE 1
Operating speed value (times/second) Speed interval
0 to 0.5 (none) [0,0.5)
Between 0.5 and 1 (none) [0.5,1)
1 to 1.5 (none inclusive) [1,1.5)
...... ......
In a specific example, if the operation speed value of the target user is 1.2 times/second, it can be known from table 1 that the corresponding target speed interval is [1, 1.5 ].
Step 402, the game engine determines a target display duration corresponding to the target speed interval according to a preset mapping relationship between the speed interval and the display duration.
In this step, the mapping relationship between the preset speed interval and the display duration may be as shown in table 2.
TABLE 2
Figure BDA0003596092060000141
Figure BDA0003596092060000151
If the target speed interval is [1, 1.5 ], it can be known from table 2 that the target display time length corresponding to the target speed interval is 0.8 seconds.
Step 403, the game engine adjusts the duration of displaying the target key to the duration of displaying the target key.
The step can adjust the time length for displaying the target key position to the target user to be 0.8 second.
In addition, the game engine needs to perform condition judgment from the display of the current target key position to the triggering of the next display of the target key position, for example, the condition judgment may be to judge whether the display duration of the current target key position reaches the target display duration, or the condition judgment may also be to judge whether the key position operation state corresponding to the target user is received within the target display duration, and the operation judgment value in the key position operation state is the first judgment value.
It should be noted that, within the target display duration, if the key operation state corresponding to the target user is received and the operation decision value in the key operation state is the first decision value, it indicates that the user has correctly performed the key operation on the target key according to the displayed key to be triggered within the target display duration, and as long as one of the above two conditions is satisfied, the next display of the target key can be triggered, which is specifically as follows:
when the display duration of the current target key position reaches the target display duration, the game engine triggers the next display of the target key position;
or, within the target display duration, receiving the key operation state corresponding to the target user, and under the condition that the operation judgment value in the key operation state is the first judgment value, triggering the next display of the target key by the game engine, wherein the first judgment value indicates that the target user performs the key operation on the target key.
In this embodiment, the analysis process of the interactive data is completed by other data processing threads of the application program, and then the analysis result is sent to the game engine embedded in the application program, and the game engine directly performs subsequent processing according to the received interactive data analysis result, so that the game engine can concentrate limited calculation power on the processing of the game logic and the rendering of the picture, thereby saving the calculation power consumed by the game engine in the process of processing the interactive data, and avoiding the problem of response delay possibly occurring in the game process. In addition, for the processing of the key position operation information corresponding to each user in the interactive data, corresponding change parameters are set for each user, each time the interactive data is received, the change parameters corresponding to the corresponding user are set to be a first preset value, to indicate the key position operation information corresponding to the user is changed, and at the same time, continuously receive the verification parameters fed back by the game engine according to the preset frequency, and judging whether the variation parameter is a first preset value or not every time the verification parameter is received, and only when the variation parameter is the first preset value, for any target user identification and the corresponding target user, determining the key operation state corresponding to the target user based on the verification parameter and the key operation information corresponding to the target user, and setting the variation parameter as a second preset value, and then sending the key position operation state corresponding to the target user to the game engine. The verification parameters comprise at least one user identifier and the key position identifier of the target key position corresponding to each user identifier, and the target key position is the key position to be triggered displayed to the user identified by the corresponding user identifier.
Example two
Fig. 5 is a schematic structural diagram of an interactive data processing apparatus according to a second embodiment of the present application. The interactive data processing device provided by the embodiment of the application can execute the interactive data processing method provided by any embodiment of the application, and has corresponding functional modules and beneficial effects of the execution method. The apparatus may be implemented in software and/or hardware, and as shown in fig. 5, the interactive data processing apparatus specifically includes:
the analyzing module 501 is configured to, in a case that interactive data sent by a bluetooth peripheral is received, analyze key operation information corresponding to each user from the interactive data, and set a variation parameter corresponding to each user as a first preset value, where the variation parameter indicates that the key operation information of the user corresponding to the variation parameter changes when the variation parameter is set as the first preset value;
the judging module 502 is used for continuously receiving verification parameters fed back by the game engine according to preset frequency, and judging whether the variation parameters are a first preset value or not each time the verification parameters are received, wherein the verification parameters comprise at least one user identifier and a key position identifier of a target key position corresponding to each user identifier, and the target key position is a key position to be triggered displayed to a user identified by the corresponding user identifier;
a key operation state determining module 503, configured to, for any target user identifier and its corresponding target user, determine, according to the key identifier of the target key corresponding to the target user identifier and the key operation information corresponding to the target user, a key operation state corresponding to the target user, and set the variation parameter to a second preset value when the variation parameter is the first preset value;
the sending module 504 is configured to send the key operation state corresponding to the target user to the game engine, so that the game engine judges whether the target user performs the key operation on the target key according to the key operation state, and adjusts a duration of displaying the target key.
EXAMPLE III
Fig. 6 is a schematic structural diagram of an electronic device according to a third embodiment of the present application, as shown in fig. 6, the electronic device includes a processor 610, a memory 620, an input device 630, and an output device 640; the number of the processors 610 in the electronic device may be one or more, and one processor 610 is taken as an example in fig. 6; the processor 610, the memory 620, the input device 630, and the output device 640 in the electronic apparatus may be connected by a bus or other means, and fig. 6 illustrates an example of connection by a bus.
The memory 620 serves as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the interactive data processing method in the embodiments of the present invention. The processor 610 executes various functional applications and data processing of the electronic device by executing software programs, instructions and modules stored in the memory 620, that is, implements the above-described interactive data processing method:
under the condition of receiving interactive data sent by a Bluetooth peripheral, analyzing key position operation information corresponding to each user from the interactive data, setting variation parameters corresponding to each user as first preset values, and indicating that the key position operation information of the user corresponding to the variation parameters is changed when the variation parameters are set as the first preset values;
continuously receiving verification parameters fed back by the game engine according to preset frequency, judging whether the variation parameters are a first preset value or not when the verification parameters are received each time, wherein the verification parameters comprise at least one user identifier and key position identifiers of target key positions corresponding to the user identifiers respectively, and the target key positions are key positions to be triggered displayed by users identified by the corresponding user identifiers;
when the variation parameter is a first preset value, for any target user identification and the target user corresponding to the target user identification, determining the key operation state corresponding to the target user according to the key identification of the target key corresponding to the target user identification and the key operation information corresponding to the target user, and setting the variation parameter as a second preset value;
and sending the key operation state corresponding to the target user to the game engine, so that the game engine judges whether the target user performs the key operation on the target key according to the key operation state and adjusts the duration of displaying the target key.
The memory 620 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 620 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 620 can further include memory located remotely from the processor 610, which can be connected to an electronic device through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Example four
A fourth embodiment of the present application further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method for interactive data processing, the method including:
under the condition of receiving interactive data sent by a Bluetooth peripheral, analyzing key position operation information corresponding to each user from the interactive data, setting variation parameters corresponding to each user as first preset values, and indicating that the key position operation information of the user corresponding to the variation parameters is changed when the variation parameters are set as the first preset values;
continuously receiving verification parameters fed back by the game engine according to preset frequency, judging whether the variation parameters are a first preset value or not each time the verification parameters are received, wherein the verification parameters comprise at least one user identifier and a key position identifier of a target key position corresponding to each user identifier, and the target key position is a key position to be triggered and displayed to a user identified by the corresponding user identifier;
when the variation parameter is a first preset value, for any target user identification and the corresponding target user, determining the key operation state corresponding to the target user according to the key identification of the target key corresponding to the target user identification and the key operation information corresponding to the target user, and setting the variation parameter as a second preset value;
and sending the key operation state corresponding to the target user to the game engine, so that the game engine judges whether the target user performs the key operation on the target key according to the key operation state and adjusts the duration of displaying the target key.
Of course, the storage medium provided in the embodiments of the present application contains computer-executable instructions, and the computer-executable instructions are not limited to the above method operations, and may also perform related operations in the interactive data processing method provided in any embodiments of the present application.
From the above description of the embodiments, it is obvious for those skilled in the art that the present application can be implemented by software and necessary general hardware, and certainly can be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods of the embodiments of the present application.
It should be noted that, in the embodiment of the above search apparatus, each included unit and module are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the application.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. Those skilled in the art will appreciate that the present application is not limited to the particular embodiments described herein, and that various obvious changes, rearrangements and substitutions will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims (11)

1. An interactive data processing method, which is applied to an application embedded with a game engine, wherein the game engine is used for controlling a game module in a running state in the application, and the method comprises the following steps:
under the condition of receiving interactive data sent by a Bluetooth peripheral, analyzing key position operation information corresponding to each user from the interactive data, and setting variation parameters corresponding to the users as first preset values, wherein when the variation parameters are set as the first preset values, the key position operation information of the users corresponding to the variation parameters is indicated to be changed;
continuously receiving verification parameters fed back by the game engine according to preset frequency, and judging whether the variation parameters are a first preset value or not each time the verification parameters are received, wherein the verification parameters comprise at least one user identifier and a key position identifier of a target key position corresponding to each user identifier, and the target key position is a key position to be triggered and displayed to a user identified by the corresponding user identifier;
when the variation parameter is a first preset value, for any target user identification and the target user corresponding to the target user identification, determining the key operation state corresponding to the target user according to the key identification of the target key corresponding to the target user identification and the key operation information corresponding to the target user, and setting the variation parameter to be a second preset value;
and sending the key operation state corresponding to the target user to a game engine, so that the game engine judges whether the target user performs key operation on the target key according to the key operation state and adjusts the duration of displaying the target key.
2. The method of claim 1, wherein the interaction data is a string array, and wherein the string array comprises a plurality of elements;
the analyzing of the key position operation information corresponding to each user from the interactive data includes:
for any target user in all users, acquiring a target element position corresponding to the target user according to a preset mapping relation between the user and each element position in the character string array;
and extracting a target element corresponding to the target element position in the character string array, and generating key position operation information corresponding to the target user according to the target element.
3. The method according to claim 2, wherein the obtaining a target element position corresponding to the target user according to a preset mapping relationship between the user and each element position in the character string array comprises:
acquiring a user identifier N of the target user, wherein N is 1, 2, 3.
Determining a product of a user identifier n and an element M as a target element position corresponding to the target user n, wherein M is 1, 2, 3.
4. The method according to claim 1, wherein the key-operated state includes an operation determination value and an operation velocity value;
the determining the key operation state corresponding to the target user according to the key identifier of the target key corresponding to the target user identifier and the key operation information corresponding to the target user includes:
judging whether the key position identification of the target key position corresponding to the target user identification is matched with the key position operation information corresponding to the target user to obtain a judgment result, and determining an operation judgment value corresponding to the target user according to the judgment result;
acquiring the reference time and the comparison time for analyzing the key position operation information corresponding to the target user at this time, wherein the comparison time comprises: analyzing a first comparison moment of key position operation information corresponding to the target user at the previous time or determining a second comparison moment of the operation judgment value at the current time;
determining an operation speed value corresponding to the target user according to the reference moment and the comparison moment;
and packaging the operation judgment value and the operation speed value into a key position operation state corresponding to the target user.
5. The method according to claim 4, wherein said determining an operation determination value according to the determination result includes:
if the key position identification of the target key position corresponding to the target user identification is matched with the key position operation information corresponding to the target user, setting the operation judgment value as a first judgment value, wherein the first judgment value indicates that the target user performs key position operation on the target key position;
if the key position identification of the target key position corresponding to the target user identification is not matched with the key position operation information corresponding to the target user, setting the operation judgment value as a second judgment value, wherein the second judgment value indicates that the target user does not perform key position operation on the target key position.
6. The method of claim 4, wherein said determining an operating speed value from said reference time and said any comparison time comprises:
and determining a time difference value between the reference time and any comparison time, and determining the reciprocal of the time difference value as an operation speed value corresponding to the target user, wherein the operation speed value is used for representing the operation times of the target user in unit time.
7. The method according to claim 1, wherein the key operation state corresponding to the target user comprises an operation velocity value corresponding to the target user;
the game engine adjusts the duration of displaying the target key position according to the key position operation state, and the method comprises the following steps:
the game engine judges a target speed interval where the operation speed value is based on a preset speed interval table;
the game engine determines a target display duration corresponding to the target speed interval according to a preset mapping relation between the speed interval and the display duration;
and the game engine adjusts the duration of displaying the target key position into the target display duration.
8. The method according to claim 7, wherein the key-operated state includes an operation decision value, the method further comprising:
when the display duration of the current target key position reaches the target display duration, the game engine triggers the next display of the target key position;
or, within the target display duration, receiving a key operation state corresponding to a target user, and under the condition that an operation judgment value in the key operation state is a first judgment value, triggering the display of the next target key by the game engine, wherein the first judgment value indicates that the target user performs the key operation on the target key.
9. An interactive data processing apparatus, characterized in that the apparatus comprises:
the analysis module is used for analyzing the key operation information corresponding to each user from the interactive data under the condition of receiving the interactive data sent by the Bluetooth peripheral equipment, setting the variation parameter corresponding to each user as a first preset value, and indicating that the key operation information of the user corresponding to the variation parameter is changed when the variation parameter is set as the first preset value;
the judging module is used for continuously receiving verification parameters fed back by a game engine according to preset frequency, and judging whether the variation parameters are a first preset value or not when the verification parameters are received each time, wherein the verification parameters comprise at least one user identifier and a key position identifier of a target key position corresponding to each user identifier, and the target key position is a key position to be triggered and displayed to a user identified by the corresponding user identifier;
a key operation state determining module, configured to, when the variation parameter is a first preset value, determine, for any target user identifier and its corresponding target user, a key operation state corresponding to the target user according to the key identifier of the target key corresponding to the target user identifier and the key operation information corresponding to the target user, and set the variation parameter to a second preset value;
and the sending module is used for sending the key operation state corresponding to the target user to a game engine so as to enable the game engine to judge whether the target user performs key operation on the target key according to the key operation state and adjust the duration of displaying the target key.
10. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the interactive data processing method of any one of claims 1-8.
11. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the interactive data processing method according to any one of claims 1 to 8.
CN202210392125.8A 2022-04-14 2022-04-14 Interactive data processing method and device, electronic equipment and storage medium Pending CN114699764A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210392125.8A CN114699764A (en) 2022-04-14 2022-04-14 Interactive data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210392125.8A CN114699764A (en) 2022-04-14 2022-04-14 Interactive data processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114699764A true CN114699764A (en) 2022-07-05

Family

ID=82174855

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210392125.8A Pending CN114699764A (en) 2022-04-14 2022-04-14 Interactive data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114699764A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115970265A (en) * 2022-09-19 2023-04-18 广州小鸡快跑网络科技有限公司 Optimization method and system based on game peripheral control interaction engine

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115970265A (en) * 2022-09-19 2023-04-18 广州小鸡快跑网络科技有限公司 Optimization method and system based on game peripheral control interaction engine

Similar Documents

Publication Publication Date Title
CN107045508B (en) Application program processing method and device
CN108614722A (en) Application program preloads method, apparatus, storage medium and terminal
CN110548281A (en) virtual key pressing method based on cloud game terminal
CN101380519B (en) Input terminal emulator for gaming devices
CN106855782A (en) A kind of method for preventing false touch, device and terminal
CN108089977B (en) Application program exception handling method and device and mobile terminal
CN106681638A (en) Method, device and mobile terminal for controlling touch screen
CN103272382A (en) Method and device for using Bluetooth gamepad to simulate intelligent terminal touch screen to control game
CN106598249A (en) Wrong touch prevention method and device for touch key, and mobile terminal
WO2022247540A1 (en) Device control method and apparatus, and computer device and storage medium
CN114699764A (en) Interactive data processing method and device, electronic equipment and storage medium
CN108391253B (en) application program recommendation method and mobile terminal
CN104898839A (en) Terminal device and control method thereof
CN111160157B (en) Text extraction method based on DWG drawing and related products
CN106791226B (en) Call fault detection method and system
CN109885233B (en) Screen content identification method and device, electronic equipment and storage medium
CN114470769B (en) Interactive data processing method and device, electronic equipment and storage medium
CN106708410A (en) Method and device for preventing spurious triggering of touch keys and terminal
CN111225040A (en) Clothes airing monitoring method and device, storage medium and electronic equipment
CN109107148A (en) control method, device, storage medium and mobile terminal
CN211025083U (en) Game equipment is felt to wall body based on monocular camera gesture control
KR20060104777A (en) Method and computer readable medium for displaying game menu screen by flash in on-line game
CN113413590A (en) Information verification method and device, computer equipment and storage medium
CN100474392C (en) String display system and string display method
CN113230649A (en) Display control method and device

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