Method and device for determining sending parameters of code reader and computer equipment

By receiving the string sent by the code reader and determining the target transmission length and time interval, the problem that computer equipment cannot receive complete barcode information is solved, and the automatic determination of the code reader transmission parameters is realized and the efficiency improvement is improved.

CN119962552APending Publication Date: 2025-05-09SHENZHEN SMARTMORE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411910387.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

Computer equipment cannot receive complete barcode information, resulting in low efficiency in determining parameters sent by the code reader.

Method used

The target transmission length is determined by receiving the plurality of first transmission strings transmitted by the code reader based on the preset time interval; and then the target transmission time interval is determined by receiving the plurality of second transmission strings transmitted by the code reader based on the plurality of candidate time intervals.

Benefits of technology

The automatic determination of the code reader sending parameters is realized, the efficiency of determining the code reader sending parameters is improved, and the computer equipment can receive complete barcode information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119962552A_ABST
    Figure CN119962552A_ABST
Patent Text Reader

Abstract

The invention relates to a code reader sending parameter determination method and device and computer equipment, and the method comprises the steps: receiving a plurality of first sending character strings sent by a code reader based on a preset time interval, and obtaining a first receiving character string; the number of characters of the plurality of first sending character strings changes directionally; determining a target sending length based on the plurality of first sending character strings and the first receiving character string; receiving a plurality of second sending character strings sent by the code reader based on the plurality of candidate time intervals to obtain a second receiving character string; the interval duration of the plurality of candidate time intervals changes directionally; the character number of the second sending character string is equal to the target sending length; and determining a target transmission time interval from a plurality of candidate time intervals based on the plurality of second transmission character strings and the second reception character strings. By adopting the method, the determination efficiency of the code reader sending parameters can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automation technology, and in particular to a method, device and computer equipment for determining parameters sent by a code reader. Background Art

[0002] A barcode reader is a device used to read barcode information. The barcode reader inputs the read barcode information into a computer device through the HID (Human Interface Device) keyboard input protocol. During the use of the barcode reader, the computer device cannot receive the complete barcode information because the receiving performance of the computer device does not match the sending performance of the barcode reader.

[0003] In the conventional technology, when the computer device cannot receive the complete barcode information, the debugging personnel debug the sending parameters of the barcode reader so that the computer device can receive the complete barcode information, which results in low efficiency in determining the sending parameters of the barcode reader. Summary of the invention

[0004] Based on this, it is necessary to provide a method, device, computer equipment, computer readable storage medium and computer program product for determining parameters sent by a code reader in order to address the above technical problems, so as to improve the efficiency of determining parameters sent by a code reader.

[0005] In a first aspect, the present application provides a method for determining parameters sent by a code reader, comprising:

[0006] Receiving a plurality of first transmission character strings sent by the code reader based on a preset time interval to obtain a first reception character string; the number of characters in the plurality of first transmission character strings changes in a directional manner;

[0007] Determining a target sending length based on a plurality of first sending character strings and a first receiving character string;

[0008] Receiving a plurality of second transmission character strings sent by the code reader based on a plurality of candidate time intervals to obtain a second reception character string; the interval lengths of the plurality of candidate time intervals vary in a direction; the number of characters in the second transmission character string is equal to the target transmission length;

[0009] Based on the plurality of second transmission character strings and the second reception character strings, a target transmission time interval is determined from a plurality of candidate time intervals.

[0010] In a second aspect, the present application further provides a device for determining parameters sent by a code reader, comprising:

[0011] A first receiving module is used to receive a plurality of first transmission character strings sent by the code reader based on a preset time interval to obtain a first reception character string; the number of characters in the plurality of first transmission character strings changes in a directional manner;

[0012] A sending length determining module, used to determine a target sending length based on a plurality of first sending character strings and a first receiving character string;

[0013] A second receiving module is used to receive a plurality of second transmission character strings sent by the code reader based on a plurality of candidate time intervals to obtain a second reception character string; the interval lengths of the plurality of candidate time intervals vary in a direction; and the number of characters in the second transmission character string is equal to the target transmission length;

[0014] The sending time interval determination module is used to determine a target sending time interval from a plurality of candidate time intervals based on a plurality of second sending character strings and a second receiving character string.

[0015] In a third aspect, the present application provides a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps in the above method when executing the computer program.

[0016] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps in the above method when executed by a processor.

[0017] In a fifth aspect, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps in the above method are implemented.

