Cross-network communication method and device based on two-dimensional code, electronic equipment and computer program product

Through subcontracting processing and asynchronous updating of the QR code array, the problem of insufficient cross-network transmission bandwidth of QR codes is solved, and the safe and efficient data transmission is achieved.

CN119835027AActive Publication Date: 2025-04-15NO 15 INST OF CHINA ELECTRONICS TECH GRP
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411894572.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-04-15
Estimated Expiration
2044-12-20

AI Technical Summary

Technical Problem

In the prior art, the cross-network transmission bandwidth of QR codes is not high enough to meet the requirements of data security and high-speed transmission.

Method used

By acquiring communication data for subcontracting, the data packet is generated and converted into a QR code, displayed on the interactive interface, and the QR code array is asynchronously updated according to the changes in the communication data.

Benefits of technology

Without changing the physical isolation, efficient data transmission between the two networks is achieved, ensuring data security and high transmission rate, and solving the problem of cross-network transmission bandwidth bottleneck.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119835027A_ABST
    Figure CN119835027A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a cross-network communication method and device based on a two-dimensional code, electronic equipment and a computer program product, and belongs to the technical field of digital information transmission. Communication data are acquired, and the communication data are subjected to subpackage processing to generate data packets; converting the data packet into a corresponding two-dimensional code, and displaying a two-dimensional code array on one or more interactive interfaces; and according to the change of the communication data, updating one or more two-dimensional codes in the two-dimensional code array in an asynchronous communication mode. The embodiment of the invention is applied to data exchange between two or more networks, a communication sending end displays a two-dimensional code array on one or more interaction interfaces, and then updates one or more two-dimensional codes in the two-dimensional code array in an asynchronous communication mode according to the change of communication data. And the communication receiving end reads the updated one or more two-dimensional codes, and realizes cross-network communication between the two networks in a physical isolation state by using data information stored in the two-dimensional codes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of digital information transmission, and specifically to a cross-network communication method, device, electronic device and computer program product based on a QR code. Background Art

[0002] Physical isolation is an important security strategy, mainly used to ensure high security between networks or systems with different security levels. Its advantage is high security, but its disadvantage is that it affects the efficiency of information interaction. In some scenarios with relatively high security requirements in related technologies, the means to solve the data transmission between the two networks mainly include mobile storage media, dedicated isolation switching equipment, and QR code methods. All three methods have their disadvantages: the mobile storage medium process is cumbersome; dedicated isolation switching equipment requires the configuration of specialized technicians to maintain the equipment, and its security is still being verified. The ordinary QR code method does not meet certain requirements for the security of data injection and transmission, and the transmission bandwidth is not high enough to meet the requirements of data security and high transmission speed. In response to the above problems, no effective technical solutions have been proposed in the relevant technologies, and they are in urgent need of improvement. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to provide a cross-network communication method, device, electronic device and computer program product based on a QR code to solve the problem in the related art that the QR code cross-network transmission bandwidth is not high enough and cannot meet data security and high-speed transmission.

[0004] According to one aspect of an embodiment of the present application, a cross-network communication method based on a QR code is provided, which is applied to a communication sending end, and includes: acquiring communication data, and packetizing the communication data to generate a data packet; converting the data packet into a corresponding QR code, and displaying a QR code array on one or more interactive interfaces; and updating one or more QR codes in the QR code array in an asynchronous communication manner according to changes in the communication data.

[0005] According to at least one implementation of the embodiments of the present application, the updating of one or more QR codes in the QR code array in an asynchronous communication manner further includes: in the process of updating the QR code array, one or more QR codes in the QR code array are updated to new QR codes, and the remaining QR codes remain unchanged.

[0006] According to at least one implementation of the embodiments of the present application, updating one or more two-dimensional codes in the two-dimensional code array in an asynchronous communication manner according to changes in communication data further includes: detecting the data volume of one or more two-dimensional codes, and generating a two-dimensional code if the data volume does not exceed the data transmission upper limit of a two-dimensional code, or: if the data volume exceeds the data transmission upper limit of a two-dimensional code, dividing the data volume to form multiple data blocks and generating multiple two-dimensional codes corresponding to the multiple data blocks; in the two-dimensional code array, adjacent two-dimensional codes are divided into areas by segmentation markers, and an update counter is provided in the two-dimensional code array.

[0007] According to at least one implementation of the embodiments of the present application, the communication data is obtained and the communication data is packetized to generate data packets, specifically, the communication data is obtained through a subscription function of a message middleware at the communication sending end.

[0008] According to another aspect of the embodiments of the present application, a cross-network communication method based on QR codes is provided, which is applied to a communication receiving end, including: responding to a QR code array on an interactive interface of one or more communication sending ends, reading the QR code information in the QR code array; detecting changes in the QR code array in real time, and reading one or more updated QR code information.

[0009] According to at least one implementation of the embodiments of the present application, the response to the two-dimensional code array on the interactive interface of one or more communication sending ends, reading the two-dimensional code information in the two-dimensional code array, further includes: reading the segmentation marks between adjacent two-dimensional codes, and obtaining one or more two-dimensional codes from the two-dimensional code array; based on the update counter of the acquired one or more two-dimensional codes, judging whether the update counter is continuous, if the update counter is continuous, determining that the updated one or more two-dimensional codes have not lost frames, or: if the update counter is not continuous, determining that the updated one or more two-dimensional codes have lost frames.

