Data transmission method and device and electronic equipment
By processing and color-coded data in the graphical user interface of the game client and using the rendering area for data transmission, the problem that the game client cannot communicate directly with the external system is solved, and safe and reliable external data transmission is achieved.
Patent Information
- Application Number
- CN202411140126.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-08-19
AI Technical Summary
Existing game clients cannot realize direct communication with external systems without client source code, traditional network communication methods cannot meet the needs of users to transmit external data, and there are security mechanism restrictions.
By responding to specified operations in the graphical user interface of the game client, data to be sent is generated, and data is processed and color-coded, and the rendering area displays the color signal for data transmission. The receiving client reads and decodes the signal from the rendering area and decodes it. to complete data transmission.
On the premise of ensuring data security, data encoding and transmission between the game client and the external system is realized, meeting the user's needs for transmitting external data, and overcoming the communication limitations of the prior art.
Smart Images

Figure CN119254850A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of network communication technology, and in particular to a data transmission method, device and electronic device. Background Art
[0002] In the game client, users want to communicate with the game client without the client source code, but the game client design strictly restricts communication with the outside world. Existing communication methods are limited to the chat and mail systems within the game, which cannot meet the user's needs for transmitting external data. In addition, due to the game's security mechanism, traditional network communication methods cannot achieve direct interaction with external systems within the game client. Summary of the invention
[0003] The purpose of the present disclosure is to provide a data transmission method, device and electronic device to achieve direct interaction with an external system within a game client while ensuring data security.
[0004] In a first aspect, the present disclosure provides a data transmission method, which displays a graphical user interface corresponding to a game client through a terminal device, and the method includes: generating data to be sent in response to a specified trigger operation; segmenting the data to be sent to obtain multiple sub-data corresponding to the data to be sent; wherein the length of the sub-data is a preset data length; color-coding the sub-data for the multiple sub-data to obtain color signals corresponding to the sub-data; displaying the color signals corresponding to the multiple sub-data in a rendering area in the graphical user interface in sequence, so that the receiving client reads the color signal from the rendering area, converts the color signal into corresponding data to be sent, and returns a response signal; receiving the response signal, and executing a preset behavior based on the response signal.
[0005] In a second aspect, the present disclosure provides a data transmission device, which displays a graphical user interface corresponding to a game client through a terminal device, and the device includes: a data generation module, which is used to generate data to be sent in response to a specified trigger operation; a data segmentation module, which is used to segment the data to be sent to obtain multiple sub-data corresponding to the data to be sent; wherein the length of the sub-data is a preset data length; a data encoding module, which is used to color-code the sub-data for multiple sub-data to obtain color signals corresponding to the sub-data; a data display module, which is used to display the color signals corresponding to the multiple sub-data in a rendering area in the graphical user interface in sequence, so that the receiving client reads the color signal from the rendering area, converts the color signal into the corresponding data to be sent, and returns a response signal; a signal receiving module, which is used to receive the response signal and execute a preset behavior based on the response signal.
[0006] In a third aspect, the present disclosure provides an electronic device, which includes a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above-mentioned data transmission method.
[0007] In a fourth aspect, the present disclosure provides a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned data transmission method.
[0008] The embodiments of the present disclosure bring the following beneficial effects:
[0009] The present disclosure provides a data transmission method, device and electronic device, which first generates data to be sent by a game client in response to a specified trigger operation; then the data to be sent is segmented to obtain multiple sub-data corresponding to the data to be sent; wherein the length of the sub-data is a preset data length; for multiple sub-data, the sub-data is color-coded to obtain a color signal corresponding to the sub-data; then the color signals corresponding to the multiple sub-data are sequentially displayed in a rendering area in a graphical user interface, so that the receiving client reads the color signal from the rendering area, converts the color signal into the corresponding data to be sent, and returns a response signal; then receives the response signal, and performs a preset behavior based on the response signal. In this method, data transmission is performed through the color signal displayed in the rendering area in the graphical user interface, and data encoding and transmission with an external system can be realized in the game client, thereby meeting the user's needs for transmitting external data.
[0010] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present disclosure.
[0011] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, the following specifically cites preferred implementation modes and describes them in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0013] Figure 1 A flowchart of a data transmission method provided by an embodiment of the present disclosure;
[0014] Figure 2 A flowchart of data transmission provided by an embodiment of the present disclosure;
[0015] Figure 3 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present disclosure;
[0016] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. The components of the embodiments of the present disclosure described and shown in the drawings here can be arranged and designed in various different configurations.
[0018] Therefore, the following detailed description of the embodiments of the present disclosure provided in the accompanying drawings is not intended to limit the scope of the present disclosure claimed for protection, but merely represents selected embodiments of the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present disclosure.
[0019] In order to facilitate understanding of the embodiment of the present invention, a data transmission method provided by the embodiment of the present invention is first described in detail. The graphical user interface corresponding to the game client is displayed by the terminal device, such as Figure 1 As shown, the method comprises the following specific steps:
[0020] Step S102: generating data to be sent in response to a specified trigger operation.
[0021] In specific implementation, the specific operation corresponding to the above-mentioned designated trigger operation can be determined according to R&D requirements and game rules. For example, the designated trigger operation can be an operation to trigger a certain control displayed in a graphical user interface, or an operation to trigger a certain key displayed on a keyboard, etc. When the user executes the designated trigger operation, the data to be sent will be generated based on the current game data and / or the designated trigger operation. Usually, different designated trigger operations correspond to different rules for generating data to be sent, and the rules for generating data to be sent corresponding to the designated trigger operation are pre-set.
[0022] Step S104, segmenting the data to be sent to obtain a plurality of sub-data corresponding to the data to be sent; wherein the length of the sub-data is a preset data length.
[0023] In specific implementation, after the data to be sent is generated, it is necessary to segment the data to be sent and ensure that the length of each segment of data (equivalent to the above sub-data) is fixed to the preset data length. If the length of the last segment of data is less than the preset data length, it can be padded with 0. The specific length corresponding to the above preset data length can be determined according to research and development requirements. For example, the preset data length can be three bytes or four bytes.
[0024] Step S106 , color-coding the sub-data to obtain color signals corresponding to the sub-data.
[0025] After the data to be sent is segmented into multiple sub-data, color coding technology is needed to color-code each sub-data to obtain the color signal corresponding to each sub-data. The sub-data includes multiple characters, each character corresponds to a specific color value, and this color value is related to the binary number corresponding to the character. The color signal corresponding to each sub-data is sorted in the order of writing, and the color signal corresponding to the data to be sent can be obtained.
[0026] Step S108, color signals corresponding to the plurality of sub-data are sequentially displayed in a rendering area of the graphical user interface, so that the receiving client reads the color signal from the rendering area, converts the color signal into corresponding data to be sent, and returns a response signal.
[0027] The color signals corresponding to the multiple sub-data are displayed in the rendering area of the graphical user interface in the order in which they are written, and the data transmission of the game client can be completed. In the specific implementation, the rendering area is created when the system is initialized. The maximum range and display position of this rendering area are pre-set and can be determined according to user needs or R&D needs. The rendering area includes multiple signal frames, each of which is used to display a color signal.
[0028] The receiving client will cyclically read the contents in the rendering area of the graphical user interface. After the receiving client reads the color signal displayed in the rendering area, it will reversely parse the color signal to restore the original data to be sent. After the parsing of the data to be sent is completed, a response signal will be sent to the game client to notify the game client that the data reception is complete.
[0029] Step S110, receiving a response signal, and executing a preset action based on the response signal.
[0030] After receiving the response signal, the game client will execute the preset behavior, which can be determined according to the game rules. The preset behavior includes but is not limited to: deleting the color signal in the rendering area and uploading the color signal corresponding to the new data to be sent, and triggering the corresponding processing function for processing based on the specific events occurring in the game. Usually, different specific events correspond to different processing functions. For example, if the game room number is used as the data to be sent, when the player clicks a certain control, the game room number will be converted into a color signal. After the receiving client reads the color signal, it parses the color signal to obtain the game room number, and then returns a response signal of successful data reading. After receiving the response signal, the game client closes the game room based on the processing function.
[0031] A data transmission method provided by an embodiment of the present invention performs data transmission through color signals displayed in a rendering area in a graphical user interface, and can implement data encoding and transmission with an external system in a game client, thereby meeting the user's needs for transmitting external data.
[0032] The following example is used to describe the manner in which data is segmented and color-coded.
[0033] Specifically, after the data to be sent is generated, it is necessary to segment the data to be sent to obtain multiple sub-data; wherein the preset data length corresponding to the sub-data matches the number of color channels corresponding to the color signal; and each character in the sub-data corresponds to a color channel.
[0034] In a specific implementation, each color signal contains the same number of color channels. For example, the color signal may contain three color channels, namely, the R channel, the G channel, and the B channel, or four color channels, namely, the R channel, the G channel, the B channel, and the A channel. If the color signal contains three color channels, each sub-data segment in the data to be sent needs to be divided into three characters, each character corresponding to one color channel, so as to obtain the color signal corresponding to each sub-data after color encoding the characters. The color signal may also be called a color value.
[0035] In practical applications, true color means that each pixel value in the image is divided into three primary color components (R, G, and B) (equivalent to three color channels), and each primary color component directly determines the intensity of its primary color. The color produced in this way is called true color. True color images are a computer image storage method that uses three or more bytes to describe pixels.
[0036] The following is an introduction to color coding. Computers also use binary to represent colors. The total number of colors that can be generated by 16-bit color is 65,536, which is 2 to the 16th power. 24-bit color is called true color, which can reach the limit of human eye resolution, and the number of colors is more than 16.77 million, which is 2 to the 24th power. However, 32-bit color is not 2 to the 32nd power. It is actually more than 16.77 million colors, but it adds 256 levels of grayscale. For the convenience of calling it, it is defined as 32-bit color. A small number of graphics cards can achieve 36-bit color, which is 24-bit color plus 512 levels of grayscale. Among them, when using two monitors of the same brand and model to distinguish different colors, the naked eye can see the difference between 32-bit color and 16-bit color, but it is more difficult to distinguish the difference when just one machine is repeatedly converted. If you are using WINDOWS XP, there is an interface with the words "Welcome" when WINDOWS starts up. The blue transition there is very easy to see the difference. The color transition of 16-bit color is easily seen to be layered and unnatural; while using 32-bit color is quite soft and the transition is very natural.
[0037] True color images are a computer image storage method that uses three or more bytes to describe pixels. Generally speaking, the first three channels are represented by one byte each, such as red, green, and blue (RGB) or blue, green, and red (BGR). If there is a fourth byte, it means that the image uses an alpha channel (equivalent to the A channel mentioned above). However, actual systems often use more than 8 bits (i.e. 1 byte) to express a channel, such as a 48-bit scanner. Such systems are collectively called true color systems. Each color light is represented by 8 bits, and each channel has 256 (28) shades. The three colors of light are increased and decreased alternately. The RGB three colors can display up to 24 bits of 16.77 million colors (256*256*256=16,777,216) on a pixel. This value is the highest color that a computer can represent. It is generally believed that the human eye can distinguish about 10 million colors, so images formed by RGB are called true color. Although an alpha channel is just a transparent channel and has little meaning from an image perspective, this 32-bit image is very popular in the desktop era. Because of the alpha channel, it is easy to draw semi-transparent images on the screen, and it is easier to achieve semi-transparent windows, menu fading and shadow effects on the computer desktop. Although the alpha channel is meaningless for the display buffer, 32-bit true color is still used in real systems because it is easier to address pixels in a 32-bit bitmap. Addressing 24-bit pixels requires multiplication by 3, which is more computationally intensive than multiplication by 4, which can be achieved by shifting.
[0038] The above explanations are all from Microsoft's perspective, because its Windows series of products, namely the Windows operating system, all use 24-bit color as true color. In fact, true color can also be a display mode without the help of a color look-up table (CLUT). Therefore, true color can also be represented in various color depths (8 bits, 16 bits, 24 bits... as long as the color look-up table is not involved). To describe an image, you need to use the attributes of the image. The attributes of an image include resolution, pixel depth, true / false color, image representation and type, etc. This section introduces the first three characteristics. Understanding the meaning of true color, false color and direct color has direct guiding significance for writing image display programs and understanding the storage format of image files, and will not be confused by such phenomena as: the image originally represented in true color, but the color of the image displayed on the VGA monitor is not the original image color.
[0039] True color means that in each pixel value that makes up a color image, there are three primary color components, R, G, and B. Each primary color component directly determines the primary color intensity of the display device. The color produced in this way is called true color. For example, in a color image represented by RGB 5∶5∶5, R, G, and B use 5 bits each. The value of the R, G, and B components directly determines the intensity of the three primary colors. The color obtained in this way is the true color of the original image. In many cases, true color images usually refer to RGB 8:8:8, that is, the number of colors in the image is equal to 224, which is also often called a full-color image. However, the color displayed on the monitor is not necessarily true color. To obtain a true color image, a true color display adapter is required. It is difficult to obtain a true color image with the VGA adapter currently used on PCs.
[0040] The meaning of pseudo-color image is that the color of each pixel is not directly determined by the value of each primary color component, but the pixel value is used as the entry address of the color lookup table to find the R, G, B intensity value used when displaying the image. The color generated by the R, G, B intensity value is called pseudo-color. The color lookup table is a pre-made table, and the entry address of the table is also called the index number. In direct color, each pixel value is divided into R, G, B components, and each component is transformed as a separate index value. That is, the primary color intensity is found through the corresponding color transformation table, and the color generated by the R, G, B intensity value obtained after the transformation is called direct color. Its characteristic is that each primary color is transformed. The similarity between the color generated by this system and the true color system is that both use R, G, B components to determine the primary color intensity. The difference is that the primary color intensity of the latter is directly determined by R, G, B, while the primary color intensity of the former is determined by R, G, B after transformation. Therefore, there is a difference in the colors generated by the two systems. The experimental results show that the color image displayed on the display using direct color looks real and natural. Compared with the pseudo-color system, this system is similar in that both use a lookup table, but the difference is that the former transforms the R, G, and B components separately, while the latter uses the entire pixel as the index value of the lookup table for color transformation.
[0041] Based on the above description, when the data to be sent includes multiple characters, the specific process of color encoding the sub-data to obtain the color signal corresponding to the sub-data may include: determining the binary value corresponding to each character in the sub-data; inputting the binary value corresponding to each character into the corresponding color channel in turn to obtain the color signal corresponding to the sub-data.
[0042] In a specific implementation, the binary value corresponding to each character can be the ASCII code corresponding to the character. Usually, the binary value corresponding to each character is pre-set and can be recognized by the client. When color encoding the sub-data, it is necessary to determine the binary value corresponding to each character in the sub-data, and then use the binary value corresponding to each character as the color value in the color channel to obtain the color signal corresponding to the sub-data. For example, the color signal includes three color channels RGB, and the sub-data is ABC, where the binary value corresponding to A is 65, the binary value corresponding to B is 66, and the binary value corresponding to C is 67. Then the R channel input is 65 corresponding to A, the G channel input is 66 corresponding to B, and the B channel input is 67 corresponding to C. According to the values input in the RGB channels, the color signal obtained after the sub-data ABC is color-coded can be obtained.
[0043] In the above method, color coding technology can be used to achieve data encoding, transmission and reception between the game client and the external system.
[0044] The following embodiments are used to describe a method of displaying a color signal in a rendering area and a method of reading the color signal by a receiving client.
[0045] Specifically, the specific process of displaying the color signals corresponding to multiple sub-data in sequence in the rendering area of the graphical user interface may include: starting from a preset signal frame in the graphical user interface, and displaying the color signals corresponding to multiple sub-data in sequence according to a preset display order; wherein the preset signal frame is the first signal frame in the rendering area, and the rendering area contains multiple signal frames, and each signal frame is used to display a color signal.
[0046] In a specific implementation, the preset signal frame is the initial signal frame of the rendering area pre-set in the graphical user interface. The position of the initial signal frame can be determined according to research and development requirements. For example, the initial signal frame can be set on the first signal frame in the upper left corner of the graphical user interface. The maximum number of signal frames contained in the rendering area can also be determined according to research and development requirements. The maximum number of signal frames contained in the rendering area determines the size of the rendering area. The rendering area starts writing color signals from the preset signal frame, and each signal frame in the rendering area can correspond to a written color signal.
[0047] In an optional embodiment, the number of color signals matches the number of sub-data corresponding to the plurality of sub-data. That is, the number of sub-data included in the data to be sent is the same as the number of color signals obtained after the sub-data is converted. This method is convenient for players to encode the sub-data and is conducive to data decoding.
[0048] In the specific implementation, in order to ensure that the receiving client knows when to start receiving the color signal corresponding to the data to be sent and when to complete receiving the color signal corresponding to the data to be sent, it is necessary to add a start mark and an end mark to the data to be sent, wherein the first character in the data to be sent is a preset start mark, the last character is a preset end mark, and the data between the preset start mark and the preset end mark is the substantial content of the data to be sent. The specific characters or character strings corresponding to the above preset start mark and preset end mark can be determined according to research and development needs.
[0049] For example, the actual content of the data to be sent is ABCDEF, which contains 6 bytes of characters, but the preset start flag and the preset end flag need to occupy one byte each. Assuming that the preset start flag is "\1" and the preset end flag is '\8', the data to be sent is "\1ABCDEF\8". If the color signal includes three color channels, then \1AB is converted into one color signal, CDE is converted into one color signal, and EF\8 is converted into one color signal.
[0050] Based on this, the specific process of the above-mentioned receiving client reading the color signal from the rendering area, converting the color signal into corresponding data to be sent, and returning a response signal may include: the receiving client reads the color signal from the rendering area, and decodes the color signal into sub-data according to a preset decoding rule; if the decoded sub-data contains a preset end flag, sending a response signal to the game client through the receiving client; wherein the response signal is used to indicate that the receiving client has completed the reception of the data to be sent.
[0051] In specific implementation, the receiving client can convert the color signal into the data to be sent through the color reverse parsing technology. If the data to be sent contains a preset end mark, it means that the data to be sent has been received. Therefore, the receiving client will send a reading completion signal to the game client to enable the game client to do other things. Specifically, the process of the game client gradually displaying the color signal on the signal frame of the rendering area is also the process of the game client transmitting data. After each data transmission, the game client will wait for the confirmation signal from the receiving client to ensure the integrity of the data transmission.
[0052] In an optional embodiment, the specific process of the receiving client reading the color signal from the rendering area and decoding the color signal into sub-data according to the preset decoding rules may include: in the process of the receiving client reading the color signal from the rendering area, determining whether the data identifier corresponding to the color signal has been recorded, if it has been recorded, decoding the color signal into sub-data according to the preset decoding rules; if it has not been recorded, recording the data identifier corresponding to the color signal, and reading the color signal from the rendering area. Specifically, the receiving client will cyclically read the color signal from the rendering area, and record the data identifier during the reading process. If the currently acquired data identifier has been recorded, it is necessary to decode the color signal into sub-data, and determine whether the sub-data contains a preset end mark. If it does, a signal indicating that data reception is complete will be returned to the game client; if it does not, continue to read the color signal corresponding to the data identifier from the rendering area. If the currently acquired data identifier has not been recorded, it is necessary to record the data identifier and read the color signal from the rendering area.
[0053] The above method enables users to communicate with external systems within the game client without the game client source code.
[0054] The following embodiments are used to describe a method of creating a signal frame and a method of maintaining a client connection.
[0055] Specifically, the signal frame corresponding to the specified position of the graphical user interface is configured as a color signal frame; the color signal frame is pre-set, and the number of the color signal frames can be determined according to research and development requirements, for example, the color signal frames can be two or three, etc.; the above-mentioned specified position can be any position in the graphical user interface, which can be specifically determined according to user settings, for example, the specified position can be the lower left corner and lower right corner in the graphical user interface.
[0056] Based on the above description, the receiving client can determine whether the game client can transmit data in the following way: the receiving client reads the color value corresponding to the color signal frame corresponding to the specified position, and determines whether the color value is a preset color value; if it is a preset color value, determines that the receiving client is connected to the game client for communication, and reads the color signal of the rendering area through the receiving client.
[0057] In an optional embodiment, if there are at least two color signal frames, the step of reading the color value corresponding to the color signal frame corresponding to the specified position by the receiving client and determining whether the color value is a preset color value includes: reading the color corresponding to each color signal frame by the receiving client, determining whether the color value corresponding to each color signal frame is consistent, and whether the color value is a preset color value. This method can better determine whether the receiving client has established a connection with the game client.
[0058] In a specific implementation, the above-mentioned preset color value includes at least one, and different preset color values are respectively configured with corresponding signal types; wherein the signal type includes at least one of the following: a keep-connected signal, a request width signal, and a receive data signal.
[0059] In an optional embodiment, when the preset color value includes the first preset color value of the signal type for maintaining the connection, the color signal frame at the specified position is set to the first preset color at fixed intervals, so that the receiving client reads the color value corresponding to the color signal frame, and when it is determined that the color value corresponding to the color signal frame is the first preset color value, a confirmation signal is returned; if the game client receives the confirmation signal, it is determined that the receiving client maintains the connection with the game client; if the confirmation signal is not received, the color signal frame at the specified position is reset to the first preset color. This method periodically sends a connection maintenance signal to ensure the validity of the connection; and after receiving the connection maintenance signal, the receiving client sends a confirmation signal to further ensure the stability of the connection, that is, it can ensure that the connection will not be interrupted during long-term communication.
[0060] like Figure 2The flowchart shown is a data transmission provided by the present invention. First, it is necessary to check whether other plug-ins in the game client have been loaded. If they have not been loaded, a prompt of waiting timeout will appear; if they have been loaded, the corresponding plug-in of the present invention will be loaded. After the corresponding plug-in of the present invention is loaded, the confirmation signal will be initialized to ensure the connection state, and then a signal frame and a corresponding connection color block will be created, and the corresponding connection color block here is also a color signal frame; then it is detected whether the receiving client inputs a confirmation signal. If it has been entered, the client inputs the data and confirms the data; if the receiving client does not input a confirmation signal, default data is created and the data is confirmed; after the data confirmation is completed, the signal triggers the need to send data (equivalent to the above-mentioned data to be sent), and then the corresponding color block information is generated according to the data, that is, the preset color value on the color signal frame is adjusted to notify the receiving client to receive the data, and then the data to be sent is rendered in the rendering area in the graphical user interface. Figure 2 The client that needs to communicate is also the receiving client. The receiving client first needs to obtain the handle of the game client. The handle here is mainly used to determine which is the graphical user interface corresponding to the game client, and then obtain the connection signal and data according to the handle content, and can send the confirmation signal and response signal to the game client. After obtaining the handle of the game client, a loop will be started to read the message displayed on the rendering area of the graphical user interface (equivalent to the above-mentioned color signal), and the message id (equivalent to the above-mentioned data identifier) will be recorded in the process of obtaining the message; moreover, in the process of obtaining the message, the message id will also be obtained and it will be determined whether the message id has been recorded. If it has been recorded, the message displayed on the rendering area of the graphical user interface will continue to be read in a loop. If it has not been recorded, it is necessary to record the message id and read the message from the rendering area in the graphical user interface.
[0061] Specifically, the initialization process includes loading all plug-ins, creating the main frame (equivalent to the above rendering area) and preset signal frames, and setting basic parameters, which ensures that the system is ready when the game client is started and can transfer data at any time. The created color signal frames are UI elements used to display color signals. They are set to a specific size and position and transmit data through color changes. When creating a color signal frame, the initial color of the color signal frame needs to be set.
[0062] In the above method, by creating signal frames and color coding technology, data encoding, transmission and reception are realized. This method overcomes the limitations of the prior art, allowing users to communicate with external systems in the game client without the game client source code; at the same time, the system architecture of the present invention is simple, easy to implement, and has broad application prospects.
[0063] Corresponding to the above method embodiment, the embodiment of the present invention also provides a data transmission device, which displays a graphical user interface corresponding to the game client through a terminal device, such as Figure 3 As shown, the device comprises:
[0064] The data generating module 30 is used to generate data to be sent in response to a specified trigger operation.
[0065] The data segmentation module 31 is used to segment the data to be sent to obtain a plurality of sub-data corresponding to the data to be sent; wherein the length of the sub-data is a preset data length.
[0066] The data encoding module 32 is used to color-code the sub-data for the plurality of sub-data to obtain color signals corresponding to the sub-data.
[0067] The data display module 33 is used to display the color signals corresponding to the multiple sub-data in the rendering area of the graphical user interface in sequence, so that the receiving client reads the color signal from the rendering area, converts the color signal into the corresponding data to be sent, and returns a response signal.
[0068] The signal receiving module 34 is used to receive a response signal and execute a preset action based on the response signal.
[0069] The above-mentioned data transmission device transmits data through the color signal displayed in the rendering area of the graphical user interface, and can realize data encoding and transmission with the external system in the game client, thereby meeting the user's needs for transmitting external data.
[0070] Specifically, the above-mentioned data display module 33 is used to: start from a preset signal frame in the graphical user interface, and display the color signals corresponding to multiple sub-data in sequence according to a preset display order; wherein the preset signal frame is the first signal frame in the rendering area, and the rendering area contains multiple signal frames, each signal frame is used to display a color signal.
[0071] In a specific implementation, the number of the color signals matches the number of sub-data corresponding to the plurality of sub-data.
[0072] Furthermore, the preset data length corresponding to the above sub-data matches the number of color channels corresponding to the color signal; wherein each character in the sub-data corresponds to one color channel.
[0073] In an optional embodiment, the data to be sent includes multiple characters; based on this, the data encoding module 32 is used to: determine the binary value corresponding to each character in the sub-data; input the binary value corresponding to each character into the corresponding color channel in turn to obtain the color signal corresponding to the sub-data.
[0074] Furthermore, the first character in the above-mentioned data to be sent is a preset start mark, and the last character is a preset end mark; based on this, the above-mentioned data display module 33 is used to: the receiving client reads the color signal from the rendering area, and decodes the color signal into sub-data according to a preset decoding rule; if the decoded sub-data contains a preset end mark, a response signal is sent to the game client through the receiving client; wherein the response signal is used to indicate that the receiving client has completed the reception of the data to be sent.
[0075] Furthermore, the above-mentioned data display module 33 is also used to: in the process of receiving the color signal read by the client from the rendering area, determine whether the data identifier corresponding to the color signal has been recorded, if it has been recorded, decode the color signal into sub-data according to a preset decoding rule; if it has not been recorded, record the data identifier corresponding to the color signal and read the color signal from the rendering area.
[0076] Furthermore, the signal frame corresponding to the designated position of the graphical user interface is configured as a color signal frame; based on this, the device further includes a communication establishment module, which is used to: read the color value corresponding to the color signal frame corresponding to the designated position through a receiving client, and determine whether the color value is a preset color value; if it is a preset color value, determine that the receiving client is in communication connection with the game client, and read the color signal of the rendering area through the receiving client.
[0077] In a specific implementation, the above-mentioned preset color value includes at least one, and different preset color values are respectively configured with corresponding signal types; wherein the signal type includes at least one of the following: a keep-connected signal, a request width signal, and a receive data signal.
[0078] Furthermore, the above-mentioned preset color value includes a first preset color value whose signal type is a signal for maintaining connection; based on this, the above-mentioned device also includes a connection maintenance module, which is used to: set the color signal frame at the specified position to the first preset color at fixed intervals, so that the receiving client reads the color value corresponding to the color signal frame, and returns a confirmation signal when it is determined that the color value corresponding to the color signal frame is the first preset color value; if a confirmation signal is received, it is determined that the receiving client maintains the connection with the game client; if no confirmation signal is received, the color signal frame at the specified position is reset to the first preset color.
[0079] The data transmission device provided in the embodiment of the present disclosure has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0080] The present disclosure also provides an electronic device, such as Figure 4As shown, the electronic device includes a processor and a memory, the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above data transmission method.
[0081] Specifically, a graphical user interface corresponding to a game client is displayed through a terminal device, and the above-mentioned data transmission method includes: generating data to be sent in response to a specified trigger operation; segmenting the data to be sent to obtain multiple sub-data corresponding to the data to be sent; wherein the length of the sub-data is a preset data length; color-coding the sub-data for multiple sub-data to obtain color signals corresponding to the sub-data; displaying the color signals corresponding to the multiple sub-data in a rendering area in the graphical user interface in sequence, so that the receiving client reads the color signal from the rendering area, converts the color signal into corresponding data to be sent, and returns a response signal; receiving the response signal, and executing a preset behavior based on the response signal.
[0082] The above-mentioned data transmission method performs data transmission through the color signal displayed in the rendering area of the graphical user interface, and can realize data encoding and transmission with the external system in the game client, thereby meeting the user's needs for transmitting external data.
[0083] In an optional embodiment, the above-mentioned step of displaying the color signals corresponding to the multiple sub-data in sequence in the rendering area of the graphical user interface includes: starting from a preset signal frame in the graphical user interface, displaying the color signals corresponding to the multiple sub-data in sequence according to a preset display order; wherein the preset signal frame is the first signal frame in the rendering area, and the rendering area contains multiple signal frames, each signal frame is used to display a color signal.
[0084] In an optional embodiment, the number of the color signals matches the number of sub-data corresponding to the plurality of sub-data.
[0085] In an optional embodiment, the preset data length corresponding to the above sub-data matches the number of color channels corresponding to the color signal; wherein each character in the sub-data corresponds to a color channel.
[0086] In an optional embodiment, the data to be sent includes multiple characters; the step of color-coding the sub-data to obtain a color signal corresponding to the sub-data includes: determining the binary value corresponding to each character in the sub-data; inputting the binary value corresponding to each character into the corresponding color channel in turn to obtain the color signal corresponding to the sub-data.
[0087] In an optional embodiment, the first character in the above-mentioned data to be sent is a preset start mark, and the last character is a preset end mark; the step of the receiving client reading the color signal from the rendering area, converting the color signal into corresponding data to be sent, and returning a response signal includes: the receiving client reads the color signal from the rendering area, and decodes the color signal into sub-data according to a preset decoding rule; if the decoded sub-data contains a preset end mark, sending a response signal to the game client through the receiving client; wherein the response signal is used to indicate that the receiving client has completed receiving the data to be sent.
[0088] In an optional embodiment, the above-mentioned step of receiving the color signal from the rendering area by the client and decoding the color signal into sub-data according to a preset decoding rule includes: in the process of the receiving client reading the color signal from the rendering area, determining whether the data identifier corresponding to the color signal has been recorded, and if so, decoding the color signal into sub-data according to the preset decoding rule; if not, recording the data identifier corresponding to the color signal and reading the color signal from the rendering area.
[0089] In an optional embodiment, the signal frame corresponding to the specified position of the graphical user interface is configured as a color signal frame; the above method also includes: reading the color value corresponding to the color signal frame corresponding to the specified position through the receiving client, and determining whether the color value is a preset color value; if it is a preset color value, determining that the receiving client is connected to the game client for communication, and reading the color signal of the rendering area through the receiving client.
[0090] In an optional embodiment, the above-mentioned preset color value includes at least one, and different preset color values are respectively configured with corresponding signal types; wherein the signal type includes at least one of the following: a maintain connection signal, a request width signal, and a receive data signal.
[0091] In an optional embodiment, the preset color value includes a first preset color value of a signal type for maintaining connection; the method further includes: setting the color signal frame at the specified position to the first preset color at fixed intervals so that the receiving client reads the color value corresponding to the color signal frame, and returning a confirmation signal when it is determined that the color value corresponding to the color signal frame is the first preset color value; if the confirmation signal is received, it is determined that the receiving client maintains the connection with the game client;
[0092] If the confirmation signal is not received, the color signal frame at the designated position is reset to the first preset color.
[0093] Further, Figure 4 The electronic device shown further includes a bus 102 and a communication interface 103 , and the processor 101 , the communication interface 103 and the memory 100 are connected via the bus 102 .
[0094] The memory 100 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 102 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0095] The processor 101 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 101. The above processor 101 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present disclosure can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present disclosure can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 100, and the processor 101 reads the information in the memory 100 and completes the steps of the method of the above embodiment in combination with its hardware.
[0096] The embodiment of the present disclosure also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned data transmission method. The specific implementation can be found in the method embodiment, which will not be repeated here.
[0097] Specifically, a graphical user interface corresponding to a game client is displayed through a terminal device, and the above-mentioned data transmission method includes: generating data to be sent in response to a specified trigger operation; segmenting the data to be sent to obtain multiple sub-data corresponding to the data to be sent; wherein the length of the sub-data is a preset data length; color-coding the sub-data for multiple sub-data to obtain color signals corresponding to the sub-data; displaying the color signals corresponding to the multiple sub-data in a rendering area in the graphical user interface in sequence, so that the receiving client reads the color signal from the rendering area, converts the color signal into corresponding data to be sent, and returns a response signal; receiving the response signal, and executing a preset behavior based on the response signal.
[0098] The above-mentioned data transmission method performs data transmission through the color signal displayed in the rendering area of the graphical user interface, and can realize data encoding and transmission with the external system in the game client, thereby meeting the user's needs for transmitting external data.
[0099] In an optional embodiment, the above-mentioned step of displaying the color signals corresponding to the multiple sub-data in sequence in the rendering area of the graphical user interface includes: starting from a preset signal frame in the graphical user interface, displaying the color signals corresponding to the multiple sub-data in sequence according to a preset display order; wherein the preset signal frame is the first signal frame in the rendering area, and the rendering area contains multiple signal frames, each signal frame is used to display a color signal.
[0100] In an optional embodiment, the number of the color signals matches the number of sub-data corresponding to the plurality of sub-data.
[0101] In an optional embodiment, the preset data length corresponding to the above sub-data matches the number of color channels corresponding to the color signal; wherein each character in the sub-data corresponds to a color channel.
[0102] In an optional embodiment, the data to be sent includes multiple characters; the step of color-coding the sub-data to obtain a color signal corresponding to the sub-data includes: determining the binary value corresponding to each character in the sub-data; inputting the binary value corresponding to each character into the corresponding color channel in turn to obtain the color signal corresponding to the sub-data.
[0103] In an optional embodiment, the first character in the above-mentioned data to be sent is a preset start mark, and the last character is a preset end mark; the step of the receiving client reading the color signal from the rendering area, converting the color signal into corresponding data to be sent, and returning a response signal includes: the receiving client reads the color signal from the rendering area, and decodes the color signal into sub-data according to a preset decoding rule; if the decoded sub-data contains a preset end mark, sending a response signal to the game client through the receiving client; wherein the response signal is used to indicate that the receiving client has completed receiving the data to be sent.
[0104] In an optional embodiment, the above-mentioned step of receiving the color signal from the rendering area by the client and decoding the color signal into sub-data according to a preset decoding rule includes: in the process of the receiving client reading the color signal from the rendering area, determining whether the data identifier corresponding to the color signal has been recorded, and if so, decoding the color signal into sub-data according to the preset decoding rule; if not, recording the data identifier corresponding to the color signal and reading the color signal from the rendering area.
[0105] In an optional embodiment, the signal frame corresponding to the specified position of the graphical user interface is configured as a color signal frame; the above method also includes: reading the color value corresponding to the color signal frame corresponding to the specified position through the receiving client, and determining whether the color value is a preset color value; if it is a preset color value, determining that the receiving client is connected to the game client for communication, and reading the color signal of the rendering area through the receiving client.
[0106] In an optional embodiment, the above-mentioned preset color value includes at least one, and different preset color values are respectively configured with corresponding signal types; wherein the signal type includes at least one of the following: a maintain connection signal, a request width signal, and a receive data signal.
[0107] In an optional embodiment, the preset color value includes a first preset color value of a signal type for maintaining connection; the method further includes: setting the color signal frame at the specified position to the first preset color at fixed intervals so that the receiving client reads the color value corresponding to the color signal frame, and returning a confirmation signal when it is determined that the color value corresponding to the color signal frame is the first preset color value; if the confirmation signal is received, it is determined that the receiving client maintains the connection with the game client;
[0108] If the confirmation signal is not received, the color signal frame at the designated position is reset to the first preset color.
[0109] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a terminal device, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0110] In the description of the present disclosure, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present disclosure and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present disclosure. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0111] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A data transmission method, characterized in that: The method includes: displaying a graphical user interface corresponding to a game client through a terminal device; In response to a specified trigger operation, generating data to be sent; Segmenting the data to be sent to obtain a plurality of sub-data corresponding to the data to be sent; wherein the length of the sub-data is a preset data length; For the plurality of sub-data, color-code the sub-data to obtain color signals corresponding to the sub-data; Displaying color signals corresponding to the plurality of sub-data in sequence in a rendering area of the graphical user interface, so that a receiving client reads the color signals from the rendering area, converts the color signals into corresponding data to be sent, and returns a response signal; A response signal is received, and a preset action is performed based on the response signal.
2. The method according to claim 1, characterized in that: The step of sequentially displaying the color signals corresponding to the plurality of sub-data in the rendering area of the graphical user interface comprises: Starting from a preset signal frame in the graphical user interface, color signals corresponding to the multiple sub-data are displayed in sequence according to a preset display order; wherein the preset signal frame is the first signal frame in the rendering area, and the rendering area contains multiple signal frames, each of which is used to display a color signal.
3. The method according to claim 1 or 2, characterized in that: The number of the color signals matches the number of sub-data corresponding to the plurality of sub-data.
4. The method according to claim 1, characterized in that The preset data length corresponding to the sub-data matches the number of color channels corresponding to the color signal; wherein each character in the sub-data corresponds to a color channel.
5. The method according to claim 4, characterized in that The data to be sent includes a plurality of characters; the step of color-coding the sub-data to obtain a color signal corresponding to the sub-data includes: Determine a binary value corresponding to each character in the sub-data; The binary value corresponding to each character is input into the corresponding color channel in sequence to obtain the color signal corresponding to the sub-data.
6. The method according to claim 5, characterized in that The first character in the data to be sent is a preset start mark, and the last character is a preset end mark; The step of the receiving client reading the color signal from the rendering area, converting the color signal into corresponding data to be sent, and returning a response signal includes: The receiving client reads the color signal from the rendering area, and decodes the color signal into the sub-data according to a preset decoding rule; If the decoded sub-data includes the preset end mark, a response signal is sent to the game client through the receiving client; wherein the response signal is used to indicate that the receiving client has completed receiving the data to be sent.
7. The method according to claim 6, characterized in that The step of the receiving client reading the color signal from the rendering area and decoding the color signal into the sub-data according to a preset decoding rule includes: In the process of the receiving client reading the color signal from the rendering area, determining whether the data identifier corresponding to the color signal has been recorded, and if so, decoding the color signal into the sub-data according to a preset decoding rule; If not recorded, record the data identifier corresponding to the color signal, and read the color signal from the rendering area.
8. The method according to claim 1, characterized in that: The signal frame corresponding to the designated position of the graphical user interface is configured as a color signal frame; the method further includes: Reading, by the receiving client, a color value corresponding to the color signal frame corresponding to the designated position, and determining whether the color value is a preset color value; If it is the preset color value, determine that the receiving client is connected to the game client for communication, and read the color signal of the rendering area through the receiving client.
9. The method according to claim 8, characterized in that The preset color value includes at least one, and different preset color values are respectively configured with corresponding signal types; wherein the signal type includes at least one of the following: a keep-connected signal, a request width signal, and a receive data signal.
10. The method according to claim 9, characterized in that The preset color value includes a first preset color value of a signal type of a keep-connected signal; the method further includes: At regular intervals, the color signal frame at the designated position is set to the first preset color, so that the receiving client reads the color value corresponding to the color signal frame, and returns a confirmation signal when it is determined that the color value corresponding to the color signal frame is the first preset color value; If the confirmation signal is received, determining that the receiving client remains connected to the game client; If the confirmation signal is not received, the color signal frame at the designated position is reset to the first preset color.
11. A data transmission device, characterized in that: The device displays a graphical user interface corresponding to a game client through a terminal device, and the device includes: A data generation module, used to generate data to be sent in response to a specified trigger operation; A data segmentation module, used for segmenting the data to be sent to obtain a plurality of sub-data corresponding to the data to be sent; wherein the length of the sub-data is a preset data length; A data encoding module, configured to color-code the sub-data for the plurality of sub-data to obtain color signals corresponding to the sub-data; A data display module, used for sequentially displaying the color signals corresponding to the plurality of sub-data in a rendering area of the graphical user interface, so that a receiving client reads the color signals from the rendering area, converts the color signals into corresponding data to be sent, and returns a response signal; The signal receiving module is used to receive a response signal and execute a preset action based on the response signal.
12. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the data transmission method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the data transmission method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Method and system for virtually transmitting Linux virtual machine screen picture based on AMD display card
CN111240631A
Data rendering method, storage medium and electronic equipment
CN114972602A
Interaction control method and device for model dyeing in game and electronic equipment
CN117815654A
Client side processing of character interactions in a remote gaming environment
US20140274379A1
Video transmitting device and video playing device
US20180255308A1