[0018] The above-mentioned method, device and computer device for determining the sending parameters of the code reader receive multiple first sending strings sent by the code reader based on preset time intervals to obtain a first receiving string. Through the multiple first sending strings and the first receiving string, the longest string that can be received by the computer device within the preset time interval can be determined, thereby determining a target sending length that matches the receiving performance of the computer device; multiple second sending strings sent by the code reader based on multiple candidate time intervals are received to obtain a second receiving string. Through the multiple second sending strings and the second receiving string, the shortest time interval required for the computer device to receive a string of the target sending length can be determined, thereby determining the target sending time interval, that is, the determination of the code reader sending parameters can be completed through the computer device and the code reader, and the automation of the determination of the code reader sending parameters is realized, thereby improving the efficiency of determining the code reader sending parameters. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 An application environment diagram of a method for determining parameters sent by a code reader provided in an embodiment of the present application;

[0020] Figure 2A schematic diagram of a connection between a code reader 102 and a terminal 104 provided in an embodiment of the present application;

[0021] Figure 3 A flowchart of a method for determining parameters sent by a code reader provided in an embodiment of the present application;

[0022] Figure 4 A schematic diagram of a flow chart of a target transmission length determination step provided in an embodiment of the present application;

[0023] Figure 5 A schematic diagram of a flow chart of determining a coder transmission parameter provided in an embodiment of the present application;

[0024] Figure 6 A structural block diagram of a device for determining parameters sent by a code reader provided in an embodiment of the present application;

[0025] Figure 7 An internal structure diagram of a computer device provided in an embodiment of the present application;

[0026] Figure 8 An internal structure diagram of a readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0028] The method for determining the parameters sent by the code reader provided in the embodiment of the present application can be applied to the following examples: Figure 1 In the application environment shown. The code reader 102 communicates with the terminal 104 via a USB interface, a serial port, Bluetooth or a network. When the code reader 102 communicates with the terminal 104 via a USB interface, the connection diagram between the code reader 102 and the terminal 104 is as shown in FIG. Figure 2 As shown, the code reader 102 is connected to the terminal 104 via an HID cable, and the code reader 102 inputs a character string into the terminal 104 via an HID keyboard input protocol. The terminal 104 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc.

[0029] In one embodiment, Figure 3 As shown, the embodiment of the present application provides a method for determining parameters sent by a code reader, and the method is applied to Figure 1The terminal 104 in the example is used for explanation. It is understandable that the computer device may include at least one of a terminal and a server. The method includes the following steps:

[0030] Step 302: receiving a plurality of first transmission character strings transmitted by a code reader based on a preset time interval to obtain a first received character string; the number of characters in the plurality of first transmission character strings varies in a directional manner.

[0031] The code reader refers to a device for reading pattern information, and the code reader can be used to read the pattern information of a barcode or the pattern information of a QR code. The code reader can be an industrial code reader. The pattern information read by the code reader can be sent to the computer device in the form of a character string. The preset time interval refers to a preset time interval, and the preset time interval is the interval between sending two first transmission character strings. The preset time interval can be set to a longer time interval, for example, the preset time interval can be 200 milliseconds, or 220 milliseconds. The first transmission character string refers to a character string sent by the code reader to the computer device for determining the target transmission length, and the first transmission character string includes at least one character, and the characters in the first transmission character string can be at least one of numbers and letters, etc., and the characters in the first transmission character string can be the same or different. The number of characters in each of the multiple first transmission character strings is not equal, and the number of characters in the multiple first transmission character strings changes in a directional manner. It can be understood that the multiple first transmission character strings have a fixed arrangement order, and the number of characters in the first transmission character string gradually increases or decreases according to the fixed arrangement order. Directional changes refer to changes in a fixed direction, and directional changes include increasing and decreasing. Increasing refers to a gradual increase, and decreasing refers to a gradual decrease. For example, among the multiple first sent strings, the first first sent string is "1", the second first sent string is "22", the third first sent string is "333", the fourth first sent string is "4444", the fifth first sent string is "aaaaa", the sixth first sent string is "bbbbbb", the seventh first sent string is "ccccccc", etc.

[0032] The first received character string refers to a character string composed of characters received by the computer device, and the first received character string includes multiple complete first sent character strings and multiple incomplete first sent character strings. It can be understood that due to the limited receiving performance of the computer device, for the first sent character string with a smaller number of characters, the computer device can receive it within the preset time interval, while for the first sent character string with a larger number of characters, the computer device cannot receive it within the preset time interval.

[0033] Exemplarily, after entering the transmission parameter determination mode, the code reader sends a first transmission string to the computer device at a preset time interval according to the arrangement order in which the number of characters of the multiple first transmission strings changes in a directional manner, and the computer device obtains a first received string. The transmission parameter determination mode refers to the mode in which the code reader is used to determine the transmission parameters. In the transmission parameter determination mode, the code reader will send a string to the computer device according to a preset rule, simulating that the read pattern information is sent to the computer device in the form of a string. The last character in the first transmission string can be a division character, which is different from the other characters in the first transmission string and is only used as the last character of each first transmission string. For example, taking m as the division character, the first first transmission string in the multiple first transmission strings is "m", the second first transmission string is "2m", the third first transmission string is "33m", the fourth first transmission string is "444m", the fifth first transmission string is "aaaam", the sixth first transmission string is "bbbbbm", the seventh first transmission string is "ccccccm", etc.