[0010] According to another aspect of the embodiments of the present application, a cross-network communication method based on a QR code is provided, which is applied to the communication interaction between a communication sending end and a communication receiving end, including: the communication sending end obtains communication data, and subpackets the communication data to generate a data packet; the communication sending end converts the data packet into a corresponding QR code, and displays a QR code array on one or more interactive interfaces; the communication receiving end responds to the QR code array on one or more interactive interfaces provided by the communication sending end, and reads the QR code information in the QR code array; the communication sending end updates one or more QR codes in the QR code array in an asynchronous communication manner according to changes in the communication data; the communication receiving end responds to the QR code array on one or more interactive interfaces of the communication sending end, and reads the QR code information in the QR code array; the communication receiving end detects changes in the QR code array in real time, and reads one or more updated QR code information.

[0011] According to another aspect of an embodiment of the present application, a cross-network communication device based on a QR code is provided, wherein the cross-network communication device is a communication sending terminal, and the communication sending terminal has one or more interactive interfaces for displaying a QR code array. The communication sending terminal detects changes in communication data in real time, and updates one or more QR codes in the QR code array in an asynchronous communication manner, and / or: the cross-network communication device is a communication receiving terminal, and the communication receiving terminal responds to the QR code array of the interactive interface of the communication sending terminal, and reads the QR code information in the QR code array of the interactive interface; detects changes in the QR code array of the interactive interface of the communication sending terminal in real time, and reads one or more updated QR code information.

[0012] According to another aspect of an embodiment of the present application, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the described method.

[0013] According to still another aspect of the embodiments of the present application, a computer program product is provided, including a computer program, characterized in that the method described is implemented when the computer program is executed by a processor.

[0014] The beneficial technical effects of the embodiments of the present application are:

[0015] Data exchange between two networks can be achieved through a cross-network communication method based on QR codes without changing the physical isolation, and security and high transmission rate can be guaranteed. By establishing communication interaction between a communication sending end and a communication receiving end between the two networks, the communication sending end displays a QR code array on one or more interactive interfaces, and then updates one or more QR codes in the QR code array in an asynchronous communication manner according to changes in communication data. The communication receiving end reads the updated one or more QR codes, and uses the data information stored in the QR codes to achieve cross-network communication between the two networks in a physically isolated state.

[0016] The embodiment of the present application utilizes the characteristic that QR codes can store large amounts of data information. Multiple QR codes can be displayed on an interactive interface in the form of a QR code array, thereby ensuring the data transmission capacity. In addition, one or more QR codes in the QR code array can be updated through asynchronous communication, without the need to update all QR codes in the QR code array on the interactive interface at one time. This improves the efficiency of cross-network communication and solves the problem of cross-network transmission bandwidth bottleneck while ensuring security. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the specific implementation methods of the embodiments of the present application or the technical solutions in the related technologies, the drawings required for use in the specific implementation methods or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some implementation methods of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 This is a schematic diagram of a basic application scenario of an embodiment of the present application (single-machine cross-network transmission).

[0019] Figure 1A A schematic diagram of an application scenario of an embodiment of the present application (group cross-network transmission).

[0020] Figure 2 It is a flow chart of a cross-network communication method (communication sending end) based on QR code.

[0021] Figure 2A It is an architecture diagram of a cross-network communication system (communication sending end) based on QR codes.

[0022] Figure 3 It is a flow chart of a cross-network communication method (communication receiving end) based on QR code.

[0023] Figure 3A It is an architecture diagram of a cross-network communication system (communication receiving end) based on QR codes.

[0024] Figure 4It is a flowchart of the specific implementation method of the embodiment of the present application in some application scenarios.

[0025] Figure 5 It is a flowchart of a specific implementation method of an embodiment of the present application in group working mode.

[0026] Figure 6 It is a structural diagram of each functional module in a two-dimensional code transmission unit.

[0027] Figure 7 It is a QR code array effect diagram of the communication sending end interactive interface.

[0028] Figure 8 It is a flow chart of a cross-network communication method (communication sending end and communication receiving end) based on QR code.

[0029] Fig. 9 It is a structural diagram of an electronic device. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only implementation methods of a part of the embodiments of the present application, rather than all implementation methods. Based on the embodiments in the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the embodiments of the present application.

[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the embodiments of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0032] In addition, the terms "installed", "set", "provided with", "connected", "connected", and "socketed" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral structure; it can be a mechanical connection, or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be an internal connection between two devices, elements, or components. For those of ordinary skill in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.

[0033] It should be noted that, in the absence of conflict, the implementation methods and features in the embodiments of the present application can be combined with each other. The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0034] like Figure 1 The basic application scenario of the embodiment of the present application shown solves the problem of low efficiency of data transmission between information systems of different security levels under physical isolation. The embodiment of the present application provides a high-speed one-way transmission method and device based on batch generation of two-dimensional codes, which speeds up the workflow and improves work efficiency under the premise of ensuring data security. In the basic application scenario, the use of two-dimensional code transmission does not change the original physical isolation between systems. Compared with the use of optical disks and other transmission media in related technologies, many steps are reduced in the workflow, and there is no need to manage the transmission medium, which reduces the risk of leakage. The hardware requirements are lower than those of dedicated isolation equipment, and the technical requirements for maintenance personnel are not high. In addition, the two-dimensional code data is encrypted during the transmission process to prevent the leakage of two-dimensional code information and ensure the security of data interaction.

