Data communication method and device, electronic equipment and computer readable storage medium

By using the first process to process operation events in software development to obtain pixel data and identify the restore event message by the second process screenshot, the problem of restricted inter-process communication in the prior art is solved, and efficient inter-process data transmission is achieved.

CN120196461APending Publication Date: 2025-06-24NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510260028.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-05
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

The prior art is subject to security and performance limitations in software development, making it difficult to achieve efficient and flexible inter-process data transmission.

Method used

The first process processes the operation event to obtain pixel data and display it in the target interface; the second process intercepts the interface image, recognizes the pixel data, and restores it to an event message, thereby realizing communication between the first process and the second process.

Benefits of technology

A method is provided that is different from existing inter-process communication, which reduces the limitations of inter-process communication and realizes efficient inter-process data transfer.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120196461A_ABST
    Figure CN120196461A_ABST
Patent Text Reader

Abstract

The invention discloses a data communication method and device, electronic equipment and a computer readable storage medium, and the method comprises the steps: responding to an operation event received by a target interface of a first process, processing an event message corresponding to the operation event through the first process, and obtaining pixel data; displaying the pixel data in the target interface through the first process; intercepting an interface image of the target interface through a second process, and identifying the pixel data according to the interface image; and processing the pixel data through the second process to obtain the event message. According to the embodiment of the invention, the event message of the operation event in the target interface is processed into the pixel data through the first process, the pixel data is displayed in the target interface, the target interface is subjected to screenshot through the second process, the pixel data is identified according to the screenshot, and the event message is restored, so that communication between the first process and the second process is realized; and inter-process communication limitation is weakened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data communication technologies, and particularly relates to a data communication method, apparatus, electronic device, and computer-readable storage medium. Background Art

[0002] In modern software development, inter-process communication is a key technology that allows different processes to share data and resources. However, some software environments or platforms have imposed restrictions on existing inter-process communication due to security, performance, or other reasons. Summary of the Invention

[0003] Embodiments of this application provide a data communication method, apparatus, electronic device, and computer-readable storage medium.

[0004] In a first aspect, embodiments of this application provide a data communication method, the method including:

[0005] In response to an operation event received by a target interface of a first process, process an event message corresponding to the operation event through the first process to obtain pixel data;

[0006] Display the pixel data in the target interface through the first process;

[0007] Intercept an interface image of the target interface through a second process, and recognize the pixel data according to the interface image;

[0008] Process the pixel data through the second process to obtain the event message.

[0009] In a second aspect, embodiments of this application provide a data communication apparatus, the apparatus including:

[0010] A first processing module, configured to, in response to an operation event received by a target interface of a first process, process an event message corresponding to the operation event through the first process to obtain pixel data;

[0011] A display module, configured to display the pixel data in the target interface through the first process;

[0012] An identification module, configured to intercept an interface image of the target interface through a second process, and recognize the pixel data according to the interface image;

[0013] A second processing module, configured to process the pixel data through the second process to obtain the event message.

[0014] In a third aspect, an embodiment of the present application further provides an electronic device, including a memory storing multiple instructions; a processor loads the instructions from the memory to execute the steps of any one of the data communication methods provided by the embodiments of the present application.

[0015] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium storing multiple instructions, and the instructions are suitable for being loaded by a processor to execute the steps of any one of the data communication methods provided by the embodiments of the present application.

[0016] In a fifth aspect, an embodiment of the present application further provides a computer program product, including a computer program or instructions, and when the computer program or instructions are executed by a processor, the steps in any one of the data communication methods provided by the embodiments of the present application are implemented.

[0017] With the solution of the embodiment of the present application, in the embodiment of the present application, in response to an operation event received by the target interface of the first process, the event message corresponding to the operation event is determined through the first process, the event message is processed into pixel data through the first process, and the pixel data is displayed in the target interface through the first process; the target interface is captured through the second process, the pixel data is recognized according to the captured image, the second process restores the pixel data to obtain the event message. The technical solution of the present application realizes communication between the first process and the second process by converting between the event message and the pixel data, then using the screenshot function of the second process to obtain the interface image, recognizing the pixel data according to the interface image, and restoring the pixel data to the event message. The technical solution of the present application provides another inter-process communication method different from the existing inter-process communication, reducing the limitations of inter-process communication. Description of the Drawings

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those skilled in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0019] Figure 1 It is a schematic flowchart of an embodiment of a data communication method provided in an embodiment of the present application;

[0020] Figure 2 It is a schematic flowchart of an embodiment of event message processing in a data communication method provided in an embodiment of the present application;

[0021] Figure 3 It is a schematic flowchart of an embodiment of pixel data processing in a data communication method provided in an embodiment of the present application;

[0022] Figure 4 It is a schematic diagram of a scenario triggered by an operation event in the data communication method provided in the embodiment of the present application;

[0023] Figure 5 It is a schematic diagram of a game interface scenario in the data communication method provided in the embodiment of the present application;

[0024] Figure 6 It is a schematic diagram of a pixel data scenario in the data communication method provided in the embodiment of the present application;

[0025] Figure 7 It is a schematic diagram of a scenario for an operation event response in the data communication method provided in the embodiment of the present application;

[0026] Figure 8 It is a schematic diagram of the structure of the data communication device provided in the embodiment of the present application;

[0027] Figure 9 It is a schematic diagram of the structure of the electronic device provided in the embodiment of the present application. Detailed implementation manners

[0028] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application. At the same time, in the description of the embodiments of the present application, the terms "first", "second", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance. Thus, the features defined with "first", "second" may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, "a plurality" means two or more, unless otherwise specifically defined.

[0029] The embodiments of the present application provide a data communication method, device, electronic device, and computer-readable storage medium.

[0030] The data communication method provided in the embodiments of the present application can be applied to an electronic device, which includes: a terminal device and a server, and the terminal device and the server can communicate bidirectionally through a network.

[0031] Specifically, the data communication method in the embodiments of the present application can be executed by an electronic device. Optionally, the electronic device can be a device such as a mobile phone, a tablet computer, a smart Bluetooth device, a laptop computer, a game console, or a personal computer (PC).

[0032] In an optional embodiment, the electronic device includes a device with receiving and transmitting hardware, that is, a device with receiving and transmitting hardware capable of performing two-way communication on a two-way communication link. Optionally, the electronic device can be independent or a network or cluster of devices composed of multiple electronic devices, including but not limited to computers, network hosts, a single network server, a set of multiple network servers, or a cloud server composed of multiple servers. Among them, the cloud server is composed of a large number of computers or network servers based on cloud computing.