[0034] In one embodiment, after entering the transmission parameter determination mode, the code reader sends a first transmission string and a dividing character to the computer device at a preset time interval according to the arrangement order in which the number of characters of the multiple first transmission strings changes in a directional manner, and the computer device obtains the first received string. The dividing character can be a line feed character, a pre-set character, etc.

[0035] In one embodiment, the computer device obtains the first received character string, including: the computer device displays the received characters in a text receiving box, and if no characters are received within a preset waiting time, the character sequence in the text receiving box is determined as the first received character string. The preset waiting time refers to the longest waiting time set in advance, for example, the preset waiting time is 5 seconds or 10 seconds.

[0036] Step 304: Determine a target sending length based on the plurality of first sending character strings and the first receiving character strings.

[0037] The target sending length refers to the maximum number of characters in a string sent each time when the barcode reader is in working mode. The target sending length is one of the parameters in the barcode reader sending parameters.

[0038] Exemplarily, the computer device divides the first received character string into a plurality of first sub-character strings according to a dividing character in the first received character string, and determines a target sending length based on the plurality of first sending character strings and the plurality of first sub-character strings.

[0039] In one embodiment, after determining the target sending length, the method further includes: recording the first received character string and the target sending length in a target record file. The target record file is used to perform traceability control on the determination of the sending parameters of the code reader.

[0040] In one embodiment, after determining the target sending length, the method further includes: setting the sending length of the code reader to the target sending length.

[0041] Step 306, receiving multiple second transmission character strings sent by the code reader based on multiple candidate time intervals to obtain a second received character string; the interval lengths of the multiple candidate time intervals vary in a directional manner; the number of characters in the second transmission character string is equal to the target transmission length.

[0042] Among them, the candidate time interval refers to a pre-set time interval. The interval lengths of multiple candidate time intervals are not equal, and the interval lengths of multiple candidate time intervals are directionally changed. It can be understood that the multiple candidate time intervals have a fixed arrangement order. According to the fixed arrangement order, the interval lengths of the candidate time intervals gradually increase or decrease. The difference between two adjacent candidate time intervals can be set according to actual needs, and there is no restriction here. For example, the multiple candidate time intervals are 200 milliseconds, 190 milliseconds, 180 milliseconds, 170 milliseconds, 160 milliseconds, 150 milliseconds, 140 milliseconds, and 130 milliseconds, etc., or the multiple candidate time intervals are 200 milliseconds, 180 milliseconds, 160 milliseconds, 140 milliseconds, 120 milliseconds, 100 milliseconds, 80 milliseconds, and 60 milliseconds, etc.

[0043] The second transmission string refers to a string sent by the code reader to the computer device for determining the target transmission time interval. The number of characters contained in the second transmission string is equal to the target transmission length. The characters in the second transmission string can be at least one of numbers and letters, and the characters in the second transmission string can be the same or different. For example, the target transmission length is 5 characters, and the first second transmission string of the plurality of second transmission strings is "00000", the second second transmission string is "11111", the third second transmission string is "22222", the fourth second transmission string is "44444", the fifth second transmission string is "aaaaa", the sixth second transmission string is "bbbbb", the seventh second transmission string is "ccccc", etc.

[0044] Exemplarily, after determining the target transmission length, the computer device sends the target transmission length to the code reader, and the code reader generates a plurality of second transmission strings of the target transmission length, and sends a second transmission string to the computer device every other candidate time interval according to the arrangement order of the interval lengths of the plurality of candidate time intervals in a directional change, and the computer device obtains a second received string. The last character in the second transmission string can be a division character, and the division character is different from the other characters in the second transmission string, and is only used as the last character of each second transmission string. For example, with n as the division character, the target transmission length is 5 characters, and the first second transmission string in the plurality of second transmission strings is "0000n", the second second transmission string is "1111n", the third second transmission string is "2222n", the fourth second transmission string is "4444n", the fifth second transmission string is "aaaan", the sixth second transmission string is "bbbbn", the seventh second transmission string is "ccccn", etc.

[0045] In one embodiment, after determining the target transmission length, the computer device sends the target transmission length to the code reader, and the code reader generates a plurality of second transmission character strings of the target transmission lengths, and sends a second transmission character string and a division character to the computer device every candidate time interval according to the arrangement order of the time lengths of the plurality of candidate time intervals in a directionally changing manner, and the computer device obtains a second received character string. The division character may be a line feed character or a pre-set character, etc.