[0035] Figure 1 The basic application scenario shown includes network A and network B, where network A is equipped with message middleware, which can implement data distribution and dispatch agent, and perform data verification and QR code processing through thread pool. Since network A may involve group working mode, there will be multiple sets of data verification and QR code processing in the thread pool. Message middleware is also set in network B, which can implement data distribution and dispatch agent, and perform data verification and QR code processing through thread pool. Since network B may also involve group working mode, there will be multiple sets of data verification and QR code processing in the thread pool.

[0036] like Figure 1AAs shown, it is assumed that data is exchanged between two networks, network A and network B. Under the premise of not changing the physical isolation, one-way data transmission is realized through the message middleware and the device provided by the embodiment of the present application. The data transmission process is transparent and imperceptible to the user. The two sides across the network only pass the data through the message middleware. Data segmentation and asynchronous communication (asynchronous thread pool method) are used to improve the data transmission efficiency. By parameterizing various types of protocol data with templates and verifying the legitimacy of the data using template matching, illegal data injection and data theft are prevented, thereby improving the security of data transmission. Due to the limitation of the display screen size of the interactive interface, the number of QR codes displayed on the screen at the same time is limited. The number of QR codes displayed on the screen is configured by adaptive and manual methods. For each display area, the sending end has a channel to process the QR code data. For each QR code area on the receiving end, there is a channel to process the received data and distribute it to the target subject to complete the data transmission. Figure 1A In the communication receiving end of network B, multiple communication sending ends and multiple communication receiving ends interact with each other through cross-network communication. The communication sending end in network A is provided with message middleware, and also includes a resource scheduler, multiple scheduling agents, and multiple thread pools. The thread pool is used to implement data verification and two-dimensional code processing, and display a two-dimensional code array on the interactive interface of the communication sending end, so that the communication receiving end can read the two-dimensional code array and interact with the communication receiving end. The communication receiving end in network B is provided with message middleware, and also includes a resource scheduler, multiple scheduling agents, and multiple thread pools. The thread pool is used to implement two-dimensional code decoding and data processing, read the two-dimensional code array provided by the interactive interface of the communication receiving end, and interact with the communication sending end.

[0037] like Figure 2 As shown, in order to realize the above basic application scenarios and expand the application scenarios, the embodiment of the present application provides a cross-network communication method based on a QR code, which is applied to a communication sending end, including:

[0038] Step S1, acquiring communication data, and performing packet processing on the communication data to generate data packets.

[0039] Step S2, converting the data packet into a corresponding two-dimensional code, and displaying a two-dimensional code array on one or more interactive interfaces.

[0040] Step S3: updating one or more two-dimensional codes in the two-dimensional code array in an asynchronous communication manner according to changes in the communication data.

[0041] The technical solution provided by steps S1 to S3 takes the communication sending end as the execution subject, generates corresponding data packets by packetizing the communication data, and converts them into a two-dimensional code form, and displays the data in the form of a two-dimensional code array on one or more interactive interfaces for the communication receiving end to read and process the data. In the process of generating the two-dimensional code array, the two-dimensional code in the two-dimensional code array is allowed to be asynchronously updated according to the changes in the communication data, without waiting for all communication operations to be completed before updating the two-dimensional code. The two-dimensional code can be updated individually in the two-dimensional code array without waiting for the entire two-dimensional code array to be updated at one time, thereby improving the real-time and response speed of communication, and reducing the delay in data transmission, especially in scenarios where data is frequently updated, ensuring the continuity and timeliness of communication, so that devices in different network environments that are physically isolated can exchange data by scanning the two-dimensional code, and security can be ensured during the data exchange process, and the flexibility and applicability of communication are enhanced.

[0042] In step S1, the communication data is obtained, and the communication data is processed into packets to generate data packets, specifically: the communication data is obtained through the subscription function of the message middleware at the communication sending end. Step S1 adopts the message middleware method to transmit messages between different applications or services. The message middleware subscribes to a topic and creates a message queue for each topic to store messages sent to the topic, puts the message into the corresponding queue, and then distributes the message to the application or service subscribed to the topic according to the subscription relationship. In the process of receiving messages, the receiver regularly checks the message queue and pulls messages from the message queue. Once the message reaches the receiver, the receiver will send a confirmation reply to the message middleware to indicate that it has received the message. If multiple receivers subscribe to the same topic, the message middleware can send the message evenly to all receivers through the load balancing mechanism to avoid overloading a single receiver. Step S1 obtains communication data through the message middleware, which can improve the efficiency and reliability of message transmission, reduce the coupling between system components, and adapt to the communication requirements of high concurrency and high availability.

[0043] In the process of acquiring communication data and performing packet processing to generate data packets in step S1, conventional communication means may also be used, such as encoding conversion, encryption algorithm, etc. The relevant technologies are already familiar to those skilled in the art, so they will not be described in detail here.

[0044] In step S2, displaying a two-dimensional code array on one or more interactive interfaces may mean that the two-dimensional code is arranged in an array on the interactive interface, for example, the two-dimensional code array is a matrix of M rows and N columns. Of course, the form of the two-dimensional code array is not limited to the M*N matrix form. In some other embodiments, the two-dimensional code array may be a non-rectangular geometric pattern, such as a circle, a ring, various irregular geometric shapes, etc., as long as the communication receiving end can read the two-dimensional code array.