[0033] The following will be described in detail with reference to the accompanying drawings. In this embodiment, the execution entity is taken as an example of an electronic device. It should be noted that the description order of the following embodiments does not limit the preferred order of the embodiments. Although the logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order from that shown in the drawings.

[0034] Refer to Figure 1 , Figure 1 is a schematic flowchart of an embodiment of an electronic device in the data communication method provided in the embodiments of the present application; the specific process of the data communication method can be as follows: Step 101 to Step 104, where:

[0035] Step 101, in response to an operation event received by the target interface of the first process, process the event message corresponding to the operation event through the first process to obtain pixel data.

[0036] The data communication method in the embodiments of the present application is applied to an electronic device. An application program is set in the electronic device, and the type and number of the application program are not limited. In the embodiments of the present application, the target application program is taken as an example for description.

[0037] The target application program runs in the electronic device, and the target interface of the target application program is displayed on the display interface of the electronic device. The target application program in the embodiments of the present application can be a game program, an instant messaging program, an e-commerce program, a sports and entertainment program, or other third-party interactive programs.

[0038] For the operation event received by the target interface in the embodiments of the present application, the electronic device responds to the operation event received in the target interface by the first process. In addition to the first process in the embodiments of the present application, there is also a second process that needs to communicate with the first process.

[0039] The first process and the second process represent two different processes, and the number of the first process and the second process is not limited; for example, the first process is one and the second process is one; or the first process is one and the second process is multiple, etc. The application programs corresponding to the two different processes are not limited; for example, the first process is the process of a plug-in in a game; the second process is the process of another plug-in of the game.

[0040] In the embodiment of the present application, the first process and the second process pre-define the operation events for interaction, and the first process and the second process record the pre-defined operation events. Among them, the types of the pre-defined operation events are not limited. For example, the operation events are click input events, editing events.

[0041] After the operation event received by the target interface of the first process in the embodiment of the present application, the first process determines whether the operation event is an event for interaction between the first process and the second process pre-defined. If the operation event is not an event for interaction between the first process and the second process pre-defined, the first process makes a normal response.

[0042] If the operation event is an event for interaction between the first process and the second process pre-defined, the event message of the operation event is processed by the first process to obtain pixel data, so as to display the pixel data in the target interface. Specifically, in the embodiment of the present application, processing the event message of the operation event by the first process to obtain pixel data includes the following steps:

[0043] 1. Obtain the event message of the operation event through the first process, that is, the first process obtains the event message corresponding to the operation event. The event content in the event message is not limited. For example, it includes at least one of event type, event timestamp, event source, user information, event description, event level, event ID, related resources, location information, and context information; among them, event type: describes the category or nature of the event, such as login, file access, system error, etc.; timestamp: records the specific time and date when the event occurs; event source: indicates which system, application program, or user triggers the event; user information: user ID, user name, or other identity identification information involved; event description: details the content of the event or the situation that occurs; event level: identifies the severity or priority of the event, such as information, warning, error, emergency, etc.; event ID: a unique number or identifier that identifies the event. Related resources: information such as files, databases, network resources, etc. involved; location information: the physical or network location where the event occurs, such as IP address, host name, etc.; context information: other background information or environmental variables related to the event.

[0044] 2. Process the event message of the operation event through the first process to obtain pixel data. Among them, the way the first process processes the event message is negotiated by the first process and the second process. After the first process processes and converts the event message into pixel data, it is convenient for the second process to restore the event message according to the pixel data. For example, in the embodiments of the present application, the conversion methods of event messages and pixel data between the first process and the second process are as follows: specifically:

[0045] Conversion method 1: Associate the event message with the pixel data of the QR code type. Event message: Access database 1 to obtain historical records, corresponding to QR code 1; and so on, different event messages correspond to different QR codes;

[0046] Conversion method 2: Associate the event message with the pixel data of the barcode type. Event message: Access database 2 to obtain historical records, corresponding to barcode 2; and so on, different event messages correspond to different barcodes;

[0047] Conversion method 3: Corresponding the characters in the event message with pixel values, and forming pixel data from multiple pixel values. For example, it is pre-agreed between the first process and the second process that a pixel point is composed of RGB, with a total of 3 * 8 bits. The first process needs to convert the three characters "123" in the event message into pixel values. It can correspond 1 to R, 2 to G, and 3 to B; then the RGB of this pixel value is the ASCII code corresponding to 123 (American Standard Code for Information Interchange: The American Standard Code for Information Interchange is a computer coding system based on the Latin alphabet), that is, 49, 50, 51; draw the pixel value used for a pixel point with #495051. The second process reads the pixel value of this pixel point, and then splits the RGB to know that the string is 123.

[0048] It should be noted that the conversion methods of event messages and pixel data in the embodiments of the present application are not limited. Users can set different processing methods according to actual usage conditions to complete the conversion between event messages and pixel data.

[0049] After the target interface of the first process in the embodiments of the present application receives the operation event, it first determines whether the operation event is an operation event negotiated by the first process and the second process. After determining that the operation event is an operation event negotiated between the first process and the second process, the first process processes and converts the event message to obtain pixel data, which can ensure data security with the least amount of data processing.

[0050] Step 102, display the pixel data in the target interface through the first process.

[0051] In the embodiment of the present application, the pixel data is displayed in the target interface by the first process. That is, since the existing inter-process interaction between the first process and the second process may be restricted. For example, the first process restricts the existing inter-process communication due to security, performance, or other reasons. Among them, the existing inter-process communication method is restricted. The existing communication methods include: TCP (Transmission Control Protocol) communication, shared memory, pipes, message queues, etc. In the embodiment of the present application, the pixel data is displayed in the target interface by the first process to facilitate the second process to restore event information according to the pixel data after taking a screenshot.

[0052] In the embodiment of the present application, the display position of the pixel data is not limited, and it is better not to affect other functions of the first process. For example, the pixel data is displayed in the head area, the end area, or other set areas of the game interface. In the embodiment of the present application, the display position of the pixel data is described. On the one hand, it is to facilitate not affecting other functions of the first process. On the other hand, it is to facilitate the second process to quickly lock the pixel data for event message restoration.

[0053] In the embodiment of the present application, the first process and the second process can perform inter-process communication without adopting the existing inter-process communication method, still achieving fast communication and making inter-process operations more convenient.

[0054] Step 103, the second process intercepts the interface image of the target interface and identifies the pixel data according to the interface image.

[0055] In the embodiment of the present application, the second process intercepts the interface image of the target interface. The second process identifies the interface image according to the display position in the protocol with the first process to determine the pixel data. In the embodiment of the present application, the method for the second process to identify the interface image and determine the pixel data is not limited. Specifically:

[0056] Implementation method 1: The protocol between the first process and the second process is that the head area and the end area are the display positions of the pixel data. The second process obtains the pixel data from the corresponding positions in the head area and the end area of the interface image according to the protocol.

[0057] Implementation method 2: The protocol between the first process and the second process is that according to the window layout, the xxx display element in the window is the display position of the pixel data. The second process identifies the interface image according to the protocol to determine the xxx display element, and the second process obtains the pixel data from the xxx display element.

[0058] Implementation method 3: Protocol between the first process and the second process: The standard interface image of the target interface is fixed target pixel data. The second process recognizes the interface image to obtain candidate pixel data. The second process compares the target pixel data with the candidate pixel data and sets the pixel data in the candidate pixel data that does not match the target pixel data as the pixel data corresponding to the event message.

[0059] It should be noted that in the embodiments of the present application, the method for the second process to determine the pixel data corresponding to the event message according to the interface image is not limited. In the embodiments of the present application, the display position of the pixel data corresponding to the operation information can be determined according to other information such as the format of the page elements in the window and the nature of the window.

[0060] In the embodiments of the present application, the second process intercepts the interface image of the target interface. In this way, although the first process sets the inter-process access restriction, the second process can obtain the interface image of the target interface through the screenshot function and recognize the pixel data according to the interface image, which is convenient for restoring the event message operation.

[0061] Step 104, process the pixel data through the second process to obtain the event message.

[0062] In the embodiments of the present application, the second process processes the pixel data to obtain the event message. The method for the second process to process the pixel data to obtain the event message in the embodiments of the present application is not limited. For example, in the embodiments of the present application, the conversion methods of different event messages and pixel data between the first process and the second process are as follows:

[0063] Conversion method 1: Associate the pixel data of the QR code type with the event message. The second process determines that the pixel data is QR code 1, and the event message corresponding to QR code 1 is: access database 1 to obtain historical records; and so on, different QR codes correspond to different event messages;

[0064] Conversion method 2: Associate the pixel data of the barcode type with the event message. The pixel data of the second process is barcode 2, and the event message corresponding to barcode 2 is to access database 2 to obtain historical records; and so on, different barcodes correspond to different event messages;

[0065] Conversion method three: Corresponding the pixel values with the characters in the event message. The second process determines the characters according to the pixel values in the pixel data, and the second process forms the event message of the operation event with the characters. For example, it is pre-agreed between the first process and the second process that a pixel point is composed of RGB, with a total of 3 * 8 bits. If the first process wants to convert the three characters "123" in the event message into pixel values, it can correspond 1 to R, 2 to G, and 3 to B. Then the RGB of this pixel point is the ASCII code corresponding to 123, that is, 49, 50, 51. The pixel point is drawn with #495051. The second process reads the pixel value of this pixel point, splits the RGB, and then it can know that the string is 123. The second process sorts and combines the recognized string to obtain the event message of the operation event.

[0066] It should be noted that the conversion method between the event message and the pixel data in the embodiments of the present application is not limited. Users can set different processing methods according to actual usage conditions to complete the conversion between the event message and the pixel data.

[0067] In the embodiments of the present application, in response to the operation event received by the target interface of the first process, the first process processes the event message corresponding to the operation event to obtain pixel data; the first process displays the pixel data in the target interface; the second process intercepts the interface image of the target interface and recognizes the pixel data according to the interface image; the second process processes the pixel data to obtain the event message. In the embodiments of the present application, the event message is processed into pixel data by the first process, and the pixel data is displayed in the target interface by the first process. The second process takes a screenshot of the target interface and restores the pixel data according to the screenshot to obtain the event message. The technical solution of the present application realizes the communication between the first process and the second process by converting between the event message and the pixel data, then using the screenshot function of the second process to obtain the interface image, recognizing the pixel data according to the interface image, and restoring the pixel data to the event message. The technical solution of the present application provides another inter-process communication method different from the existing inter-process communication, reducing the limitations of inter-process communication.

[0068] Refer to Figure 2 , Figure 2 is a schematic flowchart of an embodiment of event message processing in the data communication method provided in the embodiments of the present application; in the data communication method, in response to the operation event received by the target interface of the first process, the specific process of the first process processing the event message corresponding to the operation event to obtain pixel data can be as follows: steps 201 to 202, where:

[0069] Step 201, in response to an operation event received by the target interface of the first process, determine the event message corresponding to the operation event, and generate a target message that conforms to the target format based on the event message.

[0070] The data communication method in the embodiments of the present application is applied to an electronic device. In the electronic device, in response to an operation event received by the first process in the target interface, the types of operation events in the embodiments of the present application are not limited.

[0071] Specifically, the operation event includes a click event; the first process determines the event message corresponding to the operation event, including: setting the click instruction corresponding to the click event and the instruction content associated with the click instruction as the event message. For example, the button click event string is {"op": "btn_clicked"}, and the button click event string is set as the event message.

[0072] It can be understood that the event message in the embodiments of the present application can be different according to different operation events. For example, if the operation event is an edit input event, the event message can be the characters entered in the edit. The source of the event message in the present application does not constitute a limitation to the technical solution.

[0073] In the embodiments of the present application, the first process and the second process have a pre-agreement in advance. The first process first adjusts the format of the event message to obtain a target message in the target format, and then converts the target message in the target format into pixel data. At the same time, when the second process restores the pixel data, the second process converts the pixel data into a target message in the target format, and then restores the event message based on the target information in the target format.

[0074] The target format in the embodiments of the present application is not limited. For example, the target format may include verification information, or the target format may be one or more. The target format stipulates the sorting of other relevant contents in the event message. In the embodiments of the present application, the first process generates a target message that conforms to the target format based on the event message. Among them, the target format is for the convenience of conversion between the event message and the pixel data, and the specific form of the target format is not limited. For example, the target format defines the character format, character delimiter, character sorting, etc.

[0075] Converting the operation information into the target format in the embodiments of the present application facilitates the conversion between the event message and the pixel data. At the same time, it facilitates the second process to perform verification when restoring the event message. Specifically, the target format indicates the pre-defined communication message format between the first process and the second process. The target format includes: a start bit, a message length bit, a message content bit, and an end bit; among them, the number of characters of the start bit, the message length bit, the message content bit, and the end bit is not limited, and the sorting is not limited either.

[0076] In the embodiment of the present application, generating a target message that conforms to a target format based on the event message includes:

[0077] 1. Inputting a predefined start identifier between it and the second process into the start bit through the first process;

[0078] 2. Identifying the event message through the first process to obtain the message length, and inputting the message length into the message length bit;

[0079] 3. Inputting the event message into the message content bit through the first process; and,