[0046] In one embodiment, the computer device obtains the second received character string, including: the computer device displays the received characters in a text receiving box, and if no characters are received within a preset waiting time, determines the character sequence in the text receiving box as the second received character string.

[0047] In one embodiment, after determining the target sending length, the computer device generates multiple second sending strings of the target sending lengths, and sends the multiple second sending strings of the target sending lengths to the code reader. The code reader obtains the multiple second sending strings of the target sending lengths, and sends a second sending string to the computer device every candidate time interval in an arrangement order in which the interval lengths of the multiple candidate time intervals change in a directionally changing manner, and the computer device obtains a second received string.

[0048] Step 308: Determine a target sending time interval from a plurality of candidate time intervals based on the plurality of second sending character strings and the second receiving character strings.

[0049] The target sending time interval refers to the time interval between two character strings sent by the barcode reader in working mode. The target sending time interval is one of the parameters in the barcode reader sending parameters.

[0050] Exemplarily, the computer device divides the second received character string into a plurality of second sub-character strings according to the dividing characters in the second received character string, and determines the target sending time interval based on the plurality of second sending character strings and the plurality of second sub-character strings.

[0051] In one embodiment, after determining the target sending time interval, the method further includes: recording the second received character string and the determined target sending time interval in a target recording file.

[0052] In one embodiment, after determining the target sending time interval, the method further includes: setting the sending time interval of the code reader to the target sending time interval.

[0053] In the above-mentioned method for determining the sending parameters of the code reader, a plurality of first sending strings sent by the code reader based on a preset time interval are received to obtain a first receiving string. Through the plurality of first sending strings and the first receiving string, the longest string that can be received by the computer device within the preset time interval can be determined, thereby determining a target sending length that matches the receiving performance of the computer device; a plurality of second sending strings sent by the code reader based on a plurality of candidate time intervals are received to obtain a second receiving string. Through the plurality of second sending strings and the second receiving string, the shortest time interval required for the computer device to receive a string of the target sending length can be determined, thereby determining the target sending time interval, that is, the determination of the sending parameters of the code reader can be completed through the computer device and the code reader, and the automation of the determination of the sending parameters of the code reader is realized, thereby improving the efficiency of determining the sending parameters of the code reader.

[0054] In one embodiment, Figure 4 As shown, based on a plurality of first transmission character strings and a first reception character string, determining a target transmission length includes:

[0055] Step 402: divide the first received character string into a plurality of first sub-character strings based on the dividing characters in the first received character string.

[0056] The dividing character refers to a character used to divide the first received string into a plurality of first substrings. The dividing character can be set according to actual needs, and the dividing character can be a line break character or other set characters. The dividing character can be located at the end of the first sent string, or can be not in the first sent string. The first substring refers to a string consisting of some continuous characters in the first received string.

[0057] Exemplarily, the computer device divides the first received character string into a plurality of first sub-character strings according to a plurality of dividing characters in the first received character string.

[0058] Step 404 : sequentially compare the first sent string with the plurality of first substrings in order of the number of characters of the plurality of first sent strings from short to long.

[0059] Exemplarily, the computer device obtains the current first sent string in order of the number of characters from short to long, compares the current first sent string with multiple first substrings, and when there is a first substring that is identical to the current first sent string, determines the next first sent string of the current first sent string as the updated current first sent string, and repeats the step of comparing the current first sent string with the multiple first substrings until there is no first substring that is identical to the current first sent string, and determines the current first sent string as the target first sent string.

[0060] Step 406: When there is no first substring identical to the target first sent string, determine a target sent length based on the target first sent string.

[0061] Exemplarily, when there is no first substring identical to the target first sent string, the computer device determines the target sent length based on the directional change trend of the number of characters of the target first sent string and the plurality of first sent strings.

[0062] In this embodiment, the first received string is divided into multiple first substrings by dividing characters in the first received string, some of the first substrings are complete first sent strings, and some of the first substrings are incomplete first sent strings. When there is no first substring identical to the target first sent string, it indicates that the target first sent string cannot be completely received by the computer device, and the number of characters in the target first sent string exceeds the maximum number of characters allowed by the receiving performance of the computer device. Therefore, the number of characters slightly smaller than the number of characters in the target first sent string can be determined as the target sending length, thereby realizing the automation of the determination of the target sending length, thereby improving the efficiency of determining the target sending length in the sending parameters of the code reader.

[0063] In one embodiment, determining a target sending length based on a target first sending character string includes:

[0064] When the number of characters in multiple first sent strings changes in a decreasing manner, the number of characters in the first sent string adjacent to the target first sent string is determined as the target sending length; or, when the number of characters in multiple first sent strings changes in an increasing manner, the number of characters in the first sent string adjacent to the target first sent string is determined as the target sending length.