[0045] In step S3, the updating of one or more two-dimensional codes in the two-dimensional code array in an asynchronous communication manner further includes: in the process of updating the two-dimensional code array, one or more two-dimensional codes in the two-dimensional code array are updated to new two-dimensional codes, and the remaining two-dimensional codes remain unchanged.

[0046] Furthermore, in step S3, one or more two-dimensional codes in the two-dimensional code array are updated in an asynchronous communication manner according to changes in the communication data, further comprising:

[0047] Detect the data volume of one or more QR codes. If the data volume does not exceed the data transmission limit of a QR code, generate a QR code, or:

[0048] If the amount of data exceeds the upper limit of data transmission of a QR code, the amount of data is divided into multiple data blocks and multiple QR codes corresponding to the multiple data blocks are generated;

[0049] In the two-dimensional code array, adjacent two-dimensional codes are divided into regions by segmentation markers, and an update counter is provided in the two-dimensional code array.

[0050] In the improvement of step S3, the two-dimensional code array can be dynamically updated according to the change of communication data, including detecting whether the amount of data exceeds the transmission upper limit of a single two-dimensional code, and deciding whether to generate a single two-dimensional code or to divide the data into multiple blocks, thereby generating multiple corresponding two-dimensional codes. At the same time, in order to distinguish different two-dimensional codes and identify the update status of the two-dimensional code when performing image recognition, a segmentation marker and an update counter are introduced. By detecting the amount of data and dividing the data as needed, it is possible to adapt to data transmission requirements of different sizes, thereby improving the flexibility of data transmission. For data exceeding the transmission upper limit of a single two-dimensional code, it is divided into multiple data blocks and multiple two-dimensional codes are generated, thereby achieving efficient data transmission. The segmentation marker is used to divide adjacent two-dimensional codes into regions, and the update counter is used to identify the update status of the two-dimensional code, thereby increasing the reliability of data transmission. The asynchronous communication mode allows the system to respond quickly when the data is updated, thereby improving the real-time performance of the data transmission, and reducing the burden of the system when processing and displaying the two-dimensional code. In particular, when processing a large amount of data updates, the overall performance of the system is improved, which is suitable for a data environment with dynamic and high-frequency changes, and improves the efficiency of cross-network communication and user experience.

[0051] like Figure 2A As shown, the embodiment of the present application also provides a cross-network communication method based on a QR code, which is applied to a communication sending end, including:

[0052] The communication data acquisition module is used to acquire communication data and perform packet processing on the communication data to generate data packets.

[0053] The two-dimensional code array display module is used to convert the data packet into a corresponding two-dimensional code and display the two-dimensional code array on one or more interactive interfaces.

[0054] The two-dimensional code asynchronous updating module updates one or more two-dimensional codes in the two-dimensional code array in an asynchronous communication manner according to changes in communication data.

[0055] The implementation methods of the system described above are merely illustrative, for example, the various functional modules, units, or subsystems in the system may or may not be physically separated, or may or may not be physical units, that is, they may be located in the same place, or they may be distributed to multiple different systems and their subsystems or modules. Those skilled in the art may select some or all of the functional modules, units, or subsystems according to actual needs to achieve the purpose of the embodiments of the present application, and those of ordinary skill in the art may understand and implement the above-mentioned situations without creative work.

[0056] like Figure 3 As shown, the embodiment of the present application also provides a cross-network communication method based on a QR code, which is applied to a communication receiving end, including:

[0057] Step T1, in response to the two-dimensional code array on the interactive interface of one or more communication sending ends, read the two-dimensional code information in the two-dimensional code array.

[0058] Step T2, detecting the changes of the two-dimensional code array in real time, and reading one or more updated two-dimensional code information.

[0059] Step T3, reading the segmentation marks between adjacent two-dimensional codes, and obtaining one or more two-dimensional codes from the two-dimensional code array.

[0060] Step T4, based on the update counter of the acquired one or more two-dimensional codes, determine whether the update counter is continuous. If the update counter is continuous, determine that the updated one or more two-dimensional codes have no frame loss; or: if the update counter is not continuous, determine that the updated one or more two-dimensional codes have frame loss.

[0061] It is easy to understand that a communication receiving end can establish a communication connection with one or more communication sending ends, and the interaction interface and the communication sending end provided in steps T1 to T4 can exist on different communication devices.

[0062] The technical solution provided by steps T1 to T4 implements a method for communication based on a two-dimensional code at the communication receiving end. The communication receiving end can respond to the two-dimensional code array of the communication sending end, detect the change of the two-dimensional code in real time, and judge the integrity and continuity of the two-dimensional code information according to the segmentation mark and the update counter. By detecting the change of the two-dimensional code array in real time and reading the updated two-dimensional code information, the real-time synchronization of data can be ensured, so that the receiving party can obtain the latest data in time. By reading the segmentation mark between adjacent two-dimensional codes, the continuity and integrity of the two-dimensional code data can be ensured. By checking the continuity of the update counter, the method can determine whether the two-dimensional code information is frame-lost, and ensure the reliability of data transmission. If frame loss is detected, the communication receiving end can take corresponding error handling measures in time, such as requesting the retransmission of the lost two-dimensional code information, thereby improving the robustness of communication data transmission, reducing the burden on the system, optimizing the use of system resources, and improving system performance. It is suitable for various dynamically changing data environments, especially in scenarios with frequent data updates, and can maintain efficient data synchronization while optimizing user experience and system performance.

[0063] like Figure 3A As shown, the embodiment of the present application also provides a cross-network communication system based on a QR code, which is applied to a communication receiving end, including:

[0064] The two-dimensional code array information reading module responds to the two-dimensional code array on the interactive interface of one or more communication sending ends and reads the two-dimensional code information in the two-dimensional code array.

[0065] The two-dimensional code array change detection module detects the change of the two-dimensional code array in real time and reads one or more updated two-dimensional code information.

[0066] The two-dimensional code segmentation mark reading module reads the segmentation marks between adjacent two-dimensional codes and obtains one or more two-dimensional codes from the two-dimensional code array.

[0067] A QR code update counter acquisition module acquires the update counters of one or more QR codes, retrieves whether the update counters are continuous, and if so, determines that the updated one or more QR codes have no frame loss, or: if the update counters are not continuous, determines that the updated one or more QR codes have frame loss.

[0068] The implementation methods of the system described above are merely illustrative, for example, the various functional modules, units, or subsystems in the system may or may not be physically separated, or may or may not be physical units, that is, they may be located in the same place, or they may be distributed to multiple different systems and their subsystems or modules. Those skilled in the art may select some or all of the functional modules, units, or subsystems according to actual needs to achieve the purpose of the embodiments of the present application, and those of ordinary skill in the art may understand and implement the above-mentioned situations without creative work.

[0069] like Figure 4 and Figure 5 As shown, in some scenarios of device data collection, there will be high-frequency and high-concurrency data transmission. In this case, the processing efficiency of a single machine will restrict the real-time performance of cross-network transmission. In the specific implementation of the embodiment of the present application, multiple data cross-network transmission units are combined together, and the transmission data volume of each unit is reasonably allocated through the resource scheduler. A reasonable number of channels is configured in each unit to process each frame of data to realize the data transmission unit group working mechanism, and the data transmission bandwidth is infinitely extended in the horizontal direction, which will solve the bottleneck problem of cross-network transmission bandwidth.

[0070] exist Figure 4 In the application scenario shown, the steps of the cross-network communication method based on QR code are as follows:

[0071] Determine whether it is in group working mode and whether it is the master node. If it is in group working mode, the master node starts the resource scheduler to perform resource calculation and allocation tasks. If it is in stand-alone mode, data distribution is performed.

[0072] The scheduling agent receives tasks, wakes up idle channels, and updates resource information;

[0073] After processing the data, it is encoded into a QR code, and the QR code and number corresponding to each channel are updated asynchronously;

[0074] The image is scanned to identify the QR code and determine whether it is an updated QR code. If so, the subsequent operation is performed;

[0075] Decode the QR code, process the data, and then output it to the target location;

[0076] exist Figure 5 In the group working mode shown, the steps of the cross-network communication method based on QR code are specifically as follows: the group work starts, and the number of nodes is detected to be greater than 1. If the number of nodes is greater than 1, it is determined whether it is the main node. If it is the main node, the resource scheduler is started for resource scheduling, and then the agent receiving task is scheduled; if the number of nodes is less than or equal to 1, data distribution is performed, and the agent receiving task is scheduled; the idle channel is started, data verification is performed, QR code processing and display, image scanning, and then it is determined whether it is updated. If the QR code is updated, code recognition is performed, data processing and output are performed, and the group work ends, or: if the QR code is not updated, data processing and output are performed directly, and the group work ends.

[0077] like Figure 6 and Figure 7 As shown, in some implementations, there is only one transmission unit for sending a QR code array, and the initialization configuration of the single transmission unit is: the number of nodes is configured as 1 by default, and the master-slave node is the master node by default. The display screen needs to be configured with a reasonable number according to the screen size. The following figure shows a 3*4 layout, which can display 12 QR codes at the same time. At the same time, the thread pool will be set to a size of 12. Each thread corresponds to a channel, and each channel is responsible for the generation and display of a QR code in a display frame.

[0078] A transmission unit is divided into 7 functional modules: data distribution module, scheduling agent module, data verification module, QR code processing module, QR code scanning module, data processing module, and data output module. They are:

[0079] Data distribution module: In the case of a single transmission unit, there is no need to schedule multiple device resources, so the resource scheduling module is only responsible for subscribing to data from the message middleware and distributing the data to the scheduling agent. First, it checks whether the task queue is full. If not, it puts the data into the task queue.

[0080] Scheduling agent module: The scheduling agent is responsible for maintaining the number of channels, channel status, and task queue capacity. It is used to manage channel and task-related information, and can provide the resource scheduler with the current channel utilization rate. If the utilization rate does not reach 100%, the volume data of the task queue, etc. The scheduling agent receives data distributed by the data distribution module. Each channel will automatically receive tasks from the task queue in the idle state. If it receives a task, it will start processing and set its own status to busy. The scheduling agent updates the status. If it does not receive a task, it will continue to wait until there is a new task.

[0081] Data verification module: After receiving a new task, each channel first verifies the validity of the data. The system maintains a set of data protocol templates and each template has a number. The template set is also available on the receiving end and the encoding on both sides is consistent. The data is matched with the template. If the template contains the full amount of data, it is matched. After the match, the template number is encapsulated into the data. If the match fails, the data is considered illegal and the transmission is abandoned. There are special characters in the template to mark the position of the data that needs to be filled. After taking out the data at the template mark position in the received data, it is rearranged and transmitted. The advantage of this method is that it only transmits valid data, reducing the volume of transmitted data, and verifies illegal data through template matching to prevent illegal data injection. The data finally sent is not a complete information expression, which can prevent the information from being stolen after the QR code is stolen and improve the security of transmission.

