CN113271387A - Image data transmission method and device - Google Patents

Image data transmission method and device Download PDF

Info

Publication number
CN113271387A
CN113271387A CN202010225571.0A CN202010225571A CN113271387A CN 113271387 A CN113271387 A CN 113271387A CN 202010225571 A CN202010225571 A CN 202010225571A CN 113271387 A CN113271387 A CN 113271387A
Authority
CN
China
Prior art keywords
image data
scanning
data
electronic card
lines
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010225571.0A
Other languages
Chinese (zh)
Inventor
焦龙龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
Original Assignee
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Yihua Computer Co Ltd, Shenzhen Yihua Time Technology Co Ltd, Shenzhen Yihua Financial Intelligent Research Institute filed Critical Shenzhen Yihua Computer Co Ltd
Priority to CN202010225571.0A priority Critical patent/CN113271387A/en
Publication of CN113271387A publication Critical patent/CN113271387A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/00095Systems or arrangements for the transmission of the picture signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/04Scanning arrangements, i.e. arrangements for the displacement of active reading or reproducing elements relative to the original or reproducing medium, or vice versa

Abstract

The embodiment of the invention provides a method and a device for transmitting image data, which are applied to detection equipment for scanning electronic cards, wherein the detection equipment is connected with a terminal and is provided with a sensor, and the method comprises the following steps: the detection equipment receives an operation instruction sent by the terminal; when the sensor detects that the electronic card is inserted, the electronic card is scanned in response to the operation instruction and scanning data is generated, wherein the scanning data comprises the line number and the scanning mark of the image data of the electronic card; determining a target line number according to the line number and the scanning mark; generating a feedback data packet from the scanning data according to the target line number; and sending the feedback data packet to the terminal. The method can directly acquire the image data of the electronic card, and transmits and splits the image data into a plurality of feedback data packets by calculating the line number of the image data, so as to shorten the image transmission time and improve the transmission efficiency.

Description