[0080] 4. Inputting a predefined end identifier between it and the second process into the end bit through the first process to obtain a target message that conforms to the target format.

[0081] In the embodiment of the present application, the start identifier predefined between the first process and the second process is input into the start bit through the first process. The start bit is the position where the start identifier is placed. The specific source and form of the start identifier are not limited. The start identifier is used to determine the starting point for extracting the event message. For example, the start identifier is ※, ◎, ● or others. The start bit is set in the target format to display the start identifier. The start identifier can facilitate the second process to perform information verification as quickly as possible, so as to extract the accurate event message.

[0082] The first process identifies the event message to obtain the message length. The message length in the embodiment of the present application can be the number of characters of the message or others. The message length is input into the message length bit through the first process to facilitate reading the event message according to the message length later.

[0083] The electronic device inputs the event message into the message content bit through the first process. In the embodiment of the present application, the number of positions of the message content bit is determined according to the message length. For example, the first process identifies the event message and determines that the message length of the event message is 32 characters. Then the first process sets the message content bit to 32 bits. Further, the first process sends the event message to the message content bit.

[0084] The electronic device inputs the predefined end identifier between it and the second process into the end bit through the first process to obtain a target message that conforms to the target format. The end bit is the position where the end identifier is placed. The specific source and form of the end identifier are not limited. The end identifier is used to verify whether the extracted event message is complete. For example, the end identifier is &, *, @ or others. The end bit is set in the target format to display the end identifier. The end identifier can facilitate extracting the accurate event message.

[0085] In an embodiment of the present application, the first process determines an event message corresponding to an operation event and generates a target message conforming to a target format based on the event message, which can facilitate the first process to input a target message in a standard format, thereby facilitating the interaction between the first process and the second process.

[0086] Step 202: Convert the target message into pixel data through the first process.

[0087] In an embodiment of the present application, the electronic device converts the target message into pixel data through the first process to turn the event message of the operation event into pixel data. In the embodiment of the present application, the event message is displayed through pixel data, so that there is no need for direct interaction between the second process and the first process. The second process periodically takes screenshots to determine the pixel data, and at the same time, the interference to the target interface can be reduced.

[0088] The electronic device converts the target message into pixel data through the first process, including:

[0089] 1. For each character in the target message through the first process, convert the character into a target pixel value according to a first preset mapping relationship; wherein, the first preset mapping relationship is a mapping relationship between different characters and their corresponding pixel values;

[0090] 2. Arrange and combine the target pixel values through the first process to obtain the pixel data.

[0091] In an embodiment of the present application, for each character in the target message, the first process of the electronic device converts the character into a target pixel value according to a first preset mapping relationship; wherein, the first preset mapping relationship is a mapping relationship between different characters and their corresponding pixel values. The characters and pixel values in the first preset mapping relationship can be predefined. For example, characters are divided into Arabic data, Chinese characters, English letters, and other special symbols, and the pixel values can be defined according to the three colors and brightness values of the interface. For example, each pixel value can store 32 bits of information because it consists of four colors: red, green, blue, and transparency (RGBA), and each color can represent 8-bit data.

[0092] The first process arranges and combines the target pixel values to obtain pixel data, so that the pixel data is displayed on the target interface. By displaying the pixel data on the target interface, the display occupies less space and does not affect the normal display of the interface. At the same time, when restoring the data through the pixel data, only mapping processing is required, and no other character recognition operations are required, which can make the restoration of the event message more convenient.

[0093] That is to say, in the embodiment of the present application, in response to an operation event received by the target interface of the first process, an event message corresponding to the operation event is determined, and a target message in a target format is generated based on the event message; the target message is converted into pixel data by the first process, and the first process of the electronic device inputs the target message in the standard format, so as to facilitate the interaction between the first process and the second process. The first process further performs pixel data conversion, making it convenient to read later.

[0094] Referring to Figure 3 , Figure 3 is a schematic flowchart of an embodiment of pixel data processing in the data communication method provided in the embodiment of the present application; in this data communication method, the specific process of processing the pixel data by the second process to obtain the event message may be as follows in steps 301 to 302, where:

[0095] Step 301: The second process converts the pixel data to obtain a target message in the target format.

[0096] In the embodiment of the present application, the electronic device converts the pixel data through the second process to obtain a target message in the target format. Among them, the conversion method from pixel data to the target message is not limited. For example, each pixel value can store 32-bit information, and the pixel value is composed of four colors: red, green, blue, and transparency (RGBA). Each color can represent 8-bit data, and each pixel point corresponds to eight characters; the second process obtains the target message in the target format according to the relationship between the pixel value and the character. Specifically:

[0097] 1. For each target pixel value in the pixel data, the second process converts the target pixel value into a target character according to a second preset mapping relationship, where the second preset mapping relationship is the mapping relationship between different pixel values and their corresponding pixel values;

[0098] 2. The second process arranges and combines the target characters to obtain the target message in the target format.

[0099] In the embodiment of the present application, the electronic device converts each target pixel value in the pixel data into a target character according to a second preset mapping relationship through the second process, where the second preset mapping relationship is the mapping relationship between different pixel values and their corresponding characters; in the embodiment of the present application, the second preset mapping relationship and the first preset mapping relationship are usually the same. In different application scenarios, those skilled in the art can adaptively adjust the first preset mapping relationship and the second preset mapping relationship.

[0100] The electronic device arranges and combines each target character through the second process to obtain a target message in a target format. That is, in the embodiments of the present application, the electronic device sorts the target characters through the second process to obtain a target message, and the target message is an event message in a set format, which is convenient for accurately determining the event message.

[0101] In the embodiments of the present application, the second process converts the pixel data to obtain a target message in a target format, so that the second process can obtain a target message in a standard format, which is convenient for extracting the event message of the operation event from the target message. Specifically:

[0102] Step 302, parse the target message according to the target format through the second process to obtain the event message.

[0103] In the embodiments of the present application, the second process of the electronic device parses the target message according to the target format to obtain the event message of the operation event. Among them, the target format includes: a start bit, a message length bit, a message content bit, and an end bit; the electronic device parses the target message according to the target format through the second process to obtain the event message, including:

[0104] 1. Verify the start identifier of the start bit in the target message through the second process;

[0105] 2. When the start identifier is verified to be passed through the second process, extract the event message from the message content bit of the target message according to the message length in the message length bit;

[0106] 3. Perform integrity verification on the event message according to the end identifier in the end bit of the target message through the second process to obtain the verified event message.

[0107] That is, the second process of the electronic device extracts the start identifier of the start bit in the target message, and the second process verifies the start identifier to determine whether the start identifier is pre-agreed. When the start identifier verification fails, the second process does not perform subsequent processing.