[0082] QR code processing module: In one channel, the data taken from the template mark position in the previous step is assembled and isolated by adding special characters, and then combined into a frame of data in sequence. If the amount of data exceeds the transmission limit of a QR code, the data is divided according to the carrying capacity of a QR code to form multiple data blocks. At this time, in addition to the data and target location information, it is also necessary to add the number of blocks, block ID, block sequence number and other information in the data so that the receiving end can assemble the block data into a whole segment of data based on this information. After the block division is completed, the data will be encoded with a QR code, and after the encoding is completed, the QR code will be output to the interactive interface for display. The number of channels is set when the system is initialized. Each channel has a sequence number, and the QR code display area on the screen also has a corresponding sequence number. Therefore, when the QR code is generated, the channel notifies the corresponding display area to refresh the QR code. A counter is set for each channel, which counts from 0 to 9999 and is reset to zero after the maximum data is reached. Therefore, each time the QR code is refreshed, the counting code is also refreshed on the border of the display area. The QR code is displayed as shown in the figure. The receiving end can determine whether the QR code is updated and whether subsequent operations such as decoding are required based on the comparison between the code and the previous code data, so as to reduce the pressure on the receiving end. At the same time, based on whether the code is continuous compared with the previous code, it can be determined whether frame data is missed and the amount of missed frames, so that the receiving end can adjust the frequency of receiving and reading data to reduce the frame leakage rate.

[0083] QR code scanning module: The scanning module uses image processing technology to locate the starting position of the QR code display area according to the identification icon ┏ on the image, locate the identification icon ┚ to the corresponding end position, and identify the code behind ┏, record the code and compare it with the previous code. If they are different, it means that the QR code has been refreshed, and subsequent processing is performed. If they are the same, it means that the QR code has not changed and no processing is performed. If the code is continuous, there is no frame loss. If it is discontinuous, there is frame loss. The channel will adjust the reading frequency. Because the reading frequency is too high and the hardware performance cannot keep up, it will cause some decoding errors and other problems. A maximum frequency is calculated based on the full load of the device. The frequency is set lower than this frequency at the beginning and will be automatically adjusted according to usage.

[0084] The QR code scanning module disclosed herein can be applied to a cross-network communication device based on a QR code. To implement a cross-network communication method based on a QR code, the corresponding cross-network communication device can be in various forms. For example, the cross-network communication device is a communication sending terminal, and the communication sending terminal has one or more interactive interfaces for displaying a QR code array. The communication sending terminal detects changes in communication data in real time, and updates one or more QR codes in the QR code array in an asynchronous communication manner, and / or:

[0085] The cross-network communication device is a communication receiving terminal, which responds to the two-dimensional code array of the interactive interface of the communication sending terminal, reads the two-dimensional code information in the two-dimensional code array of the interactive interface; detects the changes of the two-dimensional code array of the interactive interface of the communication sending terminal in real time, and reads one or more updated two-dimensional code information.

[0086] The cross-network communication device based on QR codes disclosed in the specific implementation method here can realize data transmission between the communication sending terminal and the communication receiving terminal. The communication sending terminal is responsible for generating and updating the QR code array, while the communication receiving terminal is responsible for reading and identifying these QR codes to obtain information. The communication sending terminal and the communication receiving terminal use asynchronous communication to improve the efficiency and flexibility of data transmission based on QR codes, while ensuring the real-time and accuracy of data. Through the asynchronous communication method, the communication sending terminal can send data without waiting for the response of the receiving terminal, which improves the communication efficiency. The communication sending terminal can detect data changes in real time and update the QR code array to ensure that the receiving terminal obtains the latest data information. The receiving terminal can read the information in the QR code array and detect changes in real time to ensure the integrity and accuracy of the data. The QR code update mechanism of asynchronous communication also reduces the occupation of system resources, optimizes resource allocation, and improves system performance.

[0087] exist Figure 7In the two-dimensional code array in, adjacent two-dimensional codes are divided into regions by segmentation markers, and an update counter is set in the two-dimensional code array. The segmentation marker is configured as an identification icon, for example: a two-dimensional code can be determined from identification icon ┏ to identification icon ┚. Of course, the segmentation marker is not limited to identification icon ┏ and identification icon ┚. As long as the segmentation marker can be used to divide the region through image recognition technology, it can be applied to the embodiment of the present application. For example, it can be from identification icon T to identification icon T, and positioning in the two-dimensional code array can also be achieved. Exemplary, Figure 7 0018 in the figure is the update counter. The update counter in the previous moment may be 0017. The change from 0017 to 0018 realizes the continuous change of the update counter, indicating that no frame loss occurs during the update of the QR code. The update counter in the next moment may be 0019, indicating that no frame loss occurs when the QR code is updated from the current state to the new state. However, if the update counter is updated from 0018 to 0020 or 0021, the change of the update counter is not continuous, which means that frame loss occurs during the update process and it is necessary to request to send data again. Figure 7 The segmentation marker and update counter of the first row of two-dimensional codes are exemplarily marked. In other embodiments, segmentation markers and update counters are set for all two-dimensional codes in the two-dimensional code array. Figure 7 This is merely an exemplary description for the convenience of understanding the technical solution and does not mean that the interactive interface of the communication sending end is limited to a specific two-dimensional code array form or segmentation marker, update counter.