[0065] Exemplarily, when the number of characters in multiple first sent strings changes in a decreasing manner, the computer device determines the number of characters in the first sent string adjacent to the target first sent string as the target sending length; or, when the number of characters in multiple first sent strings changes in an increasing manner, the computer device determines the number of characters in the first sent string adjacent to the target first sent string as the target sending length.

[0066] In this embodiment, when the number of characters of multiple first transmission strings changes in a decreasing manner, the number of characters of the first transmission string adjacent to the target first transmission string is slightly smaller than the number of characters of the target first transmission string. Therefore, the number of characters of the first transmission string adjacent to the target first transmission string is determined as the target transmission length; when the number of characters of multiple first transmission strings changes in an increasing manner, the number of characters of the first transmission string adjacent to the target first transmission string is slightly smaller than the number of characters of the target first transmission string. Therefore, the number of characters of the first transmission string adjacent to the target first transmission string is determined as the target transmission length; the target transmission length determined by the above method not only makes the target transmission length smaller than the maximum number of characters allowed to be received by the receiving performance of the computer device, but also avoids the target transmission length from being too small in number of characters, thereby improving the accuracy of the target transmission length.

[0067] In one embodiment, before receiving a plurality of second transmission character strings transmitted by the code reader based on the candidate time interval of the orientation change to obtain the second reception character string, the method further includes:

[0068] The target transmission length is transmitted to the code reader; and a plurality of second transmission character strings having the target transmission length as the number of characters are generated by the code reader.

[0069] Exemplarily, after determining the target sending length, the computer device sends the target sending length to the code reader, and the code reader generates multiple second sending character strings with the number of characters equal to the target sending length based on the number of multiple candidate time intervals; the number of the multiple second sending character strings is equal to the number of the multiple candidate time intervals.

[0070] In this embodiment, after determining the target sending length, the computer device sends the target sending length to the code reader in order to further determine the target sending time interval. The code reader generates a second sending character string with a plurality of characters used to determine the target sending time interval as the target sending length, thereby providing basic data for the subsequent determination of the target sending time interval.

[0071] In one embodiment, determining a target sending time interval from a plurality of candidate time intervals based on a plurality of second sending character strings and a second receiving character string includes:

[0072] Based on the dividing characters in the second received character string, the second received character string is divided into multiple second sub-strings; in the order of the interval lengths of the multiple candidate time intervals from long to short, the second sent character string corresponding to the candidate time interval is compared with the multiple second sub-strings in turn; when there is no second sub-string that is the same as the target second sent character string, the target sending time interval is determined based on the target second sent character string.

[0073] The second substring refers to a string consisting of some consecutive characters in the second received string.

[0074] Exemplarily, the computer device divides the second received string into multiple second substrings based on the dividing characters in the second received string, obtains the current second sent string in order of the interval lengths of multiple candidate time intervals from long to short, compares the current second sent string with the multiple second substrings, and when there is a second substring that is identical to the current second sent string, determines the next second sent string of the current second sent string as the updated current second sent string, repeats the step of comparing the current second sent string with the multiple second substrings until there is no second substring that is identical to the current second sent string, determines the current second sent string as the target second sent string, and determines the target sending time interval based on the directional change trend of the number of characters of the target second sent string and the multiple second sent strings.

[0075] In this embodiment, the second received string is divided into multiple second substrings by dividing characters in the second received string, some of the second substrings are complete second sent strings, and some of the second substrings are incomplete second sent strings. When there is no second substring that is identical to the target second sent string, it indicates that the computer device cannot completely receive the target second sent string within the candidate time interval corresponding to the target second sent string, and then the candidate time interval slightly longer than the candidate time interval corresponding to the target second sent string can be determined as the target sending time interval, thereby realizing the automation of the target sending time interval, thereby improving the efficiency of determining the target sending time interval in the code reader sending parameters.

[0076] In one embodiment, determining the target sending time interval based on the second sending character string includes:

[0077] When the interval lengths of multiple candidate time intervals change in an increasing manner, the candidate time interval corresponding to the second sending string adjacent to the target second sending string is determined as the target sending time interval; or, when the interval lengths of multiple candidate time intervals change in a decreasing manner, the candidate time interval corresponding to the second sending string adjacent to the target second sending string is determined as the target sending time interval.

[0078] Exemplarily, when the interval durations of multiple candidate time intervals change in an increasing manner, the computer device determines the candidate time interval corresponding to the second sending string adjacent to the target second sending string as the target sending time interval; or, when the interval durations of multiple candidate time intervals change in a decreasing manner, the computer device determines the candidate time interval corresponding to the second sending string adjacent to the target second sending string as the target sending time interval.