[0108] When the start identifier is verified to be passed by the second process of the electronic device, the second process obtains the message length in the message length bit, and the message length is not specifically limited; the second process extracts the event message from the message content bit of the target message according to the message length in the message length bit. That is, if the message length is 32, the message content bit corresponds to 32, and the second process obtains the event message.

[0109] After the second process of the electronic device extracts the event message, the second process obtains the end identifier from the end bit of the target message. If the second process obtains the end identifier, it determines that the integrity verification of the event message passes. If the second process does not obtain the end identifier, it determines that the integrity verification of the event message fails. In the embodiments of the present application, the event message that passes the verification is obtained through the second process.

[0110] In the embodiments of the present application, the second process converts the pixel data to obtain a target message in a target format; the second process parses the target message according to the target format to obtain the event message. In the embodiments of the present application, while ensuring the accuracy of data processing, the function of the normal process is not affected, and inter-process communication is completed.

[0111] In an embodiment of the present application, the target format further includes a message identifier bit. Generating a target message that conforms to the target format based on the event message includes:

[0112] The first process determines the message identifier of the event message and inputs the message identifier into the message identifier bit to obtain a target message that conforms to the target format.

[0113] That is, in the embodiments of the present application, when the electronic device responds to an operation event received by the target interface of the first process, the electronic device processes the event message corresponding to the operation event through the first process to obtain pixel data; in the embodiments of the present application, the second process and the first process do not communicate directly, which results in that the second process cannot determine the trigger time of the operation event of the first process in real time, and the second process does not know the time to capture the interface image of the target interface. Therefore, in the embodiments of the present application, the second process can set a screenshot time interval according to the function of the first process. For example, the screenshot time interval is 10s.

[0114] When the second process performs screenshot processing through the time interval, there may be a situation of information omission or message duplication. Based on this, in the embodiments of the present application, the target format further includes a message identifier bit, and the message identifier in the message identifier bit can determine whether the second process has processed the same event message.

[0115] In the embodiments of the present application, the source of the message identifier is not limited. For example, the message identifier can be a sequential digital identifier, or the message identifier can also be the timestamp information of the operation event; or the message identifier is obtained by performing a hash process on the message information. In the embodiments of the present application, the generation method of the message identifier can be determined according to the specific scenario.

[0116] In the embodiment of the present application, the electronic device determines the message identifier of the event message through the first process. For example, since the operation event is different from the historical operation event, the first process adds one to the most recent historical message identifier to obtain a new message identifier, and the electronic device inputs the message identifier into the message identifier bit to obtain a target message that conforms to the target format.

[0117] In the embodiment of the present application, adding a message identifier can facilitate the second process of the electronic device to determine the processing method of the target message and / or respond to the operation event.

[0118] The data communication method in the embodiment of the present application further includes:

[0119] 1. Extract the message identifier in the target message according to the target format through the second process;

[0120] 2. Verify the message identifier through the second process to process the target message and / or respond to the operation event according to the verification result.

[0121] In the embodiment of the present application, the electronic device extracts the message identifier in the target message according to the target format through the second process; the electronic device verifies the message identifier through the second process. If the verification result of the message identifier is a historical message identifier, the target message is not processed or the operation event is not responded to; if the verification result of the message identifier is the latest message identifier, the target message is processed and / or the operation event is responded to.

[0122] In the embodiment of the present application, setting the message identifier can facilitate the second process to process the target message or respond to the operation event, and avoid invalid data processing steps.

[0123] Further, in the embodiment of the present application, since the second process does not know the state of the first process, the second process determines whether the target interface exists by performing interface detection on the display interface. If the target interface does not exist, the screenshot is taken again after an interval; if the target interface exists, the electronic device intercepts the interface image of the target interface through the second process and recognizes the pixel data according to the interface image.

[0124] In the embodiment of the present application, the second process and the first process perform a protocol, and the second process only needs to check the target interface corresponding to the first process, reducing invalid data processing steps.

[0125] In the embodiment of the present application, since the interface elements in the target interface are not limited, in order to facilitate the interaction between the first process and the second process, the electronic device displays the pixel data in the target interface through the first process, including: displaying the pixel data in the target area of the target interface through the first process; in the embodiment of the present application, displaying the pixel data in the target area facilitates subsequent data reading.

[0126] Further, the electronic device intercepts an interface image of the target interface through a second process, and recognizes the pixel data according to the interface image, including: intercepting an interface image of the target interface through the second process, recognizing a target area in the interface image, and obtaining the pixel data from the target area. In the embodiment of the present application, the second process of the electronic device recognizes the target area in the interface image and obtains pixel data from the target area, which can reduce the amount of data processing and improve the data processing rate.

[0127] For ease of understanding, in the embodiment of the present application, a game program is taken as an example for illustration. Refer to Figures 4 - 7 , where Figure 4 is a schematic diagram of a scenario triggered by an operation event in the data communication method provided in the embodiment of the present application; Figure 5 is a schematic diagram of a game interface in the data communication method provided in the embodiment of the present application; Figure 6 is a schematic diagram of pixel data in the data communication method provided in the embodiment of the present application; Figure 7 is a schematic diagram of an operation event response in the data communication method provided in the embodiment of the present application; in the embodiment of the present application, on the plugin platform of the game, the conventional inter-process communication method is restricted, but the game allows the plugin to draw any content in the game window. For example,

[0128] The first process corresponds to the sender (game plugin):

[0129] 1. Initialize the sending ID. Among them, the first process plugin will record a "sending ID", which will increase with each successful message sending. Its role is to help the receiving party confirm whether this message is new or an old message that has been processed previously.

[0130] 2. Create a message format. Among them, in order to ensure the consistency of the information format, the first process plugin will organize each message into a fixed format:

[0131] Start flag: The first two bytes are fixed and used to identify to the receiving party whether the message is legal (for example, 0xAA and 0xBB).

[0132] Message identifier: The next two bytes are used to mark the message identifier (message ID) to distinguish each message.

[0133] Message length: The next two bytes represent the length of the message;

[0134] Message content: Starting from the seventh byte is the actual message content. For example, a button click event can be encapsulated into a json string {"op": "btn_clicked"};

[0135] End flag: The last two bytes are fixed and used to mark the end of the message (e.g., 0xCC and 0xDD).

[0136] 3. Message conversion, where the first process plugin converts this information into color dots (pixel values of pixels) in the image. One color part (e.g., red) of each pixel represents 8-bit information (i.e., one byte).

[0137] 4. Drawing the message, where the first process plugin uses the functions provided by the game to draw this pixel data in a specific area at the upper left corner of the display interface, refer to Figure 6 .