[0088] Data processing module: This module assembles the data decoded from the QR code and restores the data to the data when it was sent and input. If it is block data, it is necessary to assemble the data into a complete segment of data based on the number of blocks, block ID, block sequence number and other information. The same block ID is a group of data, and then the complete data is combined according to the number of blocks and block sequence number. After assembly, the corresponding template number is parsed out, and the corresponding template is matched according to the template number in the maintained template set. The data is split into n data items in sequence according to the special character separators, and the data items are filled in the template in sequence according to the special character placeholders, and finally the complete protocol data is obtained.

[0089] Data output module: This module sends the obtained original protocol data to the corresponding topic according to the target location information, so that the subsequent information system can subscribe to it to complete the subsequent business.

[0090] like Figure 8As shown, based on the specific implementation of any one of the embodiments of the present application, the embodiment of the present application also provides a cross-network communication method based on a QR code applied to a communication sending end and a communication receiving end. In the cross-network communication method of this embodiment, there are multiple execution subjects, including at least a communication sending end and a communication receiving end, and the method steps include:

[0091] Step Q1, the communication sending end obtains communication data, and divides the communication data into packets to generate data packets.

[0092] Step Q2, the communication sending end converts the data packet into a corresponding two-dimensional code and displays a two-dimensional code array on one or more interactive interfaces.

[0093] Step Q3, the communication receiving end reads the two-dimensional code information in the two-dimensional code array in response to the two-dimensional code array on one or more interactive interfaces provided by the communication sending end.

[0094] Step Q4: the communication sending end updates one or more two-dimensional codes in the two-dimensional code array in an asynchronous communication manner according to changes in the communication data.

[0095] Step Q5, the communication receiving end responds to the two-dimensional code array on one or more interactive interfaces of the communication sending end and reads the two-dimensional code information in the two-dimensional code array.

[0096] Step Q6, the communication receiving end detects the changes of the two-dimensional code array in real time and reads one or more updated two-dimensional code information.

[0097] The technical solution provided in steps Q1 to Q6 involves two execution entities, the communication sending end and the communication receiving end. Through steps such as packet processing, two-dimensional code conversion, asynchronous update and real-time detection, efficient and real-time transmission of communication data is achieved. The communication sending end performs packet processing on the communication data so that the data can adapt to the storage and transmission restrictions of the two-dimensional code. The communication sending end updates the two-dimensional code array in an asynchronous communication mode according to the data changes, which reduces the communication delay and improves the real-time performance of data transmission. The changes in the two-dimensional code array and the updated two-dimensional code information are detected in real time. The communication receiving end can ensure that the received data is the latest, which enhances the reliability of data transmission, supports communication across physically isolated different network environments, and makes data transmission not restricted by a specific network environment, which is suitable for specific application scenarios.

[0098] like Fig. 9 As shown, the embodiments of the present application provide a method, system, and device for cross-network communication based on a QR code, and also provide corresponding electronic devices and computer program products:

[0099] An electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes a cross-network communication method based on a QR code.

[0100] A computer program product includes a computer program, and when the computer program is executed by a processor, a cross-network communication method based on a QR code is implemented.

[0101] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, Fig. 9 A block diagram of an exemplary electronic device suitable for implementing the embodiments of the present application is shown. Fig. 9The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application. The electronic device can typically be a device in an electronic product based on the cross-network communication method based on the two-dimensional code in the above-mentioned embodiment. The electronic device 500 is expressed in the form of a general computing device. The components of the electronic device 500 may include but are not limited to: one or more processing units or processors 516, a memory 528, and a bus 518 connecting different system components (including a memory 528 and a processor 516). Bus 518 represents one or more of several types of bus structures, including a memory bus or a memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any bus structure in a variety of bus structures. For example, these architectures include but are not limited to an industrial standard architecture (ISA) bus, a microchannel architecture (MAC) bus, an enhanced ISA bus, a video electronics standard association (VESA) local bus, and a peripheral component interconnect (PCI) bus. The electronic device 500 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 500, including volatile and non-volatile media, removable and non-removable media. The memory 528 may include a computer system readable medium in the form of a volatile memory, such as a random access memory (RAM) 530 and / or a cache memory 532. The electronic device 500 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 534 may be used to read and write non-removable, non-volatile magnetic media (not shown in the figure, usually referred to as a "hard drive"). Although not shown in the figure, the storage system 534 may provide a disk drive for reading and writing a removable non-volatile disk (e.g., a floppy disk, a mobile hard disk, a hot-swappable storage medium), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media). In these cases, each drive may be connected to the bus 518 via one or more data medium interfaces. The memory 528 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of each specific implementation of the embodiments of the present application. A program / utility 540 having a set (at least one) of program modules 542 may be stored, for example, in the memory 528, such program modules 542 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 542 generally perform the functions and / or methods of the embodiments described in the embodiments of the present application.The electronic device 500 may also communicate with one or more external devices 514 (e.g., keyboard, pointing device, display 524, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 500, and / or communicate with any device that enables the electronic device 500 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an input / output (I / O) interface 522. In addition, the electronic device 500 may also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN) and / or public network, such as the Internet) through a network adapter 520. The network adapter 520 communicates with other modules of the electronic device 500 through a bus 518. It should be understood that, although not shown in the figure, those skilled in the art may use other hardware and / or software modules in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems. The processor 516 executes various functional applications and data processing by running the programs stored in the memory 528, such as implementing the methods provided by any one or more implementations of the embodiments of the present application.