Image data transmission method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for transmitting image data.
Background
In daily life, various cards are presented for the convenience of life and work of users, and different cards can store different information of the users so as to meet daily information exchange processing.
At present, common cards include identity cards, bank cards or employee cards and the like. When information exchange processing is performed, a common method is to use a scanning device to read chip data corresponding to a card, and obtain information corresponding to a user through the chip data.
In the using process, in order to increase the using experience of a user, a preview function is added in the scanning device, and a scanned image is transmitted to the terminal after scanning and is displayed in the terminal for the user to watch. Because the transmission of the image data is started after the scanning is finished in each scanning process, the user needs to wait for a long time to see the scanned image, which wastes the time of the user and reduces the use experience of the user.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are proposed to provide a transmission method of image data and a transmission apparatus of image data that overcome or at least partially solve the above problems.
In order to solve the above problem, an embodiment of the present invention discloses an image data transmission method, which is applied to a detection device for scanning an electronic card, wherein the detection device is connected to a terminal, the detection device is provided with a sensor, and the method includes:
the detection equipment receives an operation instruction sent by the terminal;
when the sensor detects that the electronic card is inserted, the electronic card is scanned in response to the operation instruction and scanning data is generated, wherein the scanning data comprises the line number and the scanning mark of the image data of the electronic card;
determining a target line number according to the line number and the scanning mark;
generating a feedback data packet from the scanning data according to the target line number;
and sending the feedback data packet to the terminal.
Optionally, before the step of determining the target number of lines according to the number of lines and the scan flag, the method further includes:
and storing the image data of the electronic card, and calculating the line number of the image data of the electronic card.
Optionally, the determining a target line number according to the line number and the scan flag includes:
acquiring the current number of the line numbers;
judging whether the current number is equal to or less than a preset number;
if the current number is equal to the preset number, taking the number of lines corresponding to the preset number as a target number of lines, and repeating the step of obtaining the current number of the number of lines;
if the current number is smaller than the preset number, judging whether to acquire the scanning mark;
and if the scanning mark is obtained, taking the number of lines corresponding to the current number as a target number of lines.
Optionally, the generating a feedback data packet from the scan data according to the target line number includes:
packaging the image data of the electronic cards with the corresponding number according to the target line number to obtain packaged data;
and packaging the packaging data to generate a feedback data packet.
Optionally, the method further comprises:
and if the scanning mark is not obtained, repeating the step of obtaining the current number of the line numbers.
Optionally, before the step of determining the target number of lines according to the number of lines and the scan flag, the method further includes:
the scan data is monitored and refreshed.
Optionally, before the step when the sensor detects insertion of an electronic card, the method further comprises:
receiving a shielding signal sent by the sensor;
determining an electronic card insertion based on the occlusion signal.
The embodiment of the invention also discloses a transmission device of image data, which is applied to detection equipment for scanning electronic cards, wherein the detection equipment is connected with a terminal, the detection equipment is provided with a sensor, and the device comprises: the device comprises a receiving module, a response module, a determining module, a generating module and a sending module which are positioned on the detection equipment;
the receiving module is used for receiving an operation instruction sent by the terminal;
the response module is used for responding to the operation instruction to scan the electronic card and generate scanning data when the sensor detects that the electronic card is inserted, wherein the scanning data comprises the line number and the scanning mark of the image data of the electronic card;
the determining module is used for determining the target line number according to the line number and the scanning mark;
the generating module is used for generating a feedback data packet from the scanning data according to the target line number;
and the sending module is used for sending the feedback data packet to the terminal.
Optionally, the apparatus further comprises: a storage calculation module located at the detection device;
and the storage calculation module is used for storing the image data of the electronic card and calculating the line number of the image data of the electronic card.
Optionally, the determining module includes:
an obtaining module, configured to obtain a current number of the line numbers;
the judging module is used for judging whether the current number is equal to or less than a preset number;
an equaling module, configured to, if the current number is equal to a preset number, take the number of lines corresponding to the preset number as a target number of lines, and repeat the step of obtaining the current number of lines;
a less-than module, configured to determine whether to acquire the scan flag if the current number is less than a preset number;
and the target line number module is used for taking the line number corresponding to the current number as the target line number if the scanning mark is obtained.
Optionally, the generating module includes:
the packaging module is used for packaging the image data of the electronic cards with the corresponding number according to the target line number to obtain packaging data;
and the packaging module is used for packaging the packaging data to generate a feedback data packet.
Optionally, the apparatus further comprises:
and the repeating module is used for repeating the step of acquiring the current number of the line numbers if the scanning mark is not acquired.
Optionally, the apparatus further comprises:
and the monitoring storage module is used for monitoring and refreshing the scanning data.
Optionally, the apparatus further comprises:
the shielding signal module is used for receiving a shielding signal sent by the sensor;
and the insertion determining module is used for determining the insertion of the electronic card based on the shielding signal.
The embodiment of the invention also discloses a device, which comprises:
one or more processors; and
one or more machine readable media having instructions stored thereon that, when executed by the one or more processors, cause the apparatus to perform one or more methods as described above.
Embodiments of the invention also disclose one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause the processors to perform one or more of the methods described above.
The embodiment of the invention has the following advantages: the invention provides an image data transmission method which can be directly applied to detection equipment, can directly acquire image data of an electronic card after receiving the electronic card, and transmits and splits the image data into a plurality of feedback data packets by calculating the line number of the image data, so as to shorten the image transmission time, improve the transmission efficiency, increase the use experience of a user, and avoid the problems of overlong transmission time and longer service time caused by overlarge image data and poor use experience.
Drawings
FIG. 1 is a flowchart illustrating a first embodiment of a method for transmitting image data according to the present invention;
FIG. 2 is a flowchart illustrating steps of a second embodiment of a method for transmitting image data according to the present invention;
FIG. 3 is a schematic diagram of the structure of the detection apparatus of the present invention;
FIG. 4 is a schematic diagram of the connection of the detection device of the present invention to a terminal;
fig. 5 is a block diagram of a first embodiment of an image data transmission apparatus according to the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Referring to fig. 1, a flow chart showing steps of an embodiment of a method for transmitting image data according to the present invention shown in fig. 1 is shown. In this embodiment, the method may be applied to a detection device, which may be connected to a terminal.
It is noted that the detection device may be a scanning device for detecting electronic cards, such as a scanner, an identifier or a card reader, etc. The terminal can be used for receiving detection equipment detection data and sending an operation instruction to the detection equipment, and optionally, the terminal can be a mobile terminal, a mobile device, an upper computer, UI (user interface) equipment or other portable equipment.
In an alternative embodiment, the detection device may be provided with a port, an actuator assembly, a reader assembly and a scanner assembly, and a sensor may be provided within the port. Specifically, the port is provided with two ends of the detection device, and a sensor is arranged in the middle of the port, wherein the sensor can be an infrared sensor; the reading component can be connected with a card reader in a non-contact mode and can be used for reading character information on an electronic card; the scanning component can be a CIS image sensor and collects image data of the front side and the back side of the electronic card.
In practical operation, a user can insert the electronic card from the port, the electronic card is driven by the transmission component to move in the detection device, and then the reading component reads information data stored in the electronic card or the scanning component scans image data of the electronic card. Optionally, scanning components may be respectively disposed at upper and lower ends of the detection device, so that the scanning components can respectively scan image data on front and back sides of the electronic card.
Specifically, the method may comprise the steps of:
step 101, the detection device receives an operation instruction sent by the terminal.
The detection device may be connected to the terminal by a wire, for example, by a USB cable or a cable; the connection may also be by wireless means, for example, bluetooth communication. The operation instructions may include a scan instruction, a read instruction, a start instruction, a move instruction, a stop instruction, a feedback instruction, a save instruction, and so on.
In actual operation, a user may operate on the terminal, and the terminal may generate an operation instruction in response to the user operation. For example, the user may perform a screen sliding operation or send determination information at the terminal, and the terminal may generate an operation instruction according to the screen sliding operation or the send determination information.
And 102, when the sensor detects that the electronic card is inserted, responding to the operation instruction to scan the electronic card and generating scanning data, wherein the scanning data comprises the line number of the image data of the electronic card.
It should be noted that the scanning data may include image data of the front and back sides of the electronic card, the line number of the image data of the electronic card, identification data of the image, size data of the electronic card, and the like.
In actual operation, a user can insert an electronic card from a port of the detection device, and the electronic card can enter the interior of the detection device from the port, so that the detection device can perform reading and scanning. When the electronic card is inserted into the sensor arranged at the port of the detection equipment, the electronic card can trigger the sensor, the sensor generates a trigger signal and sends the trigger signal to the detection equipment, and the detection equipment can determine that the electronic card is inserted at present.
After the detection device receives the trigger signal of the sensor, the detection device can respond to an operation instruction, call the transmission component, the reading component and the scanning component, and perform operations such as transmission, reading and scanning on the electronic card, so that the scanned scanning data of the electronic card can be obtained.
And 103, determining a target line number according to the line number and the scanning mark.
In this embodiment, the determining the number of lines may be calculating how many lines of the image data are, may be the number of lines recording the specific image data, may also be the number of lines marking the image data, and may also be marking the image data according to a preset number of lines.
The transmission mode can be determined according to the line number of the image data by marking or calculating or recording the line number of the image data through the line number and the scanning mark, so that the phenomenon that the transmission time is too long and the watching of a user is delayed due to overlarge image data can be avoided.
And 104, generating a feedback data packet from the scanning data according to the target line number.
The feedback packet may be a block of partial image data or a block of entire image data. The feedback data packet may include a partial image data, a full image data, a flag of the image data, address information, and the like.
If the image data acquired after scanning is large, real-time transmission can be performed, the image data is cut and split into a plurality of image data blocks, and the plurality of image data blocks are packaged to generate a plurality of feedback data packets. By splitting the larger image data, on one hand, real-time transmission can be carried out, and partial image data can be immediately transmitted after being acquired, on the other hand, the difficulty of transmission can be reduced, the transmission time is shortened, and the efficiency of image data transmission is improved. And if the image data obtained after scanning is small, the image data can be directly packed to generate a feedback data packet.
And 105, sending the feedback data packet to the terminal.
In this embodiment, after the feedback data packet is obtained, the feedback data packet may be immediately transmitted to the terminal.
Specifically, a plurality of small-capacity feedback data packets generated by packaging image data are sent to the terminal, so that the transmission efficiency is improved, and the terminal can splice and derive complete image data according to the sequence of the received feedback data packets.
In an optional embodiment, a method for transmitting image data is provided, where the method may be applied to a detection device for scanning an electronic card, the detection device is connected to a terminal, the detection device is provided with a sensor, and specifically, the method may receive an operation instruction sent by the terminal through the detection device; when the sensor detects that the electronic card is inserted, the electronic card is scanned in response to the operation instruction and scanning data is generated, wherein the scanning data comprises the line number and the scanning mark of the image data of the electronic card; determining a target line number according to the line number and the scanning mark; generating a feedback data packet from the scanning data according to the target line number; and sending the feedback data packet to the terminal. The image data transmission method provided by the embodiment can effectively multiplex service transaction time, can transmit image data while scanning the electronic card, can shorten the image transmission time, improves the transmission efficiency, increases the use experience of a user, and avoids the problems of overlong transmission time, long service time and poor use experience caused by overlarge image data.
Referring to fig. 2, a flowchart of the steps of an embodiment of a method for transmitting image data according to the present invention is shown. In this embodiment, the method may be applied to a detection device, which may be connected to a terminal.
It is noted that the detection device may be a scanning device for detecting electronic cards, such as a scanner, an identifier or a card reader, etc. The terminal can be used for receiving detection equipment detection data and sending an operation instruction to the detection equipment, and optionally, the terminal can be a mobile terminal, mobile equipment, an upper computer, UI (user interface) equipment or a portable device such as a PC (personal computer).
In this embodiment, the detection device may be provided with a port, a reading component and a scanning component, and a sensor may be provided in the port.
In an alternative embodiment, the reading component may not receive a card reader, and may be used for reading text information on an electronic card; the scanning component can be a CIS image sensor and is used for acquiring image data of the front side and the back side of an electronic card; the port is provided with two ends of the detection device, and a sensor is arranged in the middle of the port, wherein the sensor can be an infrared sensor.
In this embodiment, the electronic card may be an identification card as an example, and optionally, the electronic card may also be a bank memory card, a work card, an access card, or the like.
Specifically, the method may comprise the steps of:
step 201, the detection device receives an operation instruction sent by the terminal.
The detection device may be connected to the terminal by a wire, for example, by a USB cable or a cable; the connection may also be by wireless means, for example, bluetooth communication. The operation instructions may include a scan instruction, a read instruction, a start instruction, a move instruction, a stop instruction, a feedback instruction, a save instruction, and so on.
In actual operation, a user can operate on the terminal, and the terminal can generate a corresponding operation instruction in response to the user operation. For example, the user may perform a screen sliding operation or send determination information at the terminal, and the terminal may generate an operation instruction according to the screen sliding operation or the send determination information.
Step 202, receiving an occlusion signal sent by the sensor.
In this embodiment, the sensor may be provided at a port of the detection device, and the electronic card may be inserted into the detection device from the port.
In a particular implementation, the sensor may be an infrared sensor. In the use, the sensor sends and receives the infrared ray in check out test set, and when electronic card inserted check out test set, the infrared ray was sheltered from to the electronic card for the infrared ray can't be received to the sensor, and the sensor can generate and send and shelter from signal to check out test set.
Step 203, determining the insertion of the electronic card based on the shielding signal.
In this embodiment, after the detection device receives the shielding signal sent by the sensor, it can be determined that the electronic card is inserted into the detection device.
And 204, when the sensor detects that the electronic card is inserted, responding to the operation instruction to scan the electronic card and generating scanning data, wherein the scanning data comprises the line number of the image data of the electronic card.
In this embodiment, when the user inserts the identity card through the port of check out test set, the sensor of port is sheltered from by the identity card, and the sensor can generate trigger signal and send trigger signal to check out test set in, check out test set can confirm that there is the identity card to insert at present.
And then the detection equipment can transmit the operation instruction sent by the response terminal to a scanning area provided with a scanning component of the detection equipment, and the scanning component is controlled to scan the front side and the back side of the identity card to obtain image data of the front side and the back side of the identity card.
Step 205, the scan data is monitored and refreshed.
It should be noted that the detection device may monitor the current working state, may monitor the moving speed of the electronic card, and may monitor the volume of the scanned data. When the electronic card is connected and scanned, a plurality of rows of scanning data can be acquired, and the scanning data can be refreshed once when one row of scanning data is received.
In a specific implementation, newly received scan data can be superimposed on original scan data, and the scan data is stored continuously without being disconnected.
And step 206, storing the image data of the electronic card, and calculating the line number of the image data of the electronic card.
It should be noted that the detection device may be provided with a storage unit that may be used to store the image data and a monitoring recording unit that may be used to record the number of lines for calculating the image data.
In actual operation, the detection equipment can write the image data into the storage component while acquiring the image data of the front side and the back side of the identity card, so that the image data can be stored in real time, and the condition of data loss during scanning can be avoided. While the monitor recording section may record the number of lines for calculating the image data written in the storage section.
The number of lines of the recorded image data is calculated, and it is possible to determine whether the image data is image data of a larger capacity or image data of a smaller capacity. For example, if the capacity of the image data is large, the memory corresponding to the image data is large, and the number of lines written into the storage unit is large; if the capacity of the image data is smaller, the memory corresponding to the image data is smaller, and the number of lines written into the storage component is smaller.
Whether the image data need to be split or not can be determined by calculating the line number of the specific image data, the image data is split and transmitted, if the image data is large, the image data can be split and respectively transmitted, and if the image data is small, the image data can be directly transmitted. Therefore, the efficiency of image data transmission can be improved, and the waiting time of a user can be shortened.
And step 207, determining a target line number according to the line number and the scanning mark.
In this embodiment, if the image data obtained after scanning is large, the image data may be cut and split into a plurality of image data blocks, and the plurality of image data blocks are sent to the terminal.
In specific implementation, the target line number of the image data can be determined, and the size of the split image data block is determined by the target line number, so that the split of the larger image data can be realized, the real-time transmission can be realized, the partial image data can be immediately transmitted after being acquired, the transmission difficulty can be reduced, the transmission time can be shortened, and the image data transmission efficiency can be improved. In this embodiment, the target line number may be determined by determining whether the current line number is the same as the target line number.
In this embodiment, step 207 may include the following sub-steps:
substep 2071, obtaining the current number of rows.
In this embodiment, the current number of lines may be obtained by obtaining the number of lines of the currently stored image data, or the number of lines may be obtained by starting calculation when the image data is received.
Substep 2072, determining whether the current number is equal to or less than a preset number.
In the present embodiment, the preset number may be preset by a user, and may be 100 lines, 200 lines, 300 lines, and so on. Preferably, there may be 200 rows.
Comparing that the current number is the same as the preset number, and if the current number is the same as the preset number, taking the line number of the image data corresponding to the current number as the target line number.
Substep 2073, if the current number is equal to the preset number, taking the number of lines corresponding to the preset number as the target number of lines, and repeating the step of obtaining the current number of lines.
In this embodiment, the preset number may be 200 lines, when the current number of the line numbers of the image data is equal to 200 lines, 1 to 200 lines corresponding to the image data may be used as the target line number, and the image data of 200 lines may be used as the target image data to transmit the target image data.
After the target line number is determined, the detection device transmits the image data corresponding to the target line number, so that after the target line number is obtained, the line number of the image data corresponding to the current number can be recalculated, and the calculation can be started again by 1.
For example, after 200 lines of image data are obtained, the calculation is performed for 201 lines of image data starting from 1, and 200 lines of image data are counted again.
Substep 2074, determining whether to acquire the scan flag if the current number is less than the preset number.
It should be noted that the scanning flag may be an end flag, or may be generated after the scanning component scans the entire identity card.
In a specific implementation, the number of lines of the generated image data is not necessarily an integer, and may be 90 lines, 105 lines, 123 lines, or the like. When the scanning is finished, the detection device can generate an end mark to avoid repeatedly storing the image data.
When the end mark is generated, the remaining image data can be directly transmitted, and the integrity of the acquired image data is ensured.
Substep 2075, if the scan flag is obtained, taking the number of lines corresponding to the current number as the target number of lines.
In this embodiment, when the scan flag is obtained, it may be determined that the scanning is completed, and the number of lines of the remaining image data may be directly set as the target number of lines.
For example, after scanning 200 lines, the detection apparatus restarts calculating the number of lines, counts the number of lines of image data from 1, and after reaching 66 lines, acquires the scan flag, and determines the remaining 66 lines as the target number of lines.
Optionally, step 207 may further comprise the sub-steps of:
substep 2076, repeating the step of obtaining the current number of rows if the scan flag is not obtained.
If the scan mark is not obtained, it can be determined that the image data has not been scanned, the image data can be stored continuously, and the number of lines of the image data needs to be calculated.
And 208, generating a feedback data packet from the scanning data according to the target line number.
In specific implementation, 200 lines of corresponding image data can be packed to generate a feedback data packet, and the feedback data packet is sent to a terminal, so that transmission time can be shortened, and the effect of collecting and transmitting at the same time is realized.
In this embodiment, step 208 may include the following sub-steps:
and a substep 2081, packaging the image data of the electronic cards with the corresponding number according to the target line number to obtain packaged data.
It should be noted that the encapsulated data may be a data packet that maps image data into a payload of a certain encapsulation protocol, and then fills a header of the corresponding protocol to form the encapsulation protocol. The encapsulation protocol may be a point-to-point protocol (PPP), an Extensible Authentication Protocol (EAP), and so on.
In actual operation, when the number of lines of the image data is the same as the preset number of lines, the detection device may encapsulate the image data corresponding to the preset number of lines to obtain a corresponding encapsulated data. For example, the preset number of lines is 200 lines, the scanning unit obtains image data when scanning the identification card and transfers the image data to the storage unit row by row, and the monitoring and recording unit may calculate the number of lines of the image data written in the storage unit from 1 to 100. When the number of lines in which the image data is written is 100, the detectable device may encapsulate the image data of lines 1 to 100 to obtain encapsulated data. Then, the number of lines of the image data to be written next to the memory section is continuously calculated, and the calculation is repeated from the 1 st line to the 100 th line
Substep 2082, packaging the encapsulated data to generate a feedback data packet.
In this embodiment, after the image data with the preset number of lines is encapsulated according to the encapsulation protocol, the encapsulated data may be encapsulated to generate a data packet, where the data packet may be a feedback data packet.
The image data contained in the feedback data packet is small, transmission is fast, and data transmission efficiency can be improved.
Step 209, sending the feedback data packet to the terminal.
In this embodiment, after one or more feedback data packets are obtained, the feedback data packets may be sent to the terminal one by one.
Specifically, in order to improve transmission efficiency, after each feedback data packet is generated, the feedback data packet may be sent to the terminal once, and the terminal may splice and derive complete image data according to the sequence of the received feedback data packets.
Referring to fig. 4, a schematic diagram of the connection of the detection apparatus of the present invention to a terminal is shown. In this embodiment, the terminal may be a pc terminal, and the detection device may be a scanner, and optionally, the scanner employs an SOC chip of Xilinx Zynq 7007S as a CPU unit.
Referring to fig. 4, the pc terminal may be connected to the scanner through a USB cable. In the pc terminal, an application driver (DRV for short) may be installed, and firmware control software (FW for short) may be installed in the scanner, where the firmware control software may include PS control software (PS for short) and PL control software (PL for short), and the PS control software and the PL control software may perform data interaction through a protocol bus, and specifically, the protocol bus may be an AXI (Advanced eXtensible Interface, AXI for short).
Specifically, the application driver DRV may be configured to generate a corresponding operation instruction according to an operation of a user at the pc terminal, and receive a data packet of image data sent by the PS control software.
The PS control software can be used for receiving and analyzing an operation instruction transmitted by the application driver DRV through the USB, realizing service logic control according to the requirement of the operation instruction, sending the operation instruction to the PL control software through the AXI bus, receiving a data packet sent by the PL control software, and sending the data packet to the application driver DRV through the USB line.
The PL control software can be used for implementing an operation instruction transmitted by the PS control software, acquiring a data packet of corresponding image data, and feeding back the data packet to the PS control software through the AXI bus.
In one optional embodiment, the PS control software comprises four parts, namely an instruction processing part, a control part, a monitoring part and an image data part. The instruction processing part can be used for analyzing an operation instruction issued by the application driving DRV, decomposing the operation, transmitting an operation instruction to the control part, and feeding back a result to the application driving DRV after the scanning operation is finished. The control part can be connected with the sensor and can be used for executing the operation of transmitting and scanning the identity card in the scanner according to the operation instruction. The monitoring section may be configured to detect a current operating state of the scanner in real time, so that image data of the image data section may be monitored and refreshed, and the image data may be transmitted to the application driver DRV. The image data part can be used for fixedly storing image data, setting an image data storage address of the identity card and sending the storage address to PL control software for writing data.
In actual operation, after the application driver DRV sends a scanning instruction, when the instruction processing part detects that a card is inserted, the control part sucks the card for transmission and sends the scanning instruction to the PL control software, the PL control software can control the CIS image sensor to scan the identification card and write the scanned data into the image data part and feed back the number of lines of the currently scanned image, when the identification card shields the D4 sensor or does not shield the D3 sensor, the control part stops transmission and scanning, the PL control software can stop writing image data into the image data part, and the image data part can generate a scanning end mark.
When the PL control software writes image data into the image data part, the monitoring part always monitors the line number of the image data written by the image data part, when 200 lines of image data are written, 200 lines of image data can be packaged and a feedback data packet is generated, and the PS control software can be sent to the application driver DRV through a USB line. When monitoring the scanning end mark, the monitoring part can calculate the actual line number of the current image data, then encapsulate the image data according to the current actual line data, generate a feedback data packet, and send the feedback data packet to the application driver DRV.
In a preferred embodiment, the method for transmitting the image data is provided, the method can effectively multiplex service transaction time, can transmit the image data while scanning the electronic card, can shorten the image transmission time, improves the transmission efficiency, increases the use experience of a user, and avoids the problems of poor use experience caused by overlong transmission time and long service time due to overlarge image data.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 5, a block diagram of a first embodiment of an apparatus for transmitting image data according to the present invention is shown, the apparatus can be applied to a detection device for scanning an electronic card, the detection device is connected to a terminal, the detection device is provided with a sensor, and the apparatus includes: a receiving module 501, a responding module 502, a determining module 503, a generating module 504 and a sending module 505 which are positioned at the detection device;
a receiving module 501, configured to receive an operation instruction sent by the terminal;
a response module 502, configured to, when the sensor detects that an electronic card is inserted, scan the electronic card in response to the operation instruction and generate scan data, where the scan data includes a line number and a scan flag of image data of the electronic card;
a determining module 503, configured to determine a target line number according to the line number and the scan flag;
a generating module 504, configured to generate a feedback data packet from the scan data according to the target line number;
a sending module 505, configured to send the feedback data packet to the terminal.
Optionally, the apparatus further comprises: a storage calculation module located at the detection device;
and the storage calculation module is used for storing the image data of the electronic card and calculating the line number of the image data of the electronic card.
Optionally, the determining module includes:
an obtaining module, configured to obtain a current number of the line numbers;
the judging module is used for judging whether the current number is equal to or less than a preset number;
an equaling module, configured to, if the current number is equal to a preset number, take the number of lines corresponding to the preset number as a target number of lines, and repeat the step of obtaining the current number of lines;
a less-than module, configured to determine whether to acquire the scan flag if the current number is less than a preset number;
and the target line number module is used for taking the line number corresponding to the current number as the target line number if the scanning mark is obtained.
Optionally, the generating module includes:
the packaging module is used for packaging the image data of the electronic cards with the corresponding number according to the target line number to obtain packaging data;
and the packaging module is used for packaging the packaging data to generate a feedback data packet.
Optionally, the apparatus further comprises:
and the repeating module is used for repeating the step of acquiring the current number of the line numbers if the scanning mark is not acquired.
Optionally, the apparatus further comprises:
and the monitoring storage module is used for monitoring and refreshing the scanning data.
Optionally, the apparatus further comprises:
the shielding signal module is used for receiving a shielding signal sent by the sensor;
and the insertion determining module is used for determining the insertion of the electronic card based on the shielding signal.
The data acquisition device that this embodiment provided can effectively multiplex the business transaction time, can carry out image data transmission when scanning electronic card, can shorten image transmission's time, improves transmission efficiency, has increased user's use and has experienced, has avoided image data too big, leads to the transmission time overlength, and the business time is long partially, and the not good problem of use experience sense that arouses.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
An embodiment of the present invention further provides an apparatus, including:
one or more processors; and
one or more machine-readable media having instructions stored thereon, which when executed by the one or more processors, cause the apparatus to perform methods as described in embodiments of the invention.
Embodiments of the invention also provide one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause the processors to perform the methods described in embodiments of the invention.
The technical features of the embodiments described above can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The foregoing describes in detail a method and an apparatus for transmitting image data according to the present invention, and the present invention applies specific examples to explain the principles and embodiments of the present invention, and the descriptions of the above examples are only used to help understand the method and the core ideas of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. The image data transmission method is characterized by being applied to detection equipment for scanning electronic cards, wherein the detection equipment is connected with a terminal and is provided with a sensor, and the method comprises the following steps:
the detection equipment receives an operation instruction sent by the terminal;
when the sensor detects that the electronic card is inserted, the electronic card is scanned in response to the operation instruction and scanning data is generated, wherein the scanning data comprises the line number and the scanning mark of the image data of the electronic card;
determining a target line number according to the line number and the scanning mark;
generating a feedback data packet from the scanning data according to the target line number;
and sending the feedback data packet to the terminal.
2. The method of claim 1, wherein prior to said step of determining a target number of lines based on said number of lines and said scan flag, said method further comprises:
and storing the image data of the electronic card, and calculating the line number of the image data of the electronic card.
3. The method of claim 1, wherein determining a target number of lines based on the number of lines and the scan flag comprises:
acquiring the current number of the line numbers;
judging whether the current number is equal to or less than a preset number;
if the current number is equal to the preset number, taking the number of lines corresponding to the preset number as a target number of lines, and repeating the step of obtaining the current number of the number of lines;
if the current number is smaller than the preset number, judging whether to acquire the scanning mark;
and if the scanning mark is obtained, taking the number of lines corresponding to the current number as a target number of lines.
4. The method of claim 1, wherein generating the scan data into a feedback data packet according to the target number of rows comprises:
packaging the image data of the electronic cards with the corresponding number according to the target line number to obtain packaged data;
and packaging the packaging data to generate a feedback data packet.
5. The method of claim 3, further comprising:
and if the scanning mark is not obtained, repeating the step of obtaining the current number of the line numbers.
6. The method of claim 1, wherein prior to said determining a target number of lines from said number of lines and said scan flag, said method further comprises:
the scan data is monitored and refreshed.
7. The method according to claim 1, characterized in that before the step when the sensor detects the insertion of an electronic card, the method further comprises:
receiving a shielding signal sent by the sensor;
determining an electronic card insertion based on the occlusion signal.
8. The utility model provides a transmission device of image data, its characterized in that is applied to the check out test set of scanning electronic card, check out test set and terminal connection, check out test set is equipped with the sensor, the device includes: the device comprises a receiving module, a response module, a determining module, a generating module and a sending module which are positioned on the detection equipment;
the receiving module is used for receiving an operation instruction sent by the terminal;
the response module is used for responding to the operation instruction to scan the electronic card and generate scanning data when the sensor detects that the electronic card is inserted, wherein the scanning data comprises the line number and the scanning mark of the image data of the electronic card;
the determining module is used for determining the target line number according to the line number and the scanning mark;
the generating module is used for generating a feedback data packet from the scanning data according to the target line number;
and the sending module is used for sending the feedback data packet to the terminal.
9. An apparatus, comprising:
one or more processors; and
one or more machine-readable media having instructions stored thereon that, when executed by the one or more processors, cause the apparatus to perform the method of one or more of claims 1-7.
10. One or more machine readable media having instructions stored thereon that, when executed by one or more processors, cause the processors to perform the method of one or more of claims 1-7.
CN202010225571.0A 2020-03-26 2020-03-26 Image data transmission method and device Pending CN113271387A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010225571.0A CN113271387A (en) 2020-03-26 2020-03-26 Image data transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010225571.0A CN113271387A (en) 2020-03-26 2020-03-26 Image data transmission method and device