[0138] 5. Incrementing the sending ID, where after the first process successfully sends a message each time, the "sending ID" will automatically increase so that the receiving party can identify new messages by checking the ID.

[0139] The second process corresponds to the receiving party, i.e., My.exe, where:

[0140] 1. Initializing the receiving ID, where the second process receiving party also maintains a "receiving ID" to identify whether the received message is brand new. For old messages that have been processed, they can be directly ignored.

[0141] 2. Finding the window, where the second process receiving party will regularly check all windows in the system to find a specific target window (e.g., "Game World"). This is usually achieved through the Windows API (such as FindWindow).

[0142] 3. Timed window image capture. Once the second process finds the target window, the second process receiving party starts a separate thread to regularly capture the image data of the window. Every certain period (e.g., every 100 milliseconds), the interface image is captured using BitBlt.

[0143] 4. Processing the captured image data, where the second process reads the pixel data starting from the upper left corner of the captured image:

[0144] Start flag: Check whether the first two bytes are the predetermined legal flags (such as 0xAA and 0xBB).

[0145] Message ID: Read the last two bytes to confirm whether this is a new message. If this ID is different from the one read last time, it means this is a new event message.

[0146] Message length: Read the length of the message.

[0147] Message content: Read the actual message content according to the message length. For example, if the received string is the corresponding button click event, {"op": "btn_clicked"};

[0148] End flag: Check whether the last two bytes are the predetermined end flags (such as 0xCC and 0xDD).

[0149] If all parts meet the expectations, it means this is a complete and legal message and can be further processed.

[0150] 5. Message parsing and processing; Among them, in the embodiment of the present application, once the second process confirms that the message is complete and legal, the second process will convert the pixel color data obtained from the image back to the original byte information. Using the predefined message format, extract the actual text or data content from these bytes for subsequent processing or response. For example, by parsing the message content {"op": "btn_clicked"} read in the previous step, it is read that the op field is btn_clicked, so My.exe knows that the button has been clicked and can respond to the corresponding event.

[0151] In the embodiment of the present application, the plug-in for sending information converts the text information to be sent into colored dots (pixels) in the image. Each pixel can store 32 bits of information because it consists of four colors: red, green, blue, and transparency (RGBA), and each color can represent 8-bit data. In this way, the first process corresponding to the plug-in can "encode" the text information into a series of colored pixels and draw them at a specific position in the game window. The program for receiving information:

[0152] The program corresponding to the second process will periodically capture the image of the game window and check the pixels at specific positions; by interpreting the color values of these pixels, the second process can convert them back to the original text information, thus realizing the reception of the message; through the function of allowing the drawing content of the first process plug-in in the embodiment of the present application, information transmission is successfully achieved in a restricted environment.

[0153] This embodiment also provides a data communication device, which can be specifically integrated in an electronic device. For example, as Figure 8 shown, the data communication device may include:

[0154] The first processing module 401 is configured to, in response to an operation event received by the target interface of the first process, process the event message corresponding to the operation event through the first process to obtain pixel data;

[0155] The display module 402 is configured to display the pixel data in the target interface through the first process;

[0156] An identification module 403, configured to intercept an interface image of the target interface through a second process, and identify the pixel data according to the interface image;

[0157] A second processing module 404, configured to process the pixel data through the second process to obtain the event message.

[0158] Optionally, in the data communication device of this embodiment, the first processing module 401 is further configured to:

[0159] In response to an operation event received by the target interface of the first process, determine the event message corresponding to the operation event, and generate a target message conforming to the target format based on the event message;

[0160] Convert the target message into pixel data through the first process.

[0161] Optionally, the target format indicates a pre-defined communication message format between the first process and the second process, and the target format includes: a start bit, a message length bit, a message content bit, and an end bit;

[0162] In the data communication device of this embodiment, when the first processing module 401 executes generating a target message conforming to the target format based on the event message, it includes:

[0163] Input, through the first process, a pre-defined start identifier between it and the second process into the start bit;

[0164] Identify the message length of the event message through the first process, and input the message length into the message length bit;

[0165] Input the event message into the message content bit through the first process; and,

[0166] Input, through the first process, a pre-defined end identifier between it and the second process into the end bit to obtain a target message conforming to the target format.

[0167] Optionally, the target format further includes a message identifier bit. When the first processing module 401 in the data communication device executes generating a target message conforming to the target format based on the event message, it includes:

[0168] Determine the message identifier of the event message through the first process, and input the message identifier into the message identifier bit to obtain a target message conforming to the target format.

[0169] Optionally, when the first processing module 401 in the data communication device executes converting the target message into pixel data through the first process, it includes:

[0170] For each character in the target message through the first process, convert the character into a target pixel value according to a first preset mapping relationship; wherein, the first preset mapping relationship is a mapping relationship between different characters and their corresponding pixel values;

[0171] Arrange and combine the target pixel values through the first process to obtain the pixel data.

[0172] Optionally, the operation event includes a click event; the first processing module 401 in the data communication device executes determining the event message corresponding to the operation event, including:

[0173] Set the click instruction corresponding to the click event and the instruction content associated with the click instruction as the event message.

[0174] Optionally, the second processing module 404 in the data communication device is further configured to:

[0175] Convert the pixel data through the second process to obtain a target message in a target format;

[0176] Parse the target message according to the target format through the second process to obtain the event message.

[0177] Optionally, when the second processing module 404 in the data communication device executes converting the pixel data through the second process to obtain a target message in a target format, it includes:

[0178] For each target pixel value in the pixel data through the second process, convert the target pixel value into a target character according to a second preset mapping relationship, wherein the second preset mapping relationship is a mapping relationship between different pixel values and their corresponding pixel values;

[0179] Arrange and combine the target characters through the second process to obtain the target message in the target format.

[0180] Optionally, the target format includes: a start bit, a message length bit, a message content bit, and an end bit;

[0181] When the second processing module 404 in the data communication device executes parsing the target message according to the target format to obtain the event message, it includes:

[0182] Verify the start identifier of the start bit in the target message through the second process;

[0183] When the start identifier is verified through the second process, an event message is extracted from the message content bits of the target message according to the message length in the message length bits;

[0184] Through the second process, integrity verification is performed on the event message according to the end identifier in the end bit of the target message, and the verified event message is obtained.

[0185] Optionally, the data communication device further includes:

[0186] The message identifier in the target message is extracted by the second process according to the target format;

[0187] The second process verifies the message identifier to process the target message and / or respond to the operation event according to the verification result.

[0188] Optionally, the data communication device further includes:

[0189] The second process performs interface detection on the display interface;