[0102] In the description of the embodiment specification of the present application, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0103] All features disclosed in the specification of the embodiments of the present application, or steps in all disclosed methods or processes, except mutually exclusive features and / or steps, can be combined in any way. Any feature disclosed in this specification, unless otherwise described, can be replaced by other alternative features that are equivalent or have similar purposes. That is, unless otherwise described, each feature is just an example in a series of equivalent or similar features. Throughout the specification, the same reference numerals indicate the same elements.

[0104] Those skilled in the art will appreciate that the modules in the devices in the embodiments can be adaptively changed and set in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and in addition they can be divided into multiple submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including corresponding claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner can be combined in any combination. Unless otherwise explicitly stated, each feature disclosed in this specification (including corresponding claims, abstracts and drawings) can be replaced by an alternative feature that provides the same, equivalent or similar purpose.

[0105] Although the implementation methods of the embodiments of the present application are described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the embodiments of the present application, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A cross-network communication method based on a QR code, applied to a communication sending end, characterized in that: include: Acquire communication data, and perform packet processing on the communication data to generate data packets; Converting the data packet into a corresponding two-dimensional code, and displaying the two-dimensional code array on one or more interactive interfaces; According to the change of the communication data, one or more two-dimensional codes in the two-dimensional code array are updated in an asynchronous communication manner.

2. The cross-network communication method based on QR code according to claim 1, characterized in that: The updating of one or more two-dimensional codes in the two-dimensional code array in an asynchronous communication manner further includes: in the process of updating the two-dimensional code array, one or more two-dimensional codes in the two-dimensional code array are updated to new two-dimensional codes, and the remaining two-dimensional codes remain unchanged.

3. The cross-network communication method based on QR code according to claim 2, characterized in that: The updating of one or more two-dimensional codes in the two-dimensional code array in an asynchronous communication manner according to changes in the communication data further comprises: Detect the data volume of one or more QR codes, and if the data volume does not exceed the data transmission limit of one QR code, generate a QR code, or: If the amount of data exceeds the data transmission upper limit of a two-dimensional code, the amount of data is divided into multiple data blocks and multiple two-dimensional codes corresponding to the multiple data blocks are generated; In the two-dimensional code array, adjacent two-dimensional codes are divided into regions by segmentation markers, and an update counter is provided in the two-dimensional code array.

4. The cross-network communication method based on QR code according to claim 1, characterized in that: The acquiring of communication data and packetizing of the communication data to generate data packets specifically includes: acquiring the communication data through a subscription function of a message middleware at a communication sending end.

5. A cross-network communication method based on a QR code, applied to a communication receiving end, characterized in that: include: In response to a two-dimensional code array on an interactive interface of one or more communication sending terminals, read the two-dimensional code information in the two-dimensional code array; Detect changes in the two-dimensional code array in real time and read one or more updated two-dimensional code information.

6. The cross-network communication method based on QR code according to claim 5, characterized in that: The step of responding to the two-dimensional code array on the interactive interface of one or more communication sending terminals and reading the two-dimensional code information in the two-dimensional code array further includes: Reading segmentation marks between adjacent two-dimensional codes, and acquiring one or more two-dimensional codes from the two-dimensional code array; Based on the acquired update counter of one or more two-dimensional codes, determine whether the update counter is continuous. If the update counter is continuous, determine that the updated one or more two-dimensional codes have no frame loss; or: if the update counter is not continuous, determine that the updated one or more two-dimensional codes have frame loss.

7. A cross-network communication method based on a QR code, applied to the communication interaction between a communication sending end and a communication receiving end, characterized in that: include: The communication sending end obtains communication data, and performs packet processing on the communication data to generate data packets; The communication sending end converts the data packet into a corresponding two-dimensional code and displays a two-dimensional code array on one or more interactive interfaces; The communication receiving end reads the two-dimensional code information in the two-dimensional code array in response to the two-dimensional code array on one or more interactive interfaces provided by the communication sending end; The communication transmitting end updates one or more two-dimensional codes in the two-dimensional code array in an asynchronous communication manner according to changes in the communication data; The communication receiving end reads the two-dimensional code information in the two-dimensional code array in response to the two-dimensional code array on one or more interactive interfaces of the communication sending end; The communication receiving end detects the changes of the two-dimensional code array in real time and reads one or more updated two-dimensional code information.

8. A cross-network communication device based on a QR code, characterized in that: The cross-network communication device is a communication sending terminal, which has one or more interactive interfaces for displaying a two-dimensional code array. The communication sending terminal detects changes in communication data in real time, updates one or more two-dimensional codes in the two-dimensional code array in an asynchronous communication manner, and / or: The cross-network communication device is a communication receiving terminal, which responds to the two-dimensional code array of the interactive interface of the communication sending terminal, reads the two-dimensional code information in the two-dimensional code array of the interactive interface; detects the changes of the two-dimensional code array of the interactive interface of the communication sending terminal in real time, and reads one or more updated two-dimensional code information.

9. An electronic device, characterized in that: The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the method described in any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Intranet-extranet physical isolation data exchange method based on QR (quick response) code

    CN103268461A

  • One-way cross-network file transmission method based on QR two-dimensional code

    CN111832329A

  • Data transmission method and system based on dynamic two-dimensional code

    CN112651258A

  • Redis-based two-dimensional code processing method, device and equipment

    CN115017196A

  • File transmission method and transmission system based on two-dimensional code

    CN115766702A