Publications (1)

Publication Number Publication Date
CN113271387A true CN113271387A (en) 2021-08-17

Family

ID=77227582

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010225571.0A Pending CN113271387A (en) 2020-03-26 2020-03-26 Image data transmission method and device

Country Status (1)

Country Link
CN (1) CN113271387A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN86103928A (en) * 1985-07-05 1987-01-07 国际商用机器公司 Control method processor synchronous image scanner
CN1578374A (en) * 2003-07-29 2005-02-09 精工爱普生株式会社 Image scanner and image scanning method
US20050174613A1 (en) * 2004-02-05 2005-08-11 Tan Hin L. Digital scanning systems and methods for scanning multi-sided cards and documents
CN107483850A (en) * 2017-08-11 2017-12-15 西安电子科技大学 A kind of high-definition digital image transfer method of low latency
CN109544140A (en) * 2018-11-26 2019-03-29 努比亚技术有限公司 A kind of identification code scan method, terminal and readable storage medium storing program for executing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN86103928A (en) * 1985-07-05 1987-01-07 国际商用机器公司 Control method processor synchronous image scanner
CN1578374A (en) * 2003-07-29 2005-02-09 精工爱普生株式会社 Image scanner and image scanning method
US20050174613A1 (en) * 2004-02-05 2005-08-11 Tan Hin L. Digital scanning systems and methods for scanning multi-sided cards and documents
CN107483850A (en) * 2017-08-11 2017-12-15 西安电子科技大学 A kind of high-definition digital image transfer method of low latency
CN109544140A (en) * 2018-11-26 2019-03-29 努比亚技术有限公司 A kind of identification code scan method, terminal and readable storage medium storing program for executing