[0190] If the second process detects the target interface, the second process intercepts an interface image of the target interface and identifies the pixel data according to the interface image.

[0191] Optionally, the display module 402 in the data communication device includes:

[0192] The pixel data is displayed in the target area of the target interface through the first process;

[0193] The recognition module 403 in the data communication device includes:

[0194] The second process intercepts an interface image of the target interface and recognizes the pixel data obtained from the target area of the interface image.

[0195] In the solution of the embodiment of the present application, the program data communication device processes the event message corresponding to the operation event received by the target interface of the first process through the first process to obtain pixel data; displays the pixel data in the target interface through the first process; intercepts the interface image of the target interface through the second process, and recognizes the pixel data according to the interface image; processes the pixel data through the second process to obtain the event message. In the embodiment of the present application, the event message is processed into pixel data through the first process, and the pixel data is displayed in the target interface through the first process. The second process takes a screenshot of the target interface, and restores the pixel data according to the screenshot to obtain the event message. The technical solution of the present application realizes the communication between the first process and the second process by converting between the event message and the pixel data, then using the screenshot function of the second process to obtain the interface image and restore the event message, thereby reducing the limitations of inter-process communication.

[0196] Correspondingly, the embodiment of the present application further provides an electronic device, which may be a terminal, and the terminal may be an electronic device such as a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC), or a personal digital assistant (PDA). Alternatively, the electronic device may be a server.

[0197] As Figure 9 shown, Figure 9 is a schematic structural diagram of the electronic device provided by the embodiment of the present application. The electronic device 500 includes a processor 501 with one or more processing cores, a memory 502 with one or more computer-readable storage media, and a computer program stored on the memory 502 and executable on the processor. Among them, the processor 501 is electrically connected to the memory 502. Those skilled in the art can understand that the format of the electronic device shown in the figure does not constitute a limitation on the electronic device, and it may include more or fewer components than shown in the figure, or combine some components, or have different component arrangements.

[0198] The processor 501 is the control center of the electronic device 500, connects various parts of the entire electronic device 500 through various interfaces and lines, executes various functions of the electronic device 500 and processes data by running or loading software programs and / or units stored in the memory 502, and calling data stored in the memory 502, thereby monitoring the entire electronic device 500. The processor 501 may be a central processing unit CPU, a graphics processing unit GPU, a network processor (NP), etc., and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiment of the present application.

[0199] In an embodiment of the present application, the processor 501 in the electronic device 500 will load instructions corresponding to the scenario processes of one or more application programs into the memory 502 according to the following steps, and the processor 501 will run the application programs stored in the memory 502 to implement various functions, such as:

[0200] In response to an operation event received by the target interface of the first process, process the event message corresponding to the operation event through the first process to obtain pixel data;

[0201] Display the pixel data in the target interface through the first process;

[0202] Intercept the interface image of the target interface through the second process, and recognize the pixel data according to the interface image;

[0203] Process the pixel data through the second process to obtain the event message.

[0204] In the embodiment of the present application, the event message is processed into pixel data through the first process, and the pixel data is displayed in the target interface through the first process. The target interface is captured through the second process, and the pixel data is restored according to the screenshot to obtain the event message. The technical solution of the present application realizes the communication between the first process and the second process by converting between the event message and the pixel data, then using the screenshot function of the second process to obtain the interface image, recognizing the pixel data according to the interface image, and restoring the pixel data to the event message. The technical solution of the present application provides another inter-process communication method different from the existing inter-process communication, reducing the limitations of inter-process communication.

[0205] For the specific implementation of each of the above operations, reference may be made to the previous embodiments, which will not be elaborated here.

[0206] Optionally, as Figure 9 shown, the electronic device 500 further includes: a touch display screen 503, a radio frequency circuit 504, an audio circuit 505, an input unit 506, and a power supply 507. Among them, the processor 501 is electrically connected to the touch display screen 503, the radio frequency circuit 504, the audio circuit 505, the input unit 506, and the power supply 507 respectively. Those skilled in the art can understand that Figure 9 the format of the electronic device shown in

[0207] The touch display screen 503 can be used to display a graphical user interface and receive operation instructions generated by a user acting on the graphical user interface. The touch display screen 503 may include a display panel and a touch panel. Among them, the display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, videos, and any combination thereof. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. The touch panel can be used to collect touch operations of the user on or near it (such as operations of the user using any suitable object or accessory such as a finger or a stylus on or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute the corresponding program. Optionally, the touch panel can include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch square field of the user, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 501, and can receive and execute the commands sent by the processor 501. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 501 to determine the type of touch event. Subsequently, the processor 501 provides a corresponding visual output on the display panel according to the type of touch event. In the embodiments of the present application, the touch panel and the display panel can be integrated into the touch display screen 503 to implement input and output functions. However, in some embodiments, the touch panel and the touch panel can be implemented as two independent components to implement input and output functions. That is, the touch display screen 503 can also be used as part of the input unit 506 to implement the input function.

[0208] The radio frequency circuit 504 can be used to receive and transmit radio frequency signals to establish wireless communication with a network device or other electronic devices through wireless communication, and receive and transmit signals with the network device or other electronic devices.

[0209] The audio circuit 505 can be used to provide an audio interface between the user and the electronic device through a speaker and a microphone. The audio circuit 505 can transmit the electrical signal converted from the received audio data to the speaker, and the speaker converts it into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 505 and then converted into audio data. After the audio data is output to the processor 501 for processing, it is sent to another electronic device through the radio frequency circuit 504, or the audio data is output to the memory 502 for further processing. The audio circuit 505 may also include an earphone jack to provide communication between a peripheral earphone and the electronic device.

[0210] The input unit 506 can be used to receive input numerical, character information or user feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0211] The power supply 507 is used to supply power to each component of the electronic device 500. Optionally, the power supply 507 can be logically connected to the processor 501 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 507 can also include any components such as one or more DC or AC power supplies, recharge power failure detection circuits, power converters or inverters, and power status indicators.

[0212] Although Figure 9 not shown in [description], the electronic device 500 may also include a camera, a sensor, a Wi-Fi module, a Bluetooth module, etc., which will not be elaborated here.

[0213] In the above embodiments, the descriptions of the respective embodiments have their own focuses. For parts not elaborated in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0214] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling relevant hardware through instructions. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0215] For this reason, an embodiment of the present application provides a computer-readable storage medium, in which multiple computer programs are stored. The computer programs can be loaded by a processor to execute any one of the data communication methods provided by the embodiments of the present application. The computer programs can execute the steps of the following data communication method:

[0216] In response to an operation event received by the target interface of the first process, process the event message corresponding to the operation event through the first process to obtain pixel data;