[0079] In this embodiment, when the interval lengths of multiple candidate time intervals are increasing, the candidate time interval corresponding to the second sending string adjacent to the target second sending string is slightly longer than the candidate time interval corresponding to the target second sending string. Therefore, the candidate time interval corresponding to the second sending string adjacent to the target second sending string is determined as the target sending time interval; or, when the interval lengths of multiple candidate time intervals are decreasing, the candidate time interval corresponding to the second sending string adjacent to the previous target second sending string is slightly longer than the candidate time interval corresponding to the target second sending string. Therefore, the candidate time interval corresponding to the second sending string adjacent to the previous target second sending string is determined as the target sending time interval; the target sending time interval determined by the above method not only makes the target sending time interval greater than the shortest time interval required for the computer device's receiving performance to receive a string of the target sending length, but also avoids the target sending time interval being too long, thereby improving the accuracy of the target sending time interval.

[0080] In one embodiment, before receiving a plurality of first sent character strings sent by a code reader based on a preset time interval to obtain a first received character string, the method further includes:

[0081] In response to the triggering operation of the parameter determination control of the code reader, the code reader is controlled to enter the parameter determination mode; a text receiving box is displayed, and the input cursor is controlled to be located in the text receiving box.

[0082] The barcode reader transmission parameter determination control refers to a control that controls the barcode reader to enter the transmission parameter determination mode. The barcode reader transmission parameter determination control can be a virtual control or a physical control, which is not limited here. The text receiving box refers to an area used to display received characters. The input cursor refers to an icon that represents the current input position. The input cursor can be a flashing vertical line.

[0083] Exemplarily, the debugger starts the code reader sending parameter debugging system in the computer device, the debugger clicks the code reader sending parameter determination control in the code reader sending parameter debugging system, the computer device responds to the triggering operation of the code reader sending parameter determination control, controls the code reader to enter the sending parameter determination mode, displays a text receiving box on the display screen of the computer device, controls the input cursor to be located in the text receiving box, and the text receiving box is used to display the characters received from the code reader.

[0084] In one embodiment, after displaying the text receiving box, controlling the input cursor to be located behind the text receiving box, further comprising: resetting the input method of the computer device to English and turning off uppercase letters. By setting the input method to English and turning off uppercase letters, it is avoided that the computer device receives the character string sent by the code reader and the uppercase letters and lowercase letters are confused, thereby causing errors in determining the parameters sent by the code reader.

[0085] In one embodiment, when the text receiving box is displayed, the input cursor is controlled to be located behind the text receiving box, and a prompt message is displayed. The prompt message is used to prompt not to operate the keyboard and mouse, for example, the prompt message is "the input method has been reset, please do not operate the keyboard or mouse until the interface display debugging is completed".

[0086] In this embodiment, the computer device controls the code reader to enter the sending parameter determination mode in response to the triggering operation of the code reader sending parameter determination control, so that the code reader performs actions related to the code reader sending parameter determination. The computer device displays a text receiving box and controls the input cursor to be located in the text receiving box for displaying the characters received from the code reader.

[0087] In an exemplary embodiment, the flowchart of determining the parameters sent by the code reader is as follows: Figure 5 As shown, including:

[0088] The debugger starts the code reader sending parameter debugging system in the computer device. The debugger clicks the code reader sending parameter determination control in the code reader sending parameter debugging system. The computer device responds to the triggering operation of the code reader sending parameter determination control, controls the code reader to enter the sending parameter determination mode, displays a text receiving box on the display screen of the computer device, controls the input cursor to be located in the text receiving box, resets the input method of the computer device to English, turns off uppercase, and displays a prompt message "The input method has been reset. Please do not operate the keyboard or mouse until the interface shows that debugging is completed."

[0089] After entering the sending parameter determination mode, the code reader sends a first sending character string and a line break to the computer device at preset time intervals (200 milliseconds) in the order in which the number of characters in the multiple first sending character strings increases. The computer device displays the received characters in the text receiving box. If no characters are received within the preset waiting time (5 seconds), the character sequence in the text receiving box is determined as the first receiving character string.

[0090] The computer device divides the first received string into multiple first substrings according to the line break in the first received string, obtains the current first sent string in the order of the number of characters from short to long, compares the current first sent string with the multiple first substrings, and when there is a first substring identical to the current first sent string, determines the next first sent string of the current first sent string as the updated current first sent string, repeats the step of comparing the current first sent string with the multiple first substrings until there is no first substring identical to the current first sent string, determines the current first sent string as the target first sent string, and determines the number of characters of the previous adjacent first sent string of the target first sent string as the target sent length. The computer device sets the sending length of the code reader to the target sending length, and records the first received string and the target sending length in the target record file.