Similar Documents

Publication Publication Date Title
CN1089517C (en) Internet accessing apparatus and system thereof
CN111782492B (en) Page first screen loading duration testing method and device, computer equipment and medium
CN104822007A (en) Data storage system, image processing device, portable terminal, and control method
CN108763086A (en) Script method for recording, terminal and computer readable storage medium based on remote real machine
US8233790B2 (en) Data recording apparatus and digital camera
CN113628304B (en) Image processing method, image processing device, electronic equipment and storage medium
CN102752371A (en) Method for achieving splash on client side and client side
CN105373471A (en) Detection method and apparatus for memory leak bug
CN113596832B (en) Network connection establishment method and device, storage medium and electronic device
CN113271387A (en) Image data transmission method and device
CN104469061A (en) Image processing device, image processing method and image processing system
US20030146976A1 (en) Digital camera system enabling remote monitoring
CN111382004B (en) Parameter backup method and device, parameter restoration method and device and backup restoration system
CN108513034A (en) Method, electronic device and the computer readable storage medium of long-range shooting picture
CN109063522B (en) Card reading method and device of card reader
TW201222430A (en) Method for detecting objects and a corresponding control computer
CN112363898B (en) Performance acquisition method, system and storage medium for user equipment
JP2007295283A5 (en)
CN111444741B (en) Data display method, data acquisition method, data display device, data acquisition device, electronic equipment and storage medium
KR101139216B1 (en) Portable Storage Device Having One Touch Backup Function
CN113283553B (en) Data acquisition method and device
CN112100103B (en) Communication method and system based on apple operating system
CN101409758B (en) Image forming apparatus, host apparatus connected thereto and image processing method thereof
CN112579485A (en) Data interaction method and device, computer equipment and storage medium
CN115706819A (en) Webpage video playing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210817

RJ01 Rejection of invention patent application after publication