Data transmission methods, devices and electronic equipment
By segmenting and color-coding the graphical user interface in the game client, external data transmission is achieved without client source code, solving the problem that the game client cannot communicate directly and meeting the user's external data transmission needs.
Patent Information
- Application Number
- CN202411140126.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2044-08-19
AI Technical Summary
Existing game clients cannot achieve direct communication with external systems without client source code, and traditional network communication methods cannot meet users' needs for transmitting external data.
Data to be sent is generated in the graphical user interface of the game client, processed in segments and color-coded, color signals are displayed in the rendering area for data transmission, and response signals are received to execute preset behaviors.
It enables data encoding and transmission between the game client and external systems, meeting users' needs for transmitting external data while ensuring data security.
Smart Images

Figure CN119254850B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of network communication technology, and in particular to a data transmission method, apparatus and electronic device. Background Technology
[0002] In the game client, users want to communicate with the game client without needing the client source code. However, the game client design strictly limits communication with external systems. Existing communication methods are limited to in-game chat and mail systems, which cannot meet users' needs for transmitting external data. Furthermore, due to the game's security mechanisms, traditional network communication methods cannot enable direct interaction with external systems within the game client. Summary of the Invention
[0003] The purpose of this disclosure is to provide a data transmission method, apparatus, and electronic device to enable direct interaction with external systems within a game client while ensuring data security.
[0004] In a first aspect, this disclosure provides a data transmission method for displaying a graphical user interface corresponding to a game client on a terminal device. 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 multiple sub-data to obtain color signals corresponding to the sub-data; sequentially displaying the color signals corresponding to the multiple sub-data in a rendering area of the graphical user interface, so that the 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; receiving the response signal and performing a preset behavior based on the response signal.
[0005] Secondly, this disclosure provides a data transmission device for displaying a graphical user interface corresponding to a game client via a terminal device. The device includes: a data generation module for generating data to be sent in response to a specified trigger operation; a data segmentation module for segmenting the data to be sent to obtain multiple sub-data corresponding to the data to be sent; wherein the length of each sub-data is a preset data length; a data encoding module for color encoding the multiple sub-data to obtain color signals corresponding to the sub-data; a data display module for sequentially displaying the color signals corresponding to the multiple sub-data in a rendering area of the graphical user interface, so that the 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; and a signal receiving module for receiving the response signal and performing preset actions based on the response signal.
[0006] Thirdly, this disclosure provides an electronic device including a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the above-described data transmission method.
[0007] Fourthly, this disclosure provides a computer-readable storage medium storing computer-executable instructions that, when invoked and executed by a processor, cause the processor to implement the aforementioned data transmission method.
[0008] The embodiments disclosed herein bring the following beneficial effects:
[0009] This disclosure provides a data transmission method, apparatus, and electronic device. First, a game client responds to a specified trigger operation to generate data to be sent. Then, the data to be sent is segmented to obtain multiple sub-data items corresponding to the data to be sent; the length of each sub-data item is a preset data length. For each sub-data item, color encoding is performed to obtain a corresponding color signal. These color signals are then sequentially displayed in a rendering area of a graphical user interface, allowing the receiving client to read the color signals from the rendering area, convert them into the corresponding data to be sent, and return a response signal. The receiving client then receives the response signal and executes a preset action based on it. In this method, data transmission is performed using color signals displayed in the rendering area of the graphical user interface, enabling data encoding and transmission with external systems within the game client, thereby meeting the user's need to transmit external data.
[0010] Other features and advantages of this disclosure will be set forth in the following description, or some features and advantages may be inferred from the description or determined without doubt, or may be learned by practicing the techniques described above.
[0011] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the specific embodiments of this disclosure or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0013] Figure 1 A flowchart illustrating a data transmission method provided in this embodiment of the disclosure;
[0014] Figure 2 A flowchart of data transmission provided in an embodiment of this disclosure;
[0015] Figure 3 This is a schematic diagram of the structure of a data transmission device provided in an embodiment of the present disclosure;
[0016] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0018] Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely to illustrate selected embodiments of the disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.
[0019] To facilitate understanding of the embodiments of the present invention, a data transmission method provided by the embodiments of the present invention will first be described in detail, which displays the graphical user interface corresponding to the game client through a terminal device, such as... Figure 1 As shown, the method includes the following specific steps:
[0020] Step S102: In response to the specified trigger operation, generate data to be sent.
[0021] In practice, the specific operation corresponding to the specified trigger operation can be determined based on development needs and game rules. For example, the specified trigger operation could be an operation that triggers a control displayed in the graphical user interface, or an operation that triggers a key displayed on the keyboard. When the user executes the specified trigger operation, data to be sent will be generated based on the current game data and / or the specified trigger operation. Typically, different specified trigger operations correspond to different rules for generating data to be sent, and these rules are pre-set.
[0022] Step S104: 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.
[0023] In practical implementation, after generating the data to be sent, it needs to be segmented, and the length of each segment (equivalent to the aforementioned sub-data) must be fixed to a preset data length. If the length of the last segment is less than the preset data length, it can be padded with zeros. The specific length corresponding to the preset data length can be determined according to the development requirements. For example, the preset data length can be three bytes or four bytes, etc.
[0024] Step S106: For multiple sub-data, color-encode the sub-data to obtain the color signal corresponding to the sub-data.
[0025] After segmenting the data to be sent into multiple sub-data segments, color encoding technology is used to color-encode each sub-data segment, obtaining a color signal corresponding to each sub-data segment. Each sub-data segment contains multiple characters, and each character corresponds to a specific color value, which is related to the binary number corresponding to the character. By sorting the color signals corresponding to each sub-data segment according to the writing order, the color signal corresponding to the data to be sent can be obtained.
[0026] Step S108: The color signals corresponding to multiple sub-data are sequentially displayed in the rendering area of the graphical user interface, so that the receiving client reads the color signals from the rendering area, converts the color signals into the corresponding data to be sent, and returns a response signal.
[0027] Data transmission for the game client is completed by sequentially displaying the color signals corresponding to multiple sub-data points in the rendering area of the graphical user interface according to the writing order. In practice, the rendering area is created during system initialization. Its maximum size and display position are pre-set and can be determined based on user or development requirements. This rendering area includes multiple signal frames, each used to display one color signal.
[0028] The receiving client will continuously read the contents of the rendering area in the graphical user interface. After the receiving client reads the color signal displayed in the rendering area, it will reverse the color signal to recover the original data to be sent. After the data to be sent is parsed, it will send a response signal to the game client to notify the game client that the data reception is complete.
[0029] Step S110: Receive a response signal and perform a preset action based on the response signal.
[0030] After receiving the response signal, the game client will execute preset actions, which are determined according to the game rules. These preset actions include, but are 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 corresponding processing functions based on specific events occurring in the game. Typically, different specific events correspond to different processing functions. For example, if the game room number is used as the data to be sent, clicking a control will convert the game room number into a color signal. After the receiving client reads the color signal, it will parse the color signal to obtain the game room number and then return a response signal indicating successful data reading. Upon receiving the response signal, the game client will close the game room based on the processing function.
[0031] The present invention provides a data transmission method that transmits data through color signals displayed in the rendering area of a graphical user interface. This method enables data encoding and transmission with external systems within the game client, thereby meeting the user's need to transmit external data.
[0032] The following examples describe a method for segmenting and color-coding data.
[0033] Specifically, after generating the data to be sent, the data needs to be segmented to obtain multiple sub-data. The preset data length of the sub-data matches the number of color channels corresponding to the color signal. Each character in the sub-data corresponds to one color channel.
[0034] In practice, each color signal contains the same number of color channels. For example, a color signal can contain three color channels: R, G, and B, or four color channels: R, G, B, and A. If a color signal contains three color channels, each segment of data to be transmitted needs to be divided into three characters, with each character corresponding to one color channel. This allows for color encoding of the characters to obtain the color signal corresponding to each sub-data segment, which can also be called a color value.
[0035] In practical applications, true color refers to an image where each pixel value is divided into three primary color components: R, G, and B (equivalent to three color channels). Each primary color component directly determines the intensity of its primary color, resulting in colors called true color. A true color image is a computer image storage method that uses three or more bytes to describe a pixel.
[0036] The following explains color encoding. Computers also represent colors using binary. 16-bit color technology produces 65,536 colors, or 2 to the power of 16. 24-bit color technology, known as true color, reaches the limit of human visual perception, producing over 16.77 million colors, also 2 to the power of 24. 32-bit color technology, while still producing over 16.77 million colors, adds 256 levels of grayscale. For ease of reference, it's simply called 32-bit color. A small number of graphics cards can achieve 36-bit color, which consists of 24 bits of color and 512 levels of grayscale. When using two identical monitors with different color settings, the difference between 32-bit and 16-bit color is visually noticeable. However, when repeatedly switching between colors on a single monitor, the difference becomes more difficult to discern. If you are using Windows XP, there is a "Welcome" screen when Windows starts up. The difference in the blue transition there is easy to see. The 16-bit color transition is obviously layered and looks unnatural; while the 32-bit color transition 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, the first three channels are each represented by one byte, such as red-green-blue (RGB) or blue-green-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 represent a channel, such as a 48-bit scanner. Such systems are collectively called true-color systems. Each color of light is represented by 8 bits, and each channel has 256 (28) tones. The three colors of light alternately increase and decrease, and RGB three colors of light can display up to 24 bits and 16.77 million colors (256*256*256=16,777,216) on a single pixel. This value is the highest color that a computer can represent. It is generally believed that the human eye's ability to distinguish colors is approximately ten million colors, so images formed by RGB are all called true-color. Although an alpha channel is just a transparency channel and has little significance from an image perspective, this 32-bit image was very popular in the desktop era. The alpha channel simplifies the creation of semi-transparent images on the screen, making it easier to achieve effects like semi-transparent windows, fading menus, and shadows on the computer desktop. While the alpha channel is meaningless for the display buffer, real-world systems still use 32-bit true color because addressing pixels in a 32-bit bitmap is much easier. Addressing a 24-bit pixel requires multiplying by 3, which is computationally more expensive than multiplying by 4, which can be achieved through bit shifting.
[0038] The above explanations are all from Microsoft's perspective, because its Windows product series, i.e., the Windows operating system, uses 24-bit color as true color. In reality, true color can also be a display mode that does not rely on a Color Look-Up Table (CLUT). Therefore, true color can be represented in various color depths (8-bit, 16-bit, 24-bit… as long as a color look-up table is not involved). Describing an image requires using its attributes. Image attributes include resolution, pixel depth, true / pseudo-color, image representation, and type. This section introduces the first three characteristics. A clear understanding of the meanings of true color, pseudo-color, and direct color is directly instructive for writing image display programs and understanding image file storage formats, and will prevent confusion when an image, originally represented in true color, displays differently on a VGA monitor.
[0039] True color refers to a color image where each pixel value has three primary color components: R, G, and B. Each primary color component directly determines the intensity of the primary color on the display device, resulting in true color. For example, in a color image represented by RGB 5:5:5, each of R, G, and B uses 5 bits. The intensity of the three primary colors is directly determined by the values of the R, G, and B components, resulting in colors that accurately reflect the original image. In many cases, true color images typically refer to RGB 8:8:8, meaning the image has 224 colors, often called full-color images. However, the colors displayed on a monitor may not necessarily be true color. To obtain a true color image, a true color display adapter is required; currently, VGA adapters used on PCs are generally insufficient for achieving true color images.
[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. Instead, the pixel value is used as the entry address of a color lookup table to look up the R, G, B intensity values used when displaying the image. The color generated by the found R, G, B intensity values 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. Direct color: Each pixel value is divided into R, G, B components, and each component is used as a separate index value to transform it. That is, the primary color intensity is found through the corresponding color transformation table, and the color generated by the transformed R, G, B intensity values is called direct color. Its characteristic is that each primary color is transformed. Compared with the true color system, the similarity of using R, G, B components to determine the primary color intensity is that the primary color intensity in the latter is directly determined by R, G, B, while the primary color intensity in the former is determined by R, G, B after transformation. Therefore, the colors produced by the two systems are different. Experimental results show that color images displayed on a monitor using direct color look realistic and natural. This system is similar to the pseudo-color system in that it uses a lookup table. 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; and sequentially inputting the binary value corresponding to each character into the corresponding color channel to obtain the color signal corresponding to the sub-data.
[0042] In practical implementation, the binary value corresponding to each character can be its corresponding ASCII code. Typically, the binary value for each character is pre-set and recognizable by the client. When color-encoding the sub-data, it's necessary to determine the binary value corresponding to each character in the sub-data. Then, the binary value of each character is used as the color value in a color channel to obtain the color signal corresponding to the sub-data. For example, if the color signal includes three color channels (RGB), and the sub-data is ABC, where the binary value of A is 65, B is 66, and C is 67, then the R channel input is 65 (A), the G channel input is 66 (B), and the B channel input is 67 (C). Based on the values input to the RGB channels, the color signal obtained after color-encoding the sub-data ABC can be obtained.
[0043] In the above methods, color encoding technology can be used to enable data encoding, transmission, and reception between the game client and external systems.
[0044] The following embodiments describe how to display color signals in a rendering area and how to receive color signals from a client.
[0045] Specifically, the process of sequentially displaying the color signals corresponding to multiple sub-data in the rendering area of the graphical user interface can include: starting from a preset signal frame in the graphical user interface, sequentially displaying the color signals corresponding to multiple sub-data according to a preset display order; wherein, the preset signal frame is the first signal frame in the rendering area, the rendering area contains multiple signal frames, and each signal frame is used to display one color signal.
[0046] In practical implementation, the aforementioned preset signal frame is the initial signal frame of the rendering area pre-set in the graphical user interface. The position of this initial signal frame can be determined according to development needs; for example, it 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 development needs, and the size of the rendering area is determined by the maximum number of signal frames contained in the rendering area. The rendering area begins writing color signals from the preset signal frame, and each signal frame in the rendering area can correspond to the writing of one color signal.
[0047] In an optional embodiment, the number of color signals matches the number of sub-data items corresponding to the multiple sub-data items. That is, the number of sub-data items contained in the data to be sent is the same as the number of color signals obtained after the sub-data items are converted. This method facilitates the encoding of sub-data items by the player and is also beneficial for data decoding.
[0048] In practical implementation, to ensure that the receiving client knows when it starts receiving the color signal corresponding to the data to be sent and when it finishes receiving the color signal corresponding to the data to be sent, a start flag and an end flag need to be added to the data to be sent. The first character in the data to be sent is a preset start flag, and the last character is a preset end flag. The data between the preset start flag and the preset end flag is the actual content of the data to be sent. The specific characters or strings corresponding to the preset start flag and the preset end flag can be determined according to development requirements.
[0049] For example, the actual content of the data to be sent is ABCDEF, which contains 6 bytes of characters. However, the preset start flag and preset end flag each need to occupy one byte. Assuming that the preset start flag is "\1" and the preset end flag is "\8", then 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 by which 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 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, the receiving client sends a response signal to the game client; wherein, the response signal is used to indicate that the receiving client has completed receiving the data to be sent.
[0051] In practical implementation, the receiving client can use color reverse parsing technology to convert color signals into data to be sent. If the data to be sent contains a preset end marker, it indicates that the data reception is complete. The receiving client then sends a signal to the game client indicating that reading is complete, allowing the game client to perform other tasks. Specifically, the process of the game client gradually displaying the color signals on the signal frames of the rendering area is also the process of the game client transmitting data. After each data transmission, the game client waits for an acknowledgment 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 color signals from the rendering area and decoding the color signals into sub-data according to a preset decoding rule may include: during the process of the receiving client reading color signals 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 rule; 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 color signals from the rendering area and record data identifiers during the reading process. If the currently acquired data identifier has been recorded, the color signal needs to be decoded into sub-data, and it needs to be determined whether the sub-data contains a preset end marker. If it does, a signal indicating that data reception is complete will be returned to the game client; if it does not contain it, the color signal corresponding to the data identifier will continue to be read from the rendering area. If the currently acquired data identifier has not been recorded, the data identifier needs to be recorded, and the color signal will be read from the rendering area.
[0053] The above method allows users to communicate with external systems within the game client without needing the game client source code.
[0054] The following examples describe how to create signal frames and how to maintain client connections.
[0055] Specifically, the signal frame corresponding to the specified position in the graphical user interface is configured as a color signal frame; the color signal frame is preset, and the number of the color signal frames can be determined according to the R&D requirements, for example, the color signal frame can be two or three, etc.; the specified position can be any position in the graphical user interface, which can be determined according to the user settings, for example, the specified position can be the lower left and lower right corners of 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: by reading the color value corresponding to the color signal frame at the specified location by the receiving client, and determining whether the color value is a preset color value; if it is a preset color value, it is determined that the receiving client and the game client are connected, and the color signal of the rendering area is read by 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 at a 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 values corresponding to each color signal frame are 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 configured with corresponding signal types; wherein, the signal types include at least one of the following: hold connection signal, request width signal, and receive data signal.
[0059] In an optional embodiment, when the preset color value includes a first preset color value of the signal type being a keep-alive signal, the color signal frame at a specified position is set to the first preset color at fixed intervals, allowing the receiving client to read the color value corresponding to the color signal frame. When the color value corresponding to the color signal frame is determined to be the first preset color value, an acknowledgment signal is returned. If the game client receives the acknowledgment signal, it is determined that the receiving client and the game client maintain a connection. If no acknowledgment signal is received, the color signal frame at the specified position is reset to the first preset color. This method periodically sends keep-alive signals to ensure the validity of the connection. Moreover, after receiving the keep-alive signal, the receiving client sends an acknowledgment signal to further ensure the stability of the connection, that is, to ensure that the connection will not be interrupted during long-term communication.
[0060] like Figure 2The diagram shows a data transmission flowchart provided by this invention. First, it checks whether other plugins in the game client have finished loading. If they haven't finished loading, a timeout message will appear. If they have finished loading, the corresponding plugin of this invention will be loaded. After the corresponding plugin of this invention is loaded, an initial confirmation signal will be generated to ensure the connection status. Then, a signal frame and a corresponding connection color block will be created. The corresponding connection color block here is also a color signal frame. Next, it checks whether the receiving client has input a confirmation signal. If it has, the client inputs data and confirms the data. If the receiving client has not input a confirmation signal, default data is created and confirmed. After the data confirmation is completed, a signal is triggered to send data (equivalent to the data to be sent mentioned above). 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. Then, the data to be sent is rendered in the rendering area of the graphical user interface. Figure 2 The client that needs to communicate, also known as the receiving client, first needs to obtain the handle of the game client. This handle is mainly used to determine which graphical user interface corresponds to the game client. Then, based on the handle content, it obtains connection signals and data, and can send acknowledgment and response signals to the game client. After obtaining the handle of the game client, it starts a loop to read the messages displayed on the rendering area of the graphical user interface (equivalent to the aforementioned color signals), recording the message ID (equivalent to the aforementioned data identifier) during the message acquisition process. Furthermore, during message acquisition, it also obtains the message ID and checks whether it has already been recorded. If it has, it continues to loop through the messages displayed on the rendering area of the graphical user interface; if it has not been recorded, it needs to record the message ID and read the message from the rendering area of the graphical user interface.
[0061] Specifically, the initialization process includes loading all plugins, creating the main frame (equivalent to the rendering area mentioned above) and preset signal frames, and setting basic parameters. This ensures that the system is ready when the game client starts and can transmit 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. The initial color of the color signal frame needs to be set when it is created.
[0062] In the above method, data encoding, transmission, and reception are achieved through the creation of signal frames and color encoding techniques. This method overcomes the limitations of existing technologies, enabling users to communicate with external systems within the game client without the game client source code; at the same time, the system architecture of this invention is simple, easy to implement, and has broad application prospects.
[0063] Corresponding to the above method embodiments, this invention also provides a data transmission device for displaying the graphical user interface corresponding to the game client through a terminal device, such as... Figure 3 As shown, the device includes:
[0064] The data generation 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 multiple 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 encode multiple sub-data to obtain the color signal corresponding to the sub-data.
[0067] The data display module 33 is used to sequentially display the color signals corresponding to multiple sub-data in the rendering area of the graphical user interface, so that the receiving client can read the color signals from the rendering area, convert the color signals into the corresponding data to be sent, and return a response signal.
[0068] The signal receiving module 34 is used to receive response signals and perform preset actions based on the response signals.
[0069] The aforementioned data transmission device transmits data through color signals displayed in the rendering area of the graphical user interface, enabling data encoding and transmission with external systems within the game client, thereby meeting the user's need to transmit external data.
[0070] Specifically, the data display module 33 is used to: starting from a preset signal frame in the graphical user interface, sequentially display color signals corresponding to multiple sub-data in a preset display order; wherein, the preset signal frame is the first signal frame in the rendering area, the rendering area contains multiple signal frames, and each signal frame is used to display a color signal.
[0071] In practice, the number of the aforementioned color signals is matched with the number of sub-data corresponding to the multiple 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; and sequentially input the binary value corresponding to each character into the corresponding color channel to obtain the color signal corresponding to the sub-data.
[0074] Furthermore, the first character in the data to be sent is a preset start marker, and the last character is a preset end marker. Based on this, the data display module 33 is used to: receive the color signal from the rendering area and decode the color signal into sub-data according to the preset decoding rules; if the decoded sub-data contains a preset end marker, send 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.
[0075] Furthermore, the aforementioned data display module 33 is also used to: determine whether the data identifier corresponding to the color signal has been recorded during the process of receiving the color signal from the rendering area by the client; if it has been recorded, decode the color signal into sub-data according to the preset decoding rules; 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 specified position of the graphical user interface is configured as a color signal frame; based on this, the device further includes a communication establishment module, used to: read the color value corresponding to the color signal frame at the specified position through the 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 and the game client are connected in communication, 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 configured with corresponding signal types; wherein, the signal types include at least one of the following: hold connection signal, request width signal, and receive data signal.
[0078] Furthermore, the aforementioned preset color value includes a first preset color value whose signal type is a keep-connection signal; based on this, the device further includes a connection maintenance module, configured to: set the color signal frame at a specified location to the first preset color at fixed intervals, so that the receiving client can read the color value corresponding to the color signal frame; when it is determined that the color value corresponding to the color signal frame is the first preset color value, return an acknowledgment signal; if an acknowledgment signal is received, determine that the receiving client and the game client maintain a connection; if no acknowledgment signal is received, reset the color signal frame at the specified location to the first preset color.
[0079] The data transmission device provided in this disclosure has the same implementation principle and technical effects as the aforementioned method embodiments. For the sake of brevity, any parts not mentioned in the device embodiments can be referred to the corresponding content in the aforementioned method embodiments.
[0080] This 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, which executes the machine-executable instructions to implement the aforementioned data transmission method.
[0081] Specifically, the data transmission method, which displays the graphical user interface corresponding to the game client on a terminal device, 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 multiple sub-data to obtain color signals corresponding to the sub-data; sequentially displaying the color signals corresponding to the multiple sub-data in the rendering area of the graphical user interface, so that the receiving client reads the color signals from the rendering area, converts the color signals into the corresponding data to be sent, and returns a response signal; receiving the response signal and performing a preset behavior based on the response signal.
[0082] The aforementioned data transmission method transmits data through color signals displayed within the rendering area of the graphical user interface. This enables data encoding and transmission with external systems within the game client, thereby meeting the user's need to transmit external data.
[0083] In an optional embodiment, the step of sequentially displaying the color signals corresponding to multiple sub-data in the rendering area of the graphical user interface includes: starting from a preset signal frame in the graphical user interface, sequentially displaying the color signals corresponding to multiple sub-data according to a preset display order; wherein, the preset signal frame is the first signal frame in the rendering area, the rendering area contains multiple signal frames, and each signal frame is used to display a color signal.
[0084] In an optional embodiment, the number of the aforementioned 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 one color channel.
[0086] In an optional embodiment, the data to be sent includes multiple characters; the step of color encoding the sub-data to obtain the color signal corresponding to the sub-data includes: determining the binary value corresponding to each character in the sub-data; and sequentially inputting the binary value corresponding to each character into the corresponding color channel to obtain the color signal corresponding to the sub-data.
[0087] In an optional embodiment, the first character in the data to be sent is a preset start flag, and the last character is a preset end flag. The step of the receiving client reading the color signal from the rendering area, converting the color signal into the corresponding data to be sent, and returning a response signal includes: the receiving client reading the color signal from the rendering area and decoding the color signal into sub-data according to a preset decoding rule; if the decoded sub-data contains a preset end flag, the receiving client sends a response signal to the game 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 step of receiving the client reading the color signal from the rendering area and decoding the color signal into sub-data according to a preset decoding rule includes: during the process of receiving the 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 rule; if it has not been recorded, 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 a specified location in the graphical user interface is configured as a color signal frame; the method further includes: reading the color value corresponding to the color signal frame at the specified location 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 and the game client are connected in communication, and reading the color signal of the rendering area through the receiving client.
[0090] In an optional embodiment, the preset color value includes at least one, and different preset color values are configured with corresponding signal types; wherein, the signal types include at least one of the following: a hold 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 whose signal type is a keep-connect signal; the above method further includes: setting the color signal frame at a 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; when it is determined that the color value corresponding to the color signal frame is the first preset color value, an acknowledgment signal is returned; if an acknowledgment signal is received, it is determined that the receiving client and the game client keep connected.
[0092] If no acknowledgment signal is received, reset the color signal frame at the specified location to the first preset color.
[0093] Furthermore, Figure 4 The electronic device shown also includes a bus 102 and a communication interface 103, with the processor 101, the communication interface 103 and the memory 100 connected via the bus 102.
[0094] The memory 100 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 103 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network. The bus 102 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0095] Processor 101 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 101 or by instructions in software form. The 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 gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this disclosure can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 100, and processor 101 reads information from memory 100 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0096] This disclosure also provides a computer-readable storage medium storing computer-executable instructions. When these computer-executable instructions are invoked and executed by a processor, they cause the processor to implement the aforementioned data transmission method. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0097] Specifically, the data transmission method, which displays the graphical user interface corresponding to the game client on a terminal device, 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 multiple sub-data to obtain color signals corresponding to the sub-data; sequentially displaying the color signals corresponding to the multiple sub-data in the rendering area of the graphical user interface, so that the receiving client reads the color signals from the rendering area, converts the color signals into the corresponding data to be sent, and returns a response signal; receiving the response signal and performing a preset behavior based on the response signal.
[0098] The aforementioned data transmission method transmits data through color signals displayed within the rendering area of the graphical user interface. This enables data encoding and transmission with external systems within the game client, thereby meeting the user's need to transmit external data.
[0099] In an optional embodiment, the step of sequentially displaying the color signals corresponding to multiple sub-data in the rendering area of the graphical user interface includes: starting from a preset signal frame in the graphical user interface, sequentially displaying the color signals corresponding to multiple sub-data according to a preset display order; wherein, the preset signal frame is the first signal frame in the rendering area, the rendering area contains multiple signal frames, and each signal frame is used to display a color signal.
[0100] In an optional embodiment, the number of the aforementioned 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 one color channel.
[0102] In an optional embodiment, the data to be sent includes multiple characters; the step of color encoding the sub-data to obtain the color signal corresponding to the sub-data includes: determining the binary value corresponding to each character in the sub-data; and sequentially inputting the binary value corresponding to each character into the corresponding color channel to obtain the color signal corresponding to the sub-data.
[0103] In an optional embodiment, the first character in the data to be sent is a preset start flag, and the last character is a preset end flag. The step of the receiving client reading the color signal from the rendering area, converting the color signal into the corresponding data to be sent, and returning a response signal includes: the receiving client reading the color signal from the rendering area and decoding the color signal into sub-data according to a preset decoding rule; if the decoded sub-data contains a preset end flag, the receiving client sends a response signal to the game 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 step of receiving the client reading the color signal from the rendering area and decoding the color signal into sub-data according to a preset decoding rule includes: during the process of receiving the 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 rule; if it has not been recorded, 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 a specified location in the graphical user interface is configured as a color signal frame; the method further includes: reading the color value corresponding to the color signal frame at the specified location 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 and the game client are connected in communication, and reading the color signal of the rendering area through the receiving client.
[0106] In an optional embodiment, the preset color value includes at least one, and different preset color values are configured with corresponding signal types; wherein, the signal types include at least one of the following: a hold 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 whose signal type is a keep-connect signal; the above method further includes: setting the color signal frame at a 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; when it is determined that the color value corresponding to the color signal frame is the first preset color value, an acknowledgment signal is returned; if an acknowledgment signal is received, it is determined that the receiving client and the game client keep connected.
[0108] If no acknowledgment signal is received, reset the color signal frame at the specified location to the first preset color.
[0109] If the aforementioned functions are implemented as 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 this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal device, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0110] In the description of this disclosure, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this disclosure and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this disclosure. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0111] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.
Claims
1. A data transmission method, characterized in that, The method of displaying the graphical user interface corresponding to the game client through a terminal device includes: In response to a specified triggering operation, generate data to be sent; 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 the multiple sub-data, color encoding is performed on the sub-data to obtain the color signal corresponding to the sub-data; The color signals corresponding to the multiple sub-data are sequentially displayed in the rendering area of the graphical user interface, so that the 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; Receive a response signal and perform a preset action 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 includes: Starting from a preset signal frame in the graphical user interface, color signals corresponding to the plurality of sub-data are displayed sequentially according to a preset display order; wherein, the preset signal frame is the first signal frame in the rendering area, the rendering area contains a plurality of signal frames, and each signal frame is used to display a color signal.
3. The method according to claim 1 or 2, characterized in that, The number of 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 is matched with the number of color channels corresponding to the color signal; wherein, each character in the sub-data corresponds to one color channel.
5. The method according to claim 4, characterized in that, The data to be sent includes multiple characters; the step of color encoding the sub-data to obtain the color signal corresponding to the sub-data includes: Determine the binary value corresponding to each character in the sub-data; The binary value corresponding to each character is sequentially input into the corresponding color channel 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 marker, and the last character is a preset end marker; The steps 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 include: 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 contains the preset end flag, the receiving client sends a response signal to the game 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: During the process of the receiving client reading the color signal from the rendering area, it is determined whether the data identifier corresponding to the color signal has been recorded. If it has been recorded, the color signal is decoded into the sub-data according to the preset decoding rules. 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 a specified location in the graphical user interface is configured as a color signal frame; the method further includes: The receiving client reads the color value corresponding to the color signal frame at the specified location and determines whether the color value is a preset color value. If the color value is the preset value, it is determined that the receiving client and the game client are in communication connection, and the color signal of the rendering area is read 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 configured with corresponding signal types; wherein, the signal type includes at least one of the following: a hold 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 for a signal type of hold-up signal; the method further includes: At fixed intervals, the color signal frame at the specified position is set to the first preset color, so that the receiving client reads the color value corresponding to the color signal frame. When it is determined that the color value corresponding to the color signal frame is the first preset color value, an acknowledgment signal is returned. If the confirmation signal is received, it is determined that the receiving client and the game client maintain a connection; If the confirmation signal is not received, the color signal frame at the specified position is reset to the first preset color.
11. A data transmission device, characterized in that, The device for displaying the graphical user interface corresponding to the game client on a terminal device includes: The data generation module is used to generate data to be sent in response to a specified trigger operation; The data segmentation module 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; The data encoding module is used to perform color encoding on the multiple sub-data to obtain the color signal corresponding to the sub-data; The data display module is used to sequentially display the color signals corresponding to the plurality of sub-data in the rendering area of the graphical user interface, so that the receiving client can read the color signals from the rendering area, convert the color signals into corresponding data to be sent, and return a response signal; A signal receiving module is used to receive response signals and perform preset actions based on the response signals.
12. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing 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, which, when invoked and executed by a processor, cause 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