Cross-network data transmission method and system
The cross-network data transmission method using Excel files and OCR technology addresses the challenge of data transfer between isolated networks, enabling efficient and large-capacity data exchange without TCP/IP, enhancing collaboration and data sharing.
Patent Information
- Application Number
- CN202210346200.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-02
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2042-04-02
AI Technical Summary
Existing technologies are unable to efficiently transmit data between isolated and unreachable networks or devices due to the limitations of traditional TCP/IP protocols, requiring inefficient methods such as data copying through mobile storage media.
A cross-network data transmission method utilizing an Excel file to encode data into key-value pairs, displayed with a start signal, and recognized using OCR technology to transfer data between isolated networks without relying on TCP/IP protocols.
Enables fast and accurate data transmission of up to 133.7M characters at once, overcoming network isolation and improving work efficiency by eliminating the need for manual data entry and media transfer.
Smart Images

Figure CN114866531B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of communication technology, and in particular relates to a cross-network data transmission method and system. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] Network interconnection and reachability are the basis of communication. Relying on traditional TCP / IP protocol or other communication protocols, it is basically impossible to transmit data between two isolated and unreachable networks or devices.
[0004] Cross-network data transmission refers to data transmission between two isolated networks that cannot be accessed via TCP / IP or other communication protocols. The traditional method is to copy data through mobile storage media or repeatedly enter data on different devices, which is very inefficient. Summary of the invention
[0005] In order to solve the technical problems existing in the above-mentioned background technology, the present invention provides a cross-network data transmission method and system, which realizes fast and accurate data transmission between mutually isolated and unreachable networks or devices.
[0006] In order to achieve the above object, the present invention adopts the following technical solution:
[0007] A first aspect of the present invention provides a cross-network data transmission method, which is applied to a data sending end and comprises the following steps:
[0008] Receive the data to be transmitted, convert the data to key-value pairs according to the encoding protocol, and write all the converted key-value pairs into an Excel file;
[0009] In response to the data sending instruction, a start signal is displayed, and after waiting for a set time interval, the Excel file is opened and scrolled, so that the data receiving end can obtain the picture of the displayed content and identify it, obtain the key-value pair and write it into the database.
[0010] Furthermore, each row of the Excel file represents a key-value pair, and the last row is filled with an end character.
[0011] Furthermore, before the obtained key-value pairs are written into the database, duplicate data needs to be removed.
[0012] Furthermore, the specific steps of the identification are:
[0013] At a set time interval, obtain the image of the display content of the data sending end, convert the image into a black and white binary image and then perform recognition;
[0014] When the start signal is recognized, the photo is converted into a black and white binary image and saved, and the saved black and white binary image is recognized to obtain a key-value pair until the end character is recognized, and the recognized key-value pair is deduplicated and written into the database.
[0015] A second aspect of the present invention provides a cross-network data transmission method, which is applied to a data receiving end and comprises the following steps:
[0016] Get the image of the display content of the data sending end;
[0017] Identify the image, obtain key-value pairs and write them into the database;
[0018] Among them, the steps for the data sending end to display the display content are: receiving the data to be transmitted, converting the data to be transmitted into key-value pairs according to the encoding protocol, and writing all the converted key-value pairs into an Excel file; responding to the data sending instruction, displaying a start signal, and after waiting for a set time interval, opening the Excel file and scrolling the display.
[0019] Furthermore, the specific steps of identifying the image are:
[0020] At a set time interval, obtain the image of the display content of the data sending end, convert the image into a black and white binary image and then perform recognition;
[0021] When the start signal is recognized, the photo is converted into a black and white binary image and saved, and the saved black and white binary image is recognized to obtain a key-value pair until the end character is recognized, and the recognized key-value pair is deduplicated and written into the database.
[0022] A third aspect of the present invention provides a cross-network data transmission system, applied to a data sending end, comprising:
[0023] The data encoding module is configured to: receive data to be transmitted, convert the data to be transmitted into key-value pairs according to the encoding protocol, and write all the converted key-value pairs into an Excel file;
[0024] The data sending module is configured to: respond to the data sending instruction, display a start signal, and after waiting for a set time interval, open the Excel file and scroll the display so that the data receiving end can obtain the picture of the display content and identify it, obtain the key-value pair and write it into the database.
[0025] A fourth aspect of the present invention provides a cross-network data transmission system, applied to a data receiving end, comprising:
[0026] A data receiving module is configured to: obtain a picture of the display content of the data sending end;
[0027] A data identification module is configured to: identify the image, obtain a key-value pair and write it into a database;
[0028] Among them, the steps for the data sending end to display the display content are: receiving the data to be transmitted, converting the data to be transmitted into key-value pairs according to the encoding protocol, and writing all the converted key-value pairs into an Excel file; responding to the data sending instruction, displaying a start signal, and after waiting for a set time interval, opening the Excel file and scrolling the display.
[0029] A fifth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in a cross-network data transmission method as described above.
[0030] A sixth aspect of the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in a cross-network data transmission method as described above are implemented.
[0031] Compared with the prior art, the present invention has the following beneficial effects:
[0032] The invention discloses a cross-network data transmission method, which aims at the problem that networks are isolated from each other and unreachable, and data cannot be transmitted through TCP / IP protocol or other communication protocols, and proposes an OCR recognition method. Since an Excel file can store 65536 rows, each cell can store 32676 characters (can display 2041 characters), and the maximum amount of data that can be transmitted at one time is 133.7M characters, calculated based on the displayable characters. This can greatly save the need to move storage media to copy data, repeatedly enter data, etc. due to network failure, and greatly improve work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0034] Figure 1 is a flow chart of a method for cross-network data transmission according to a first embodiment of the present invention;
[0035] Figure 2This is a structural diagram of a cross-network data transmission system according to Embodiment 3 of the present invention;
[0036] Figure 3 This is a structural diagram of a cross-network data transmission system according to a fourth embodiment of the present invention;
[0037] Figure 4 It is a structural diagram of a computer device according to the sixth embodiment of the present invention. DETAILED DESCRIPTION
[0038] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0039] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0040] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0041] Terminology explanation:
[0042] OCR (Optical Character Recognition) refers to the technology of converting the text in paper documents or electronic documents into dot matrix image files by optical means, and converting the text in the image into text format through recognition software for further editing and processing by word processing software.
[0043] RPA (Robotic Process Automation) is a new type of robotic technology that uses artificial intelligence, information communication, operating systems and other technologies. It "replaces people" to complete repetitive and logically deterministic tasks through the automation and intelligent execution of robots, thereby effectively improving work efficiency and reducing errors.
[0044] Embodiment 1
[0045] This embodiment provides a cross-network data transmission method, which is applied to the data sending end, including: receiving the data to be transmitted, converting the data to be transmitted into key-value pairs according to the encoding protocol, and writing all the converted key-value pairs into an Excel file; in response to the data sending instruction, displaying a start signal, and after waiting for a set time interval, opening the Excel file and adjusting it to an appropriate size and scrolling it at an appropriate speed, so that the data receiving end can take a picture of the display content (start signal or Excel file content) through a camera and then identify it, obtain the key-value pairs and write them into a database. Figure 1 As shown, the specific steps include:
[0046] Step 110, after the data sending end (data sending device A) receives the data to be transmitted, it converts the data into Key-Value pairs according to the encoding protocol pre-defined between the data sending device A and the data receiving end (data receiving device B), and writes all the converted Key-Value pairs into an Excel file. The content in the file is N rows * 3 columns, wherein each row stores three data of serial number ID, Key value, and Value value in sequence, and each row represents a Key-Value pair. The last row of the file is filled with an end character (special character), indicating the end of the data file.
[0047] Step 120, when the data sending device A is ready to start sending data, that is, in response to the data sending instruction, it first displays a special character agreed upon by both parties on the screen as a start signal for data transmission, waits for a specific time interval, opens the Excel data file to be transmitted, uses the existing RPA technology to automatically adjust to a suitable display size and ratio, and then automatically scrolls the display.
[0048] Step 130, the data receiving device B is equipped with a high-definition digital camera, which takes photos of the content on the display of the data sending device A at a preset time interval, converts the photos into black and white binary images, and automatically sends them to the OCR software for recognition; when it is recognized as a pre-agreed data transmission start signal, it starts to take photos of the Excel data file automatically scrolling on the display of the sending device A, converts the photos into black and white binary images, and saves them as black and white binary image files. Each time a photo is taken, a picture file is saved.
[0049] Step 140, the data receiving device B calls the OCR recognition software to recognize the image file saved by the photo until the special character at the end of the data file is recognized, and then removes duplicate data from the recognized Key-Value pairs and writes them into the local database.
[0050] The data transmission method of the present invention receives the data to be transmitted at the data transmitting end, completes the Key-Value key value pair encoding for the data, and then writes it into an Excel file in a specific format. The data receiving end takes a photo of the Excel file content on the display of the data transmitting end device through a high-definition digital camera, and then calls the OCR recognition software to recognize the photo content as a Key-Value key value pair, removes the recognized duplicate data, and writes it into a local database to complete the data transmission. It is not necessary to transmit the TCP / IP protocol or other communication protocols between the two communication parties, but the problem of being unable to transmit data due to unreachability is solved by the OCR recognition method, which promotes collaborative work, cross-system process connection, data sharing and exchange, and solves the problems of "information islands" and "data barriers".
[0051] The present invention uses Excel as an intermediate medium and can realize a data transmission volume of 133.7M characters at most at one time, thereby realizing large capacity and high efficiency of data transmission.
[0052] The present invention encodes the Key-Value pairs of the data to be transmitted, and only three data are displayed in each row of the Excel file, which is clear and unambiguous, and can ensure the OCR recognition accuracy of the receiving end.
[0053] Embodiment 2
[0054] This embodiment provides a cross-network data transmission method, which is applied to a data receiving end and includes the following steps:
[0055] Obtain a picture of the display content of the data sending end through the camera;
[0056] Identify the image, obtain the key-value pair and write it into the database;
[0057] Among them, the steps for the data sending end to display the display content are: receiving the data to be transmitted, converting the data to be transmitted into key-value pairs according to the encoding protocol, and writing all the converted key-value pairs into an Excel file; responding to the data sending instruction, displaying a start signal, and after waiting for a set time interval, opening the Excel file and scrolling the display.
[0058] Among them, the specific steps for image recognition are:
[0059] At a set time interval, obtain the image of the display content of the data sending end, convert the image into a black and white binary image and then perform recognition;
[0060] When the start signal is recognized, the photo is converted into a black and white binary image and saved, and the saved black and white binary image is recognized to obtain a key-value pair until the end character is recognized, and the recognized key-value pair is deduplicated and written into the database.
[0061] The detailed method is the same as that provided in Example 1 and will not be repeated here.
[0062] Embodiment 3
[0063] This embodiment provides a cross-network data transmission system, which is applied to a data sending end, such as Figure 2 As shown, including:
[0064] The data encoding module 310 is configured to: receive data to be transmitted, perform key-value pair conversion on the data to be transmitted according to the encoding protocol, and write all the converted key-value pairs into an Excel file;
[0065] The data sending module 320 is configured to: respond to the data sending instruction, display a start signal, and after waiting for a set time interval, open the Excel file and scroll the display so that the data receiving end can obtain the image of the displayed content and identify it, obtain the key-value pair and write it into the database.
[0066] It should be noted here that each module in this embodiment corresponds to each step in Example 1 one by one, and the specific implementation process is the same, which will not be repeated here.
[0067] Embodiment 4
[0068] This embodiment provides a cross-network data transmission system, which is applied to a data receiving end, such as Figure 3 As shown, including:
[0069] The data receiving module 330 is configured to: obtain a picture of the display content of the data sending end through a camera;
[0070] The data identification module 340 is configured to: identify the image, obtain a key-value pair and write it into a database;
[0071] Among them, the steps for the data sending end to display the display content are: receiving the data to be transmitted, converting the data to be transmitted into key-value pairs according to the encoding protocol, and writing all the converted key-value pairs into an Excel file; responding to the data sending instruction, displaying a start signal, and after waiting for a set time interval, opening the Excel file and scrolling the display.
[0072] It should be noted here that each module in this embodiment corresponds to each step in Example 2 one by one, and the specific implementation process is the same, which will not be repeated here.
[0073] Embodiment 5
[0074] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the cross-network data transmission method described in the first or second embodiment above are implemented.
[0075] Embodiment 6
[0076] This embodiment provides a computer device, such as Figure 4 As shown, it includes a memory 510, a processor 520, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in a cross-network data transmission method as described in the above-mentioned embodiment 1 or embodiment 2 are implemented.
[0077] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.
[0078] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0079] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0080] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0081] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0082] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for transmitting data across a network, characterized in that: Applied to the data sending end, it includes the following steps: Receive the data to be transmitted, convert the data to be transmitted into key-value pairs according to the encoding protocol predefined between the data transmitting end and the data receiving end, and write all the converted key-value pairs into an excel file; the content in the file is N rows*3 columns, and each row stores three data of serial number ID, Key value, and Value value in sequence; each row of the excel file represents a key-value pair, and the last row is filled with an end character; In response to the data transmission instruction, a special character agreed upon by both parties is displayed as a start signal for data transmission, and after waiting for a set time interval, the Excel file is opened, and the RPA technology is used to automatically adjust the display size and ratio to a suitable display size and ratio, and then the file is scrolled at an appropriate speed, so that the camera at the data receiving end can capture the Excel file automatically scrolling on the screen of the data sending end and then recognize it, obtain the key-value pair and write it into the database; The specific steps of the recognition are: at a set time interval, the data receiving end captures the area of the Excel file content displayed on the data sending end and generates a picture, converts the picture into a black and white binary picture and sends it to the OCR software for recognition; when the start signal is recognized, the photo is converted into a black and white binary picture and saved, the saved black and white binary picture is recognized to obtain a key-value pair, until the end character is recognized, and the recognized key-value pair is removed from duplicate data and written into the database.
2. A cross-network data transmission method, characterized in that: Applied to the data receiving end, it includes the following steps: Get the image of the display content of the data sending end; Identify the image, obtain key-value pairs and write them into the database; Among them, the steps for the data sending end to display the display content are: receiving the data to be transmitted, converting the data to be transmitted into key-value pairs according to the encoding protocol pre-defined between the data sending end and the data receiving end, and writing all the converted key-value pairs into an excel file; the content in the file is N rows * 3 columns, and each row stores three data of serial number ID, Key value, and Value value in order; each row of the excel file represents a key-value pair, and the last row is filled with an end character; in response to the data sending instruction, a special character pre-agreed by both parties is displayed as the start signal of data transmission, and after waiting for a set time interval, the excel file is opened, and the RPA technology is used to automatically adjust to the appropriate display size and ratio, and then scroll and display at an appropriate speed; The specific steps of identifying the image are: at a set time interval, shooting the area of the Excel file content displayed on the data sending end and generating an image, converting the image into a black and white binary image and sending it to the OCR software for identification; when the start signal is identified, converting the photo into a black and white binary image and saving it, identifying the saved black and white binary image to obtain a key-value pair, until the end character is identified, removing duplicate data from the identified key-value pair and writing it into the database.
3. A cross-network data transmission system, using a cross-network data transmission method as claimed in claim 1, characterized in that: Applied to the data sending end, including: The data encoding module is configured to: receive data to be transmitted, convert the data to be transmitted into key-value pairs according to the encoding protocol, and write all the converted key-value pairs into an Excel file; The data sending module is configured to: respond to the data sending instruction, display a start signal, and after waiting for a set time interval, open the Excel file and scroll the display so that the data receiving end can obtain the picture of the display content and identify it, obtain the key-value pair and write it into the database.
4. A cross-network data transmission system, using a cross-network data transmission method as claimed in claim 2, characterized in that: Applied to the data receiving end, including: A data receiving module is configured to: obtain a picture of the display content of the data sending end; A data identification module is configured to: identify the image, obtain a key-value pair and write it into a database; Among them, the steps for the data sending end to display the display content are: receiving the data to be transmitted, converting the data to be transmitted into key-value pairs according to the encoding protocol, and writing all the converted key-value pairs into an Excel file; responding to the data sending instruction, displaying a start signal, and after waiting for a set time interval, opening the Excel file and scrolling the display.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in a cross-network data transmission method as claimed in any one of claim 1 or claim 2 are implemented.
6. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the cross-network data transmission method according to any one of claim 1 or claim 2 are implemented.