[0217] Display the pixel data in the target interface through the first process;

[0218] Intercept the interface image of the target interface through the second process, and recognize the pixel data according to the interface image;

[0219] Process the pixel data through the second process to obtain the event message.

[0220] In the technical solution of the embodiment of the present application, in response to an operation event received by a target interface of a first process, the first process processes an event message corresponding to the operation event to obtain pixel data; the first process displays the pixel data in the target interface; a second process intercepts an interface image of the target interface and recognizes the pixel data according to the interface image; the second process processes the pixel data to obtain the event message. In the embodiment of the present application, the first process processes the event message into pixel data, and the first process displays the pixel data in the target interface. The second process takes a screenshot of the target interface, restores the pixel data according to the screenshot, and obtains the event message. The technical solution of the present application converts between the event message and the pixel data, then uses the screenshot function of the second process to obtain the interface image, recognizes the pixel data according to the interface image, and restores the pixel data to the event message, so as to implement communication between the first process and the second process. The technical solution of the present application provides another inter-process communication method different from the existing inter-process communication, reducing the limitations of inter-process communication.

[0221] For the specific implementation of each of the above operations, reference may be made to the previous embodiments and will not be elaborated here.

[0222] Among them, the computer-readable storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc.

[0223] Since the computer program stored in the computer-readable storage medium can execute any data communication method provided by the embodiment of the present application, the beneficial effects that can be achieved by any data communication method provided by the embodiment of the present application can be realized. For details, refer to the previous embodiments and will not be elaborated here.

[0224] According to one aspect of the present application, there is also provided a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the methods provided in the various optional implementation manners in the above embodiments.

[0225] In the above embodiments of the data communication device, computer-readable storage medium, electronic device, and computer program product, the descriptions of the respective embodiments have their own focuses. For parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes and beneficial effects of the above-described data communication device, computer-readable storage medium, computer program product, electronic device, and their corresponding units can refer to the description of the data communication method in the above embodiments, and will not be elaborated herein specifically.

[0226] The above has introduced in detail a data communication method, device, electronic device, computer-readable storage medium, and computer program product provided by the embodiments of the present application. Specific examples are used herein to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.

Claims

1. A data communication method, characterized in that: The method comprises: In response to an operation event received by a target interface of the first process, the first process processes an event message corresponding to the operation event to obtain pixel data; Displaying the pixel data in the target interface through the first process; Intercepting an interface image of the target interface through a second process, and identifying the pixel data according to the interface image; The pixel data is processed by the second process to obtain the event message.

2. The method according to claim 1, characterized in that The step of responding to an operation event received by a target interface of the first process and obtaining pixel data by processing an event message corresponding to the operation event by the first process includes: In response to an operation event received by a target interface of the first process, determining an event message corresponding to the operation event, and generating a target message conforming to a target format based on the event message; The target message is converted into pixel data by the first process.

3. The method according to claim 2, characterized in that The target format indicates a predefined communication message format between the first process and the second process, and the target format includes: a start bit, a message length bit, a message content bit, and an end bit; The generating a target message conforming to a target format based on the event message comprises: Inputting a predefined start identifier between the first process and the second process into the start position through the first process; Identifying the event message through the first process to obtain a message length, and inputting the message length into the message length bit; inputting the event message into the message content position through the first process; and, The first process inputs a predefined end identifier between the first process and the second process into the end position to obtain a target message conforming to a target format.

4. The method according to claim 2, characterized in that: The target format also includes a message identification bit, and the generating of a target message conforming to the target format based on the event message includes: The message identifier of the event message is determined through the first process, and the message identifier is input into the message identifier bit to obtain a target message that conforms to the target format.

5. The method according to claim 2, characterized in that: The converting the target message into pixel data through the first process includes: For each character in the target message, the character is converted into a target pixel value according to a first preset mapping relationship through the first process; wherein the first preset mapping relationship is a mapping relationship between different characters and their corresponding pixel values; The target pixel values ​​are arranged and combined through the first process to obtain the pixel data.

6. The method according to claim 2, characterized in that The operation event includes a click event; and the determining of an event message corresponding to the operation event includes: The click instruction corresponding to the click event and the instruction content associated with the click instruction are set as event messages.

7. The method according to claim 1, characterized in that The step of processing the pixel data by the second process to obtain the event message includes: The pixel data is converted by the second process to obtain a target message in a target format; The target message is parsed by the second process according to the target format to obtain the event message.

8. The method according to claim 7, characterized in that The step of converting the pixel data through the second process to obtain a target message in a target format includes: For each target pixel value in the pixel data, the target pixel value is converted into a target character according to a second preset mapping relationship through the second process, wherein the second preset mapping relationship is a mapping relationship between different pixel values ​​and their corresponding pixel values; The target characters are arranged and combined through the second process to obtain a target message in the target format.

9. The method according to claim 7, characterized in that: The target format includes: a start bit, a message length bit, a message content bit and an end bit; The step of parsing the target message according to the target format by the second process to obtain the event message includes: Verifying the start identifier of the start bit in the target message through the second process; When the start identifier is verified through the second process, an event message is extracted from the message content bit of the target message according to the message length in the message length bit; The second process performs an integrity check on the event message according to the end identifier in the end bit of the target message to obtain the verified event message.

10. The method according to claim 7, characterized in that The method further comprises: extracting, by the second process, a message identifier in the target message according to the target format; The message identifier is verified through the second process to process the target message and / or respond to the operation event according to the verification result.

11. The method according to claim 1, characterized in that: The method further comprises: Performing interface detection on the display interface through the second process; If the target interface is detected through the second process, an interface image of the target interface is captured through the second process, and the pixel data is identified according to the interface image.

12. The method according to any one of claims 1 to 11, characterized in that: The displaying the pixel data in the target interface through the first process includes: Displaying the pixel data in a target area of ​​the target interface through the first process; The step of intercepting the interface image of the target interface through the second process and identifying the pixel data according to the interface image includes: The interface image of the target interface is intercepted through the second process, and the interface image is identified to obtain the pixel data from the target area.

13. A data communication device, characterized in that: The device comprises: A first processing module, configured to respond to an operation event received by a target interface of a first process, and to process an event message corresponding to the operation event through the first process to obtain pixel data; A display module, configured to display the pixel data in the target interface through the first process; A recognition module, used for capturing an interface image of the target interface through a second process, and recognizing the pixel data according to the interface image; The second processing module is used to process the pixel data through the second process to obtain the event message.

14. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps of the data communication method according to any one of claims 1 to 12.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps of the data communication method according to any one of claims 1 to 12.