[0091] After determining the target transmission length, the computer device sends the target transmission length to the code reader. Based on the number of multiple candidate time intervals, the code reader generates multiple second transmission character strings with the number of characters equal to the target transmission length, and sends a second transmission character string to the computer device every other candidate time interval in the descending order of the interval lengths of the multiple candidate time intervals. The computer device displays the received characters in the text receiving box. If no characters are received within the preset waiting time (5 seconds), the character sequence in the text receiving box is determined as the second receiving character string.

[0092] The computer device divides the second received string into multiple second substrings based on the line break in the second received string, obtains the current second sent string in the order of the interval lengths of multiple candidate time intervals from long to short, compares the current second sent string with the multiple second substrings, and when there is a second substring identical to the current second sent string, determines the next second sent string of the current second sent string as the updated current second sent string, repeats the step of comparing the current second sent string with the multiple second substrings until there is no second substring identical to the current second sent string, determines the current second sent string as the target second sent string, and determines the candidate time interval corresponding to the previous adjacent second sent string of the target second sent string as the target sending time interval. The computer device sets the sending time interval of the code reader as the target sending time interval, and records the second received string and the determined target sending time interval in the target record file.

[0093] In the above-mentioned method for determining the sending parameters of the code reader, a plurality of first sending strings sent by the code reader based on a preset time interval are received to obtain a first receiving string. Through the plurality of first sending strings and the first receiving string, the longest string that can be received by the computer device within the preset time interval can be determined, thereby determining a target sending length that matches the receiving performance of the computer device; a plurality of second sending strings sent by the code reader based on a plurality of candidate time intervals are received to obtain a second receiving string. Through the plurality of second sending strings and the second receiving string, the shortest time interval required for the computer device to receive a string of the target sending length can be determined, thereby determining the target sending time interval, that is, the determination of the sending parameters of the code reader can be completed through the computer device and the code reader, and the automation of the determination of the sending parameters of the code reader is realized, thereby improving the efficiency of determining the sending parameters of the code reader.

[0094] It should be understood that, although the steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0095] Based on the same inventive concept, the embodiment of the present application also provides a device for determining parameters sent by a code reader. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more devices for determining parameters sent by a code reader provided below can refer to the limitations of the method for determining parameters sent by a code reader above, and will not be repeated here.

[0096] like Figure 6 As shown, an embodiment of the present application provides a device for determining parameters sent by a code reader, including:

[0097] The first receiving module 602 is used to receive a plurality of first transmission character strings sent by the code reader based on a preset time interval to obtain a first received character string; the number of characters in the plurality of first transmission character strings changes in a directional manner;

[0098] A sending length determining module 604, configured to determine a target sending length based on a plurality of first sending character strings and a first receiving character string;

[0099] The second receiving module 606 is used to receive multiple second transmission character strings sent by the code reader based on multiple candidate time intervals to obtain a second received character string; the interval lengths of the multiple candidate time intervals vary in a directional manner; the number of characters in the second transmission character string is equal to the target transmission length;

[0100] The sending time interval determining module 608 is configured to determine a target sending time interval from a plurality of candidate time intervals based on a plurality of second sending character strings and a second receiving character string.

[0101] In one embodiment, the sending length determination module 604 is also used to: divide the first received string into multiple first substrings based on the dividing characters in the first received string; compare the first sent string with the multiple first substrings in order from short to long in terms of the number of characters in the multiple first sent strings; and determine the target sending length based on the target first sent string when there is no first substring that is identical to the target first sent string.

[0102] In one embodiment, the sending length determination module 604 is also used to: when the number of characters of multiple first sending strings changes in a decreasing manner, determine the number of characters of the first sending string that is adjacent to the target first sending string as the target sending length; or, when the number of characters of multiple first sending strings changes in an increasing manner, determine the number of characters of the first sending string that is adjacent to the target first sending string as the target sending length.

[0103] In one embodiment, the sending length determining module 604 is further used to: send the target sending length to the code reader; and generate, through the code reader, a plurality of second sending character strings whose number of characters is the target sending length.

[0104] In one embodiment, the sending time interval determination module 608 is also used to: divide the second received string into multiple second substrings based on the dividing characters in the second received string; compare the second sending string corresponding to the candidate time interval with the multiple second substrings in order from long to short of the interval lengths of the multiple candidate time intervals; when there is no second substring that is identical to the target second sending string, determine the target sending time interval based on the target second sending string.

[0105] In one embodiment, the sending time interval determination module 608 is also used to: when the interval lengths of multiple candidate time intervals are increasing, determine the candidate time interval corresponding to the second sending string that is adjacent to the target second sending string as the target sending time interval; or, when the interval lengths of multiple candidate time intervals are decreasing, determine the candidate time interval corresponding to the second sending string that is adjacent to the target second sending string as the target sending time interval.

[0106] In one embodiment, the device for determining the parameters sent by the code reader includes a trigger module, which is used to: respond to the trigger operation of the code reader sending parameter determination control, control the code reader to enter the sending parameter determination mode; display a text receiving box, and control the input cursor to be located in the text receiving box.

[0107] Each module in the above protective film abnormality detection device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0108] In some embodiments, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 7As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, the steps in the method for determining the parameters sent by the above-mentioned code reader are implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0109] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0110] In some embodiments, a computer device is provided. The computer device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the steps in the above method embodiments are implemented.

[0111] In some embodiments, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0112] In some embodiments, a computer-readable storage medium 800 is provided on which a computer program 802 is stored. When the computer program 802 is executed by a processor, the steps in the above-mentioned method embodiments are implemented. The internal structure diagram thereof can be as follows: Figure 8 shown.

[0113] In some embodiments, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0114] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0115] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0116] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0117] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for determining parameters sent by a code reader, characterized in that: include: Receiving a plurality of first sent character strings sent by the code reader based on a preset time interval to obtain a first received character string; The number of characters in the plurality of first sent character strings varies in a directional manner; Determining a target sending length based on the plurality of first sending character strings and the first receiving character string; Receiving a plurality of second transmission character strings sent by the code reader based on a plurality of candidate time intervals to obtain a second reception character string; the interval lengths of the plurality of candidate time intervals vary in a direction; the number of characters in the second transmission character string is equal to the target transmission length; Based on the plurality of second transmission character strings and the second reception character string, a target transmission time interval is determined from the plurality of candidate time intervals.

2. The method according to claim 1, characterized in that: The determining a target sending length based on the plurality of first sending character strings and the first receiving character string comprises: Dividing the first received string into a plurality of first substrings based on a dividing character in the first received string; Comparing the first sent string with the first substrings in order from short to long in terms of the number of characters in the first sent string; When the first substring identical to the target first transmission string does not exist, a target transmission length is determined based on the target first transmission string.

3. The method according to claim 2, characterized in that The determining a target sending length based on the target first sending character string comprises: In the case where the number of characters of the plurality of first transmission character strings decreases, the number of characters of the first transmission character string next to the target first transmission character string is determined as the target transmission length; or When the number of characters of the plurality of first transmission character strings increases, the number of characters of the first transmission character string immediately preceding the target first transmission character string is determined as the target transmission length.

4. The method according to claim 1, characterized in that: Before receiving a plurality of second sent character strings sent by the code reader based on the candidate time intervals of the directional changes to obtain a second received character string, the method further includes: Sending the target transmission length to the code reader; A plurality of second transmission character strings having a character number equal to the target transmission length are generated by the code reader.

5. The method according to claim 1, characterized in that: The determining a target sending time interval from the plurality of candidate time intervals based on the plurality of second sending character strings and the second receiving character string comprises: Dividing the second received string into a plurality of second substrings based on a dividing character in the second received string; In descending order of the interval lengths of the multiple candidate time intervals, sequentially comparing the second sent character string corresponding to the candidate time interval with the multiple second sub-character strings; When the second substring identical to the target second sending string does not exist, a target sending time interval is determined based on the target second sending string.

6. The method according to claim 5, characterized in that The determining the target sending time interval based on the second sending character string includes: In the case where the interval lengths of the multiple candidate time intervals are increasing, the candidate time interval corresponding to the second transmission string next to the target second transmission string is determined as the target transmission time interval; or In the case that the interval lengths of the plurality of candidate time intervals are decreasing, the candidate time interval corresponding to the second transmission character string immediately before the target second transmission character string is determined as the target transmission time interval.

7. The method according to claim 1, characterized in that Before receiving a plurality of first sent character strings sent by the code reader based on a preset time interval to obtain a first received character string, the method further includes: In response to a triggering operation of a parameter determination control of the code reader, controlling the code reader to enter a parameter determination mode; A text receiving box is displayed, and an input cursor is controlled to be located in the text receiving box.

8. A device for determining parameters sent by a code reader, characterized in that: include: A first receiving module, used for receiving a plurality of first sent character strings sent by the code reader based on a preset time interval, and obtaining a first received character string; The number of characters in the plurality of first sent character strings varies in a directional manner; A sending length determining module, configured to determine a target sending length based on the plurality of first sending character strings and the first receiving character string; A second receiving module is used to receive a plurality of second transmission character strings sent by the code reader based on a plurality of candidate time intervals to obtain a second reception character string; the interval lengths of the plurality of candidate time intervals vary in a direction; the number of characters in the second transmission character string is equal to the target transmission length; The sending time interval determining module is used to determine a target sending time interval from the multiple candidate time intervals based on the multiple second sending character strings and the second receiving character string.

9. A computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.