CN114385262A - Communication parameter configuration method and data processing terminal - Google Patents

Communication parameter configuration method and data processing terminal Download PDF

Info

Publication number
CN114385262A
CN114385262A CN202111668431.1A CN202111668431A CN114385262A CN 114385262 A CN114385262 A CN 114385262A CN 202111668431 A CN202111668431 A CN 202111668431A CN 114385262 A CN114385262 A CN 114385262A
Authority
CN
China
Prior art keywords
information
data
code scanning
data processing
processing terminal
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.)
Granted
Application number
CN202111668431.1A
Other languages
Chinese (zh)
Other versions
CN114385262B (en
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.)
Beijing Const Instruments Technology Inc
Original Assignee
Beijing Const Instruments Technology Inc
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 Beijing Const Instruments Technology Inc filed Critical Beijing Const Instruments Technology Inc
Priority to CN202111668431.1A priority Critical patent/CN114385262B/en
Publication of CN114385262A publication Critical patent/CN114385262A/en
Application granted granted Critical
Publication of CN114385262B publication Critical patent/CN114385262B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention provides a communication parameter configuration method and a data processing terminal, which comprises the steps of establishing communication connection between the data processing terminal and code scanning equipment, acquiring equipment information of external equipment connected to the data processing terminal, wherein the external equipment comprises the code scanning equipment, generating a graphic code at the data processing terminal, which can be recognized by the code scanning device, the code scanning device recognizing the graphic code, the recognition result of the code scanning device on the graphic code can be acquired by the data processing terminal, the data processing terminal acquires data information from an external device, compares the data information with the content information of the graphic code, determines the source of the data information as the code scanning device if the data information is consistent with the content information of the graphic code, and calls device information corresponding to the data information as communication parameters for configuration; the scheme of the invention can realize the automatic configuration of the communication parameters, and has simple operation and good user experience.

Description

Communication parameter configuration method and data processing terminal
Technical Field
The invention relates to the technical field of code scanning equipment communication, in particular to a communication parameter configuration method and a data processing terminal capable of realizing the communication parameter configuration method and capable of configuring communication parameters.
Background
The code scanning device is also called a code scanner, a bar code scanner and a bar code reader, is used for reading information contained in a bar code, and is widely applied to a plurality of industrial fields such as automatic manufacturing, logistics and the like; in general, a code scanning device is commonly used with a computer device or other terminal devices with data processing capability, specifically, a communication connection is established between the code scanning device and the data processing terminal, the code scanning device undertakes reading work of a graphic code, and the data processing terminal processes and applies obtained read information.
When the code scanning device and the data processing terminal establish a data connection, the code scanning device cannot be used immediately, but a communication parameter configuration is performed on the data processing terminal, for example, the code scanning device is connected to a USB port of a PC computer, and since the PC computer usually has a plurality of USB ports, a plurality of information input devices including a mouse, a keyboard, and the like are also connected, at this time, for an application program which runs on the computer and is responsible for code scanning information processing, a code scanning data source cannot be directly determined, and support needs to be provided by means of the communication parameter.
The general solution of the prior art is that a user views device information of a code scanning device, such as a supplier identification code (VID), a product identification code (PID), a channel Location (Location), etc., in a device management program of a computer, and then introduces the queried device information into the computer through a keyboard input, etc., an application program in charge of code scanning information processing determines a code scanning data source (i.e., a code scanning device to be used in subsequent work) according to the device information, and processes the information after the code scanning device acquires barcode information;
the prior art solutions have problems: under the condition that the user is familiar with the computer, the user may not know how to inquire the device information, for example, how to enter and use a device management program of the computer, which one of a plurality of external devices is a code scanning device, and the like, so that certain trouble is brought to the operation of the user.
With respect to the above general solution, a code scanning device provider in the prior art often provides an application program specific to the device, and the application program directly configures communication parameters of the code scanning device, and the technical essence of the prior art is to write device information of the code scanning device in the application program in advance, and when the application program and the code scanning device do not correspond to each other (for example, it is unlikely that device information of a product of company b is recorded in advance in an application program of company a), the problem cannot be solved, which greatly limits the application range of the solution.
In summary, the inventor finds that, in the process of implementing the technical solution of the present application, at least one technical solution that is sufficiently simple and reliable in operation is absent in the prior art, so that the data processing terminal can accurately acquire and process code scanning information from a desired code scanning device.
Disclosure of Invention
The technical problem to be solved is as follows: in order to accurately acquire code scanning information from expected code scanning equipment, a data processing terminal needs to configure related communication parameters for assistance, and the communication parameter acquisition or configuration method in the prior art is not simple, reliable and widely applicable enough.
Aiming at the technical problems in the prior art, a communication parameter configuration method and a data processing terminal capable of realizing the communication parameter configuration method and capable of configuring communication parameters are provided, so that the technical problems in the prior art are solved.
A method for configuring communication parameters includes the steps of,
establishing communication connection between the data processing terminal and the code scanning equipment;
acquiring equipment information of external equipment connected to the data processing terminal, wherein the external equipment comprises the code scanning equipment;
generating a graphic code which can be recognized by code scanning equipment;
the code scanning equipment identifies the graphic code, and the identification result of the code scanning equipment on the graphic code can be acquired by the data processing terminal;
and the data processing terminal acquires data information from external equipment, compares the data information with the content information of the graphic code, determines the source of the data information as the code scanning equipment if the data information is consistent with the content information of the graphic code, and calls equipment information corresponding to the data information as communication parameters for configuration.
Preferably, the acquiring of the device information of the external device connected to the data processing terminal includes acquiring device information of the external device of a non-determined object; the non-specific object refers to all objects having certain characteristics or within a certain range.
Further preferably, the device information of all the external devices connected to the data processing terminal is acquired.
Further preferably, the data processing terminal includes a plurality of communication interfaces, the code scanning device is connected to one of the plurality of communication interfaces, and the acquiring of the device information of the external device connected to the data processing terminal includes acquiring the device information of all the external devices connected to the communication interfaces.
Further preferably, the data processing terminal includes a plurality of USB interfaces, and the acquiring device information of the external device connected to the data processing terminal includes acquiring device information of all external devices connected to the USB interfaces of the data processing terminal.
Preferably, the graphic code is randomly generated.
Further preferably, randomly generating the graphic code includes generating a random character string, and generating the graphic code according to the random character string.
Further preferably, in the two different communication parameter configuration processes, the random character string and the graphic code are different.
Further preferably, the graphic code remains unchanged before the communication parameter configuration is completed.
Further preferably, the graphic code remains unchanged, including generating and storing a random character string, and generating the graphic code based on the stored random character string instead of repeatedly generating the random character string before completing the communication parameter configuration.
Preferably, the method comprises the steps of obtaining equipment information of the external equipment, registering a data receiving event processing function according to the equipment information, and triggering the data receiving event processing function when a data receiving event occurs to the corresponding external equipment; and the code scanning equipment identifies the graphic code and triggers a corresponding data receiving event processing function.
Further preferably, the function value of the data reception event handling function and the argument of the data reception event handling function are the same.
A method for configuring communication parameters includes the steps of,
establishing communication connection between the data processing terminal and the code scanning equipment;
generating a graphic code which can be recognized by code scanning equipment;
the code scanning equipment identifies the graphic code, and the identification result of the code scanning equipment on the graphic code can be acquired by the data processing terminal;
and the data processing terminal acquires data information from external equipment, compares the data information with the content information of the graphic code, determines that the source of the data information is the code scanning equipment if the data information is consistent with the content information of the graphic code, acquires equipment information corresponding to the data information, and configures all or part of the equipment information as communication parameters.
Preferably, the graphic code is randomly generated.
Further preferably, randomly generating the graphic code includes generating a random character string, and generating the graphic code according to the random character string.
Further preferably, in the two different communication parameter configuration processes, the random character string and the graphic code are different.
Further preferably, the graphic code remains unchanged before the communication parameter configuration is completed.
Further preferably, the graphic code remains unchanged, including generating and storing a random character string, and generating the graphic code based on the stored random character string instead of repeatedly generating the random character string before completing the communication parameter configuration.
A data processing terminal capable of configuring communication parameters comprises an input unit, a data processing unit, a communication unit and a display unit;
the input unit is used for inputting instructions and/or information;
the communication unit is used for establishing communication connection with external equipment, and the external equipment comprises code scanning equipment;
the display unit is used for displaying the graphic code;
the data processing unit is used for processing information and is configured to generate graphic code data for display by the display unit, process data information transmitted by external equipment, compare the data information with content information of the graphic code, determine that the source of the data information is the code scanning equipment if the data information is consistent with the content information of the graphic code, acquire equipment information of the code scanning equipment and configure all or part of the data as communication parameters.
Preferably, the input unit inputs a communication parameter configuration instruction, and the data processing unit generates graphic code data for the display unit to display based on the communication parameter configuration instruction.
Further preferably, based on the communication parameter configuration instruction, the data processing unit obtains device information of the external device connected to the data processing terminal.
Further preferably, the data processing unit acquires device information of all external devices connected to the data processing terminal.
Further preferably, the data processing terminal includes a plurality of communication interfaces, the code scanning device is connected to one of the plurality of communication interfaces, and the acquiring of the device information of the code scanning device includes the data processing unit acquiring the device information of all external devices connected to the communication interfaces.
Further preferably, the data processing terminal includes a plurality of USB interfaces, and the acquiring of the device information of the code scanning device includes the data processing unit acquiring the device information of all external devices connected to the USB interfaces of the data processing terminal.
Preferably, the generating of the graphic code data for display by the display unit includes generating a random character string, and generating the graphic code data according to the random character string.
Further preferably, before the communication parameter configuration is completed, the random character string remains unchanged.
Preferably, the method comprises the steps of obtaining equipment information of the external equipment, registering a data receiving event processing function according to the equipment information, and triggering the data receiving event processing function when a data receiving event occurs to the corresponding external equipment; and the code scanning equipment identifies the graphic code and triggers a corresponding data receiving event processing function.
Has the advantages that:
1) the user does not need to search the related equipment information of the code scanning equipment, but directly passes through the code scanning action of the code scanning equipment, so that the equipment information of the code scanning equipment can be automatically identified by the data processing terminal, the operation difficulty of the user is reduced, and the operation experience of the user is obviously improved;
2) the code scanning equipment can be found before the code scanning equipment is formally used, and/or the problems of communication connection between the code scanning equipment and a data processing terminal and other links which may influence the normal work of the code scanning equipment are/is solved, the verification work of the code scanning equipment is performed, the reliability is higher, the problem caused by the failure of the code scanning equipment in the formal work is avoided, and meanwhile, no verification link is additionally added;
3) the data processing terminal does not need to preset relevant characteristic information of the code scanning device or identify the code scanning device from a plurality of device information by a complex algorithm, and parameter configuration can be carried out according to the scheme of the application as long as the code scanning device can normally establish communication connection with the data processing terminal and work, so that the application range is wide.
Drawings
Fig. 1 is a flow chart of an exemplary communication parameter configuration.
Fig. 2 is a system connection diagram of an exemplary data processing terminal.
Fig. 3 is a flow chart illustrating further exemplary communication parameter configuration.
Detailed Description
The present application is described in detail below, and if a detailed description of known techniques is not necessary for illustrating the features of the present application, it is omitted. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
It will be understood by those within the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
The code scanning device, also called a code scanner, a code scanning gun, a bar code scanner, a bar code scanning gun, a graphic code scanner, etc., is a device for reading information contained in a bar code, and can be divided into a one-dimensional code scanning device and a two-dimensional code scanning device.
A data processing terminal, which may be a device dedicated to data processing, such as a computer, or other devices loaded with an operating system and an application program and having a certain data processing capability, such as an intelligent temperature calibrator, an intelligent pressure calibrator, and so on, generally speaking, a data processing terminal includes a processing unit and a communication unit, where the processing unit is used to process acquired information and/or control the data processing terminal to work, and the communication unit is used to establish communication connection with other devices so as to acquire/transmit data, and may be carried by the data processing terminal itself or exist as an external device, and includes an input unit and a display unit, both of which jointly form an interactive part between the data processing terminal and a user, in the prior art, the input unit may be a keyboard, a mouse, a touch panel, and so on, and the display unit may be a display screen, and so on, the input unit and the display unit may be integrated (for example, the touch panel has the functions of both the display unit and the input unit), or may not be integrated, and through the input unit, a user may input information to the data processing terminal, so that the data processing terminal performs a certain operation/process/procedure according to a certain instruction, or may provide a certain information to the user or other persons/objects capable of reading the influence through the display unit; in a broad sense, the data processing terminal may be composed of offline devices in the same region, or may be composed of offline devices in different regions through remote connection, and some functions (e.g., processing units) of the data processing terminal may be implemented on-line, so that the data processing terminal may not be an entity terminal in a certain visible area.
Generally, the code scanning device and the data processing terminal are matched with each other to work, according to actual user requirements (including application scenes), an application program can be loaded on the data processing terminal, after the code scanning device finishes code scanning and decoding operations, information contained in a graphic code is uploaded (through a communication unit of the code scanning device), the data processing terminal receives the information uploaded by the code scanning device (through the communication unit of the data processing terminal), and the application program can process the data information according to the user requirements, so that the requirements of the application scenes are met.
The data processing terminal and the application program thereof for processing scene data must identify and determine the code scanning device to achieve the effect of cooperating with the code scanning device, because from the perspective of the data processing terminal, there is often more than one data channel or data interface between the data channel or data interface provided by its communication unit and the external device, and the external device that can establish connection with the data processing terminal may be many kinds and not limited to the code scanning device, when a user holds a plurality of code scanning devices, the code scanning device that he expects or is using may be a specific and not an arbitrary code scanning device, which results in that, if the application program cannot determine the code scanning device, the application program cannot know that the input data is not the information of the uncertainty of the desired code scanning device, which is obviously unacceptable, in fact, since the data processing terminal is generally configured with or externally connected to the input unit, it is expected that when the code scanning device is connected to the data processing terminal, there are likely to be at least two information input sources (for the PC computer, if the code scanning device and the keyboard as the input unit are both input through the USB interface, the PC computer is faced with two information input sources that can generate input values, which cannot distinguish between the code scanning device and the keyboard), and the application program must determine the true code scanning device as the data source and exclude the other input units.
To solve the problem, the known technical solution in the prior art is to configure communication parameters for a code scanning device, where the source of the communication parameters is device information of the code scanning device, the device information is similar to identity information of the device itself and can well distinguish different devices, where the device information may be a connection Location (Location) according to different types of the code scanning device, and it represents a connection channel through which the code scanning device establishes a connection with a data processing terminal, for the data processing terminal, the connection Location may be uniquely determined, and in the case of determining the connection Location, an application may have the unique connection Location, and if the code scanning device is a USB device, it may be a vendor identification code (VID) and a product identification code (PID), which is specified by the USB specification, and the device information carried by the USB device;
based on the communication parameters, after new information is input, the application program can judge according to the communication parameters, so that only data of a data source which accords with the configuration of the communication parameters is obtained and processed; however, after the communication parameter configuration is introduced, a new problem arises that, for the data processing terminal, in the case of communication protocol matching, the data processing terminal can read the device information from the external device including the code scanning device, but based on the device information, the data processing terminal cannot recognize whether the source/object of the device information is the code scanning device or whether it is the desired code scanning device.
Taking the existing PC computer with Windows operating system as an example, there are two ways to specify or input communication parameters, one of which is to query through the device manager, however, this not only requires the user to know the query path, but also requires the user to operate many times, and sometimes the device information may be displayed in a mixed manner, which greatly increases the difficulty of user operation and reduces the user operation experience, and the other is to invoke the device information in the device manager by the application program, however, this not only puts forward a certain requirement on the authority of the application program (the necessity and rationality for the application program to invoke similar data need to be considered), and at the same time, the user still needs to search and select, as described above, when there are a plurality of external devices, even more than two code scanning devices are accessed in the data processing terminal, this selection is difficult and easy to be confused, the user needs to repeatedly confirm and verify whether the correct device is selected, which is also not friendly to the user operation.
In the design process for implementing the present embodiment, several solutions are given:
one of the schemes is that when communication parameter configuration is performed, a code scanning device is accessed and only accessed to a data processing terminal, and other devices are not accessed, at this time, the only external device capable of being read is the code scanning device, so that device information corresponding to the code scanning device can be determined, and the scheme has the problems that application scene conditions are very high, taking a PC computer as an example, the scheme requires that peripherals such as a mouse, a keyboard and the like are taken out of the computer, so that normal operation experience of a user is influenced, and the scheme is not a perfect solution for mainly improving operation experience of the user (combining the problem condition that related communication parameters are not difficult to obtain, but similar information obtained is complicated, and it is difficult to determine which information is required by communication parameters);
in another scheme, when communication parameter configuration is performed, after a communication parameter configuration instruction is reached, a code scanning device performs code scanning operation as a first external device in a time sequence sequencing mode, that is, for a data processing terminal, after the communication parameter configuration instruction is obtained, data input conditions of the external device are periodically detected, the external device which generates data input earliest is regarded as the code scanning device, compared with the previous scheme, the scheme has the advantages that a user does not need to detach other external devices first, but external factors have a large influence on the scheme, and a PC computer is taken as an example, careless touch on peripheral devices such as a mouse and a keyboard is a difficult-to-avoid condition, and the careless touch can cause false identification of the code scanning device (for example, the mouse is touched by mistake at the first time, and then code scanning operation is performed), which is obviously improved compared with the previous scheme, there is still room for improvement;
in another scheme, a code scanning device database is preset in a data processing terminal (or in a host system thereof), the device information of the code scanning device and an identification rule thereof are pre-recorded in the database, and after the code scanning device is accessed to the data processing terminal, the data processing terminal utilizes the database content to identify and judge, and the code scanning device accords with the database rule and is considered to be an expected code scanning device.
In the process of the foregoing embodiment, although the foregoing solutions can solve the problem of code scanning device identification to a certain extent (the code scanning device can determine and configure communication parameters naturally), there is a certain defect, and meanwhile, on the basis of the foregoing solutions, the technical solution of this embodiment is also expected to solve a technical problem that, when the code scanning device is connected to the data processing terminal, if the code scanning device cannot work normally (including that a graphic code cannot be identified and cannot be decoded normally after the graphic code is identified and cannot transmit information to the data processing terminal normally after decoding is completed), the problem can be found in the communication parameter configuration stage, and the problem does not need to be found until the code scanning device is used to perform code scanning operation formally.
In one example, a method for configuring communication parameters includes,
establishing communication connection between the data processing terminal and the code scanning equipment, wherein the communication connection can be wired connection or wireless connection;
acquiring device information of an external device connected to a data processing terminal, wherein the external device comprises the code scanning device, and from the perspective of the data processing terminal, it cannot be determined which data source is the code scanning device, and more extremely, it may not be determined whether the code scanning device is connected with the data processing terminal, so that the external device is a range, may comprise one or more devices, or may comprise only one code scanning device;
generating a graphic code which can be recognized by code scanning equipment;
the code scanning equipment identifies the graphic code, and the identification result of the code scanning equipment on the graphic code can be acquired by the data processing terminal;
and the data processing terminal acquires data information from external equipment, compares the data information with the content information of the graphic code, determines the source of the data information as the code scanning equipment if the data information is consistent with the content information of the graphic code, and calls equipment information corresponding to the data information as communication parameters for configuration.
By way of further example, a method for configuring communication parameters includes,
establishing communication connection between the data processing terminal and the code scanning equipment;
generating a graphic code which can be recognized by code scanning equipment;
the code scanning equipment identifies the graphic code, and the identification result of the code scanning equipment on the graphic code can be acquired by the data processing terminal;
and the data processing terminal acquires data information from external equipment, compares the data information with the content information of the graphic code, determines that the source of the data information is the code scanning equipment if the data information is consistent with the content information of the graphic code, acquires equipment information corresponding to the data information, and configures all or part of the equipment information as communication parameters.
By further example, a data processing terminal capable of configuring communication parameters comprises an input unit, a data processing unit, a communication unit and a display unit;
the input unit is used for inputting instructions and/or information;
the communication unit is used for establishing communication connection with external equipment, and the external equipment comprises code scanning equipment;
the display unit is used for displaying the graphic code;
the data processing unit is used for processing information and is configured to generate graphic code data for display by the display unit, process data information transmitted by external equipment, compare the data information with content information of the graphic code, determine that the source of the data information is the code scanning equipment if the data information is consistent with the content information of the graphic code, acquire equipment information of the code scanning equipment and configure all or part of the data as communication parameters.
As another example, the present embodiment provides a method for identifying and configuring communication parameters of a code scanning device on a data processing terminal, and specifically, as shown in fig. 1, the method includes a preparation phase, a code scanning phase, and a parameter configuration phase.
And the preparation stage mainly comprises three main works, namely establishing connection between the data processing terminal and the code scanning equipment, acquiring equipment information of the external equipment and generating a graphic code which can be identified by the code scanning equipment.
As shown in fig. 1, in this example, the code scanning device is a USB device, and the data processing terminal is a computer, so that the code scanning device is connected to a USB interface of the data processing terminal through a data line, so that the code scanning device and the data processing terminal can be in communication connection.
Acquiring device information of an external device, as shown in fig. 1, in this specific embodiment, the operation is triggered after a connection is established between the data processing terminal and the code scanning device, specifically, a user clicks an "auto configuration" button on the data processing terminal, and the data processing terminal receives a user instruction; firstly, acquiring information of all USB devices connected to the data processing terminal, and storing the information in an information data set L, wherein based on the previous connection operation, since the code scanning device is also in signal connection with the data processing terminal through the USB interface, all the USB devices read here include the code scanning device and possibly other devices (such as a keyboard, a mouse and the like); thereafter, the data processing terminal reads each piece of information D item by item from the information data set L1、D2、D3… …, and acquiring the device information in each piece of information, and the data processing terminal makes a simple judgment on the result of the reading action, such as information D1If there is no device information, then it is no longer for D1Subsequent processing and switching over to the next piece of information D2Making a judgment if the information D1Including the device information, then pair D1Subsequent processing is performed, the device information may be different according to the object of the aforementioned operation for obtaining information, such as the object in this example is all USB devices connected to the data processing terminal, and therefore, the device information in the figure includes three of a supplier identification code (VID), a product identification code (PID), and a channel Location (Location), and the device information of each external device includes the set of information;
the purpose of acquiring the device information is to identify and determine when a code scanning device performs a specified code scanning action, which is implemented in the present embodiment by establishing a special data receiving event processing function, that is, after the device information is read, the read device information is readKeeping each connection of the information continuously monitored and registering the data receiving event processing function F on the data processing terminaln(xn) Each data reception event handling function Fn(xn) Corresponding to an external device (n is different corresponding to the external device), when the external device has data input (i.e. the input argument xn) When it is time, it will trigger the corresponding data receiving event processing function Fn(xn) Data reception event handling function Fn(xn) For responding to subsequent operations, data reception event handling function Fn(xn) The function value of (1) is equal to the analytic value of the external device (including the code scanning device).
Generating a graphic code for the code scanning device to recognize, as shown in FIG. 1, in this embodiment, a character string S is generated first1(also called identification code) and then based on the character string S1Generating a graphic code P1(one-dimensional bar code, two-dimensional bar code and other graphic codes are possible), the type of the graphic code should be the type of the bar code which can be identified by a bar code scanning device, and then the graphic code P1The contained information being a character string S1(ii) a The generated graphic code is displayed on a display unit of a data processing terminal or in other modes with display/output, so that the graphic code can be identified by a code scanning device, and the code scanning device can know the graphic code P based on the operating characteristics of the code scanning device1After recognition and decoding, the graphic code P should be available1Of information content, i.e. character string S1
After the preparation phase, a code scanning phase may be entered, as shown in fig. 1, for the aforementioned graphic code P using a code scanning device1The decoding unit of the code scanning device carries out recognition on the graphic code P1The analysis is performed to obtain an analysis result (theoretically, the analysis result and the character string S)1Same or equivalent), the code scanning device analyzes the result (namely S) through the communication connection between the code scanning device and the data processing terminal1) Uploading to a data processing terminal; since the data processing terminal establishes the data receiving event processing function, the uploading action triggers the data receiving event processing functionAnd (4) counting.
For the data processing terminal, when the data receiving event processing function is triggered, the data processing terminal may obtain the device information corresponding to the triggered data receiving event processing function and the function value R, as can be known from the foregoing description, when the triggered data receiving event processing function corresponds to the code scanning device, the function value R is an analysis value of the code scanning device, and when the code scanning device is triggered to analyze, the behavior of the code scanning device is that the code scanning device analyzes the graphic code P1When identification is carried out, the analytic value of the code scanning equipment is S1Therefore, when the function value R is S1When the data is received, the external equipment corresponding to the data receiving event processing function is the expected code scanning equipment;
on the contrary, if the external device corresponding to the triggered data receiving event processing function is not the expected code scanning device, obviously, the analytic value obtained by the external device is not the character string S1(ii) a Or, the action of triggering the code scanning device to analyze is other actions of the code scanning device instead of the graphic code P1The identification is carried out, and the analytic value obtained by the code scanning equipment is not the character string S1From the workflow, if the values R and S are resolved1On the other hand, the information object is not the code scanning device, and the subsequent operation is stopped for the data receiving event of the non-code scanning device, so that the non-code scanning device and other devices in the code scanning device (when a plurality of code scanning devices exist) can be eliminated.
If no special data receiving event processing function is registered in the preparation stage, in the code scanning stage, the data processing terminal obtains data information transmitted by each external device (in this embodiment, an external USB device), and when the data information and the character string S are present1And if so, determining that the source of the data information is the expected code scanning equipment, and determining all or part of the equipment information of the external equipment as communication parameters.
A parameter configuration stage, as shown in fig. 1, which is triggered after the code scanning stage completes and determines the expected code scanning device, and in this embodiment, device information corresponding to the data receiving event processing function is called, that is, device information of the code scanning device, and a value in the device information is configured as a communication parameter, so that when an application program processing the code scanning information reads data later, a corresponding data source is called according to the configured communication parameter; after the communication parameter configuration is completed, the configured communication parameters are displayed through a display unit of the data processing terminal or other modes with display/output, so that a user can obtain a feedback result of completing the communication parameter configuration.
In subsequent operations, the user can communicate with the code scanning device according to the configured communication parameters, for example, the data processing terminal establishes communication connection (generally, multiple external devices) with one or multiple external devices at the same time, and at the same time, establishing a scan data processing function corresponding to the communication parameters according to the communication parameters, and when the external equipment has information input, the information source is judged, if the external equipment is the code scanning equipment corresponding to the communication parameters, the information source is bound to accord with the setting of the communication parameters, and triggering a code scanning data processing function, and processing the acquired information of the external device as code scanning data, wherein if the external device is not a code scanning device corresponding to the communication parameters and the information source has at least one index which is not in accordance with the setting of the communication parameters, the code scanning data processing function is not triggered, and data misreading is avoided.
As shown in fig. 2, the data processing terminal includes an instruction input unit 110, a data processing unit 120, a communication unit 130, and a display unit 140, and the data processing unit 120 establishes communication connections with the instruction input unit 110, the communication unit 130, and the display unit 140 in a wired or wireless manner or an integrated manner, respectively.
The instruction input unit 110, which may also be referred to as an input unit, an information input unit, or a data input unit, is configured to obtain an operation instruction and/or information from a user during a human-computer interaction process, and specifically, according to a different existence form of the data processing terminal, the instruction input unit may be a component or a device that can implement information/instruction input, such as a key (including a key on a keyboard and a separate key), a mouse, a touch display screen, a microphone, and the like, light, sound, force, or in other forms; considering that the command input unit 110 and the communication unit 130 both have a function of inputting information to the data processing unit 120 to some extent, and therefore, the two may coincide or intersect with each other in some cases, for example, the command input unit 110 is a mouse and a keyboard of a USB interface, the command input unit 110 is connected to the communication unit 130, and then a communication connection is established between the communication unit 130 and the data processing unit, and for example, a command is issued from a data processing terminal in a remote manner, the communication unit 130 and the command input unit may be the same component.
The display unit 140 is used for outputting information in the interaction between the human-computer interaction/data processing terminal and the code scanning device, and generally, the display unit may be a flat display screen, a touch display screen integrated with the instruction input unit, or other graphic output devices, so that, on one hand, the display unit outputs information or an interface, and a user can conveniently check and take operations (including enabling the user to obtain feedback of configuration completion/unsuccessful configuration in the communication parameter configuration process, and facilitating the user to perform next operation), and on the other hand, the display unit can show graphic codes which can be recognized by the code scanning device.
A communication unit 130 for establishing a communication connection between the data processing terminal and the code scanning device/other external devices, specifically, the communication unit includes at least two or more interfaces or channels (131,132,133) according to the arrangement of the data processing terminal, so as to allow the data processing terminal to establish a communication connection with two or more external devices at the same time, and the communication unit may be a wired communication interface/serial port (e.g. USB, I/O, etc.), a wireless communication module (e.g. Blueteeth, Zigbee, WIFI, LoRa, NB-loT, etc.), or a combination of a wired communication interface and a wireless communication module; as in the exemplary case of fig. 2, the code scanning device 210 (which is intended to be used) establishes a communication link with one interface 131 of the communication unit, and the other external devices 230 establish a communication link with the other channels 133 of the communication unit.
A data processing unit 120 for dataProcessing and control of the data processing terminal, in particular, the data processing unit 120 is configured to have the following functions (typically implemented by an application program): the first identification code S is generated in response to a communication parameter configuration command from the command input unit 1101(graphic code), the communication parameter configuration instruction refers to an instruction for performing an operation of configuring a communication parameter, and it should be noted that the communication parameter configuration instruction may be an instruction for a single purpose (for example, an instruction generated by clicking an "auto configuration" icon on an interface), or may be an instruction combined with another purpose, for example, in one solution, an instruction for opening an application program for processing code scanning information may include a communication parameter configuration instruction.
The data processing unit 120 also has the following functions: acquiring device information of the external device, specifically acquiring device information of all external devices of a specific object range or a non-specific object within the non-specific object range, wherein one mode is that the operation can be triggered by a communication parameter configuration instruction, and the other mode is that the operation can be performed spontaneously based on a certain set rule (for example, periodically performed after an application program is opened); generally, the data processing unit determines an object range to be acquired according to the trigger condition, where the object range is determined by the communication unit 130 (i.e. determined by the data processing terminal) and is independent of the external device, for example, when the communication unit has three connection modes of bluetooth, WIFI, USB and I/O, the data processing unit may acquire information from all external devices based on the trigger condition, or acquire information from all external devices connected in a wireless manner, or acquire information from all external devices connected in a wired manner, or acquire information from all external devices connected in a bluetooth manner, or acquire information from all external devices connected in a USB manner; it should be noted that what you say is the external device that is currently connected, not the external device that was once connected but has been disconnected.
The data processing unit 120 also has the following functions: receiving an event handling function according to the device information registration data of the external device acquired from the communication unit 130, in particularIn one form, the data reception event handling function Fn(xn) In this form, Fn(xn) And its independent variable xnCorresponding to the device information used at the time of registration, since the device information corresponds to the external device, it can be considered that each F corresponds to the external devicen(xn) And its independent variable xnAll correspond to an external device, independent variable xnI.e., the input of the corresponding external device, and a further form, a data reception event handling function, F (x, n), in which one data reception event handling function corresponds to a plurality of data reception events, as follows:
Figure BDA0003452255960000081
in the above formula, X represents the maximum input value allowed by the external device, the integer part of the function value corresponds to the device information to be determined, the X multiple value of the fractional part corresponds to the input value of the external device, and for this function, theoretically, as long as a data receiving event occurs, the function is triggered, and the information value included in the data receiving event and the corresponding external device (and device information) are determined according to the function value, and in other forms, the data receiving event processing function may also be a combination of the above two forms; generally, the data reception event processing function is associated with an application program that processes code scanning information, the data reception event processing function may be registered and stored in a temporary storage area (for example, in a memory of a PC computer), unless specifically set, the previously registered data reception event processing function may be deleted (for releasing a relevant storage space) after the relevant application program is closed (code scanning information processing is completed), and may not affect the current task, and the data reception event processing function under the current task may also be deleted after communication parameter configuration is completed or the application program is closed, and may not affect the subsequent task, in other words, the so-called data reception event processing function generally does not exist as long-term data (may not occupy too much unnecessary space).
The data processing unit 120 also has the following functions: when the communication unit 130 acquires data information input by the external device, the data information is transmitted to the data processing unit 120, the data processing unit 120 processes the data information according to an existing data receiving event coping strategy under the current task, if no data receiving event processing function exists, the function is naturally unnecessary to be triggered, and if the data receiving event processing function exists, the data receiving event processing function is triggered when the communication unit receives data and uploads the data to the data processing unit.
The data processing unit 120 also has the following functions: when the data receiving event processing function is triggered, the data receiving event processing function is processed according to a preset rule, and content data R corresponding to the data received by the communication unit 130 is obtained therefrom, at this time, the content data R needs to be judged: if R is S1Known as S1The information included in the first identification code indicates that the source of the content data R is most likely to be from the first identification code, and in combination with the scheme and the design of the data processing terminal, the code scanning device is used to scan the code in a manner that information can be obtained from the first identification code, so that the source of the content data R can be obtained by scanning the code through the code scanning device, that is, the corresponding external device is the code scanning device, and on the basis of the determination, the device information corresponding to the triggered data reception event processing function (known in combination with the function form, the corresponding device information may be corresponding to the function, or may be a corresponding object calculated from the function value) is retrieved, and all or part of the data in the device information is configured as the communication parameter; if R is not equal to S1In combination with the foregoing determination process, it can be seen that the content data R is not likely to be derived from the code scanning behavior of the code scanning device for the first identification code, and it can be considered that, although the data source of the content data R is not the desired code scanning device, or although the data source of the content data R is the desired code scanning device, the user behavior when generating the content data R does not perform the purpose of configuring the communication parameters (because the first identification code is not scanned), in short, when R ≠ S1When the content data R is not further processed, i.e. the communication parameter configuration is not carried outIn operation, as to whether the content data R has other uses, details are not described herein since they are not related to the technical problems that the solution of the embodiment is intended to solve.
The data processing unit 120 also has the following functions: configuring the communication parameters by using all or part of the equipment information, wherein the general process and mode of the communication parameter configuration comprise storing the communication parameters on the basis of determining the communication parameters from the equipment information; and/or generating display graphic information based on the determined communication parameters and sending the display graphic information to the display unit, so that the display unit shows the communication parameters finally determined by the data processing unit; and/or when the data information uploaded by the external equipment information is acquired, the communication parameters are used for matching the source of the data information, if the matching is successful (the communication parameters and the information source are consistent), the data information is used as code scanning information to be processed, otherwise, the data information is not used as the code scanning information to be processed; and/or, marking out a special area in the storage area, setting a data source matched with the communication parameter to be stored in the special storage area, periodically or extracting the data from the special storage area according to the configuration to process, wherein the data comprises an access mode as long as the data is extracted according to the configuration instruction; and/or, reserving and only reserving a data receiving event processing function corresponding to the communication parameter, deleting other data receiving event processing functions registered before, presetting (if the function value is inconsistent with the input information, adjusting the function form to make the output value/function value equal to the input information value, thereby ensuring that the function only plays a role of analysis and does not change the information content), and when the data receiving event processing function is triggered, processing the function value as code scanning information; and/or other prior art communication parameter configuration and utilization schemes, as well as possible combinations of the foregoing.
The Device information includes a Device Name (Device Name), a Product Type (Product Type), a Product Identification Code (Product Identification Code), a Vendor Identification Code (Vendor Identification Code), a Device Number (Serial Number), a connection Location (Location), etc., and all of the Device information can be used as Device Identification, but only a part of the Device information is needed to satisfy the Identification purpose, so in general, communication parameters only need a part of the Device information, for example, for a general USB Type Code scanning Device, only VID, PID and Location are needed to satisfy the requirement, and other types of information can be used.
From the perspective of implementation, the data processing terminal further includes a power supply unit 150, where the power supply unit 150 may be a self-energy-storage component, such as a battery, a capacitor, or the like, and may also be an electric energy input device, for example, the power supply unit 150 may be a power socket for electrically connecting with an external power supply, and the power supply unit 150 may also be a combination of the foregoing two, for example, the power supply unit 150 may include a power socket electrically connected with an external power supply, and further include a capacitor, a voltage/current conversion circuit, and other components.
The foregoing examples are merely illustrative of possible solutions, and from the viewpoint of solving the technical problems, there may be some alternatives or improvements, including but not limited to, omitting some unnecessary steps (or elements, functions), changing the order (or elements, functions) between some steps, performing adjustments to some steps (or elements, functions), and so on
In addition to or instead of the foregoing exemplary technical solutions, the communication connection between the code scanning device and the data processing terminal is not limited to a USB interface, for example, an I/O port (provided that an upload signal of the code scanning device can be identified by the data processing terminal) or other wired interfaces and wired connection manners may be used, and further, other wireless communication manners such as bluetooth, ZigBee, WIFI and the like may also be used, that is, in the alternative solution, the communication connection is established between the code scanning device and the data processing terminal, and the specific manner of the communication connection is not limited or unique; when the connection mode is not the USB data line connection, the object of acquiring the device information in the subsequent operation cannot be limited to all USB devices connected to the data processing terminal, but should be adjusted according to the connection mode of the code scanning device.
In a specific example, a mode with high universality is that no matter what connection mode is adopted, the data processing terminal is configured to acquire information from all external devices and further acquire device information, and this mode has an advantage that the code scanning device is allowed to be connected in a connection mode allowed by any data processing terminal, and the disadvantage of this mode is that the amount of data to be processed is relatively large; at the extreme, if the data processing terminal has only one data processing unit, and other devices including the display unit and the instruction input unit are all externally connected to the data processing unit, the data processing terminal may be configured to acquire information from all devices except the non-data processing unit, and further acquire device information.
As another specific example, a specific manner is that, according to the connection manner of the code scanning device and the data processing terminal, the data processing terminal is configured to obtain information from all external devices of a specific type, and further obtain device information, for example, when the code scanning device establishes communication connection with the data processing terminal through bluetooth, the data processing terminal may be configured to obtain information from all external devices connected in a wireless manner, and may also be configured to obtain information from all external devices connected in a bluetooth manner; the method has the advantages that the range of the external equipment is reduced as much as possible, the data processing amount is reduced, and the method has the disadvantage that the connection requirement of only partial code scanning equipment can be met.
As another specific example, a hybrid manner is that the data processing terminal shows an object type (not a specific object) for optionally obtaining device information, and when the user clicks "auto configuration" or issues an instruction in another manner, the user can select the object type according to the connection manner of the actual code scanning device, and when the user clearly knows the connection manner, the user can reduce the data processing amount (enter a manner with a clear target) by selecting the object type, and if the user does not know the connection manner or the connection manner has multiple conditions, the user can select all channels, that is, the data processing is performed in the manner with strong universality; the advantage of this method is that the two methods have the advantages, and the disadvantage is that the user needs to perform an additional operation of checking the object range.
In addition or alternatively to the various exemplary technical solutions of the present embodiment, the operation of clicking the "auto-configuration" button on the data processing terminal by the user is not necessary or limited, but is one of the operations in the preferred solution; first, the two subsequent operations of the preparation phase triggered by it (one of the operations and the second of the operations) may be triggered by different instructions or non-instruction ways, for example, one instruction triggers one operation to get device information and complete registration of data reception event handling functions, another instruction triggers two operations to generate a graphic code for identification/verification, further, the triggering instruction does not necessarily need to be manually input by the user, and may be performed according to a preset setting, for example, when the user enters the application for processing the code-scanning information, the application performs one of the operations (e.g., every 3 s) on its own, periodically, and performs the other operation on its own, meanwhile, the interface is kept in a graphic code display state, and the formal interface for checking and processing code scanning information is not entered until communication parameters are acquired and configured, so that the following feasible scheme is extended.
In a specific example, after the user clicks "auto configuration", one of the triggering operations causes the device information to be acquired and the registration of the data receiving event processing function to be completed, and after the one of the triggering operations is completed, the second triggering operation generates a graphic code for identification/verification (which is equivalent to the second triggering operation triggered by the one of the triggering operations), which has an advantage in avoiding that the graphic code can be scanned but cannot acquire the device information after scanning the code (because the corresponding data receiving event processing function is still waiting for registration queue) when the number of data receiving event processing functions to be registered is large or the amount of data to be processed is large.
As another specific example, the data processing terminal periodically detects the external device condition and obtains information (for example, after an application program for processing code scanning information is opened), the initialized (at this time, the code scanning device may not establish a communication connection with the data processing terminal) data processing terminal obtains device information of all external devices, registers a data reception event processing function, then periodically detects the external device condition and obtains information, if no new external device is accessed, the data reception event processing function registration behavior is not performed, if a new external device is accessed, the device information of the new external device is obtained, and the data reception event processing function registration is performed, and the above operations are repeated until the user clicks "auto configuration", and the second trigger operation generates a graphic code for identification/verification; in the above operation, considering that if the external device uploads data frequently, a large data processing amount may be brought about, so when the data reception event processing function is registered as described above, an additional trigger condition may be assigned to the data reception event processing function, for example, the trigger condition value of the data reception event processing function is f (s, d) ═ s · d, where s is {0,1} used for characterizing the generation behavior of the graphic code, and d is {0,1} used for characterizing the occurrence of the data reception event, when both variables s and d are in the occurrence state (corresponding to assignment of 1), the trigger condition value of the data reception event processing function is f (s, d) ═ 1, the data reception event processing function is triggered, and conversely, when any one of the variables s and d is in the non-occurrence state (corresponding to assignment of 0), the trigger condition value of the data reception event processing function is f (s, d) the data reception event handling function is not triggered 0.
As another specific example, the user opens an application program for processing code scanning information, and the data processing terminal detects whether the configuration of the communication parameters has been performed, and generates and displays a graphic code for identification/verification (i.e., the second operation); if the communication parameter configuration is detected, the data processing terminal shows the configured communication parameters to the user and prompts the user to confirm, if the user confirms (namely, the communication parameters are configured completely), the subsequent configuration operation of the communication parameters is terminated and the user directly jumps to a code scanning information processing interface, and if the user denies (namely, the configured communication parameters have problems), one of the operations is triggered to acquire equipment information and complete the registration of a data receiving event processing function; if the communication parameter configuration is detected not to be carried out, one of the operations is directly triggered to obtain the equipment information and complete the registration of the data receiving event processing function.
Further, as can be seen from the foregoing specific examples, the main operations of the preparation phase, including the establishment of the communication connection between the code scanning device and the data processing terminal, and the sequence between one of the operations and the two of the operations, are not strictly limited, but may be changed in a sequential manner, for example, the operation of generating the graphic code for identification/verification may occur before, during or after the establishment of the communication connection between the code scanning device and the data processing terminal.
As another improvement or alternative to the technical solution of this embodiment, the process of acquiring the device information in one of the preparation stage operations may be implemented by using other prior art manners instead of being limited to the manner in the foregoing example of this embodiment, for example, if the operating system has a device management program, when the device information is needed, the application program for processing the code scanning information may directly retrieve the device information from the device management program.
In another improvement or substitution of the technical solution of this embodiment, in the second operation of the preparation stage, the character string S is generated1And generating a graphic code P1The process of (1) can also be improved, in particular, the string S1May be completely random, may also be semi-random or pseudo-random, may also be based on preset specific variation, may also be completely specific invariant, and in some cases, generates the character string S1And generating a graphic code P1It may also be a process rather than a division or a sequence; the aforementioned semi-random or pseudo-random includes a string S1Is a uniformly distributed random number sequence calculated by a deterministic algorithm, and also includes the situation that a group of character strings are given in advance and then randomly selected from the group of character strings; the aforementioned situations based on presetting specific changes include a case where a group of character strings of a change sequence is given in advance and then sequentially selected from the shuffled character strings; the aforementioned completely specific invariants include a character string S1And a graphic code P1The corresponding value of (a) is a predetermined determination value;
in a further development, the character string S1Is not specifically constant but is varied according to a certain rule (including the aforementioned completely random, semi-random or pseudo-random, based on preset specific variation), from the viewpoint of user, the character string S1Is randomly generated (elsewhere in the specification, unless explicitly defined otherwise, so-called random generation is to be understood in terms of random generation from the user's perspective herein, i.e., without explicit limitation, said random is to be understood broadly, including completely random, semi-random, pseudo-random, based on preset specific variations, etc.); further improved, string S1And a graphic code P1The value range of (A) is separated from the expected possible value range of other external devices connected to the data processing terminal as much as possible, for example, the data processing terminal is a PC computer, the external keyboard of which may have a certain input range, character string S1And a graphic code P1Should be distinguished from the external keyboard as much as possible, thereby avoiding the occurrence of other external devices under the condition of 'accidental' and the character string S1Or graphic code P1Is "exactly" the same.
Considering that under some working conditions, the communication parameter configuration instruction (for example, clicking an "automatic configuration" button) is related to the collection of external device information and the generation of a graphic code, if the communication parameter configuration instruction is not correctly issued or executed, subsequent operations may not be executed, and for this reason, if a user does not obtain feedback of completion of communication parameter configuration after the operations such as code scanning and the like are executed as described in the foregoing scheme of this embodiment, it is likely that doubts may be generated as to whether the communication parameter configuration instruction is correctly issued or executed, and therefore, there is an incentive to repeatedly or even continuously click the "automatic configuration" button or repeatedly issue the communication parameter configuration instruction in other manners; in contrast, the data processing terminal may have a large amount of data to be processed and/or a communication delay inside the data processing terminal (e.g., a portion of the data processing terminal may not be configured)Locally), this results in the possibility that the code scanning device has already recognized and the graphic code P1However, due to the communication delay or the large data processing capacity, the data receiving event processing function of the data processing terminal is not triggered in time, or the data processing terminal fails to complete the communication parameter configuration in time, or the data processing terminal completes the communication parameter configuration but fails to feed back to the user in time, and the effect finally reflected on the data processing terminal is that the processing feedback is delayed, the user performs the code scanning operation, but the communication parameter configuration is not completed quickly, on the basis, if the user continuously clicks the "auto configuration" button or repeatedly issues the communication parameter configuration instruction in other ways, the processing logic of the data processing terminal may be disordered, and in order to solve the problem, the character string S is randomly generated in the foregoing manner1And/or graphic code P1The following scheme can be provided for further improvement on the basis of the following steps:
further improved, in the process of communication parameter configuration at a time, the character string and/or the graphic code are kept unchanged, for example, in an initialization state, in the process of communication parameter configuration at a time, when the character string and/or the graphic code is generated (this generation process may be random, or may be according to a fixed value, but has no influence on the whole scheme), the content of the character string and/or the graphic code is saved until the communication parameter configuration is completed at this time (if the communication parameter configuration depends on a specific application program, the application program is closed, which may also be regarded as a situation that the communication parameter configuration is completed), the character string and/or the graphic code always keeps the determined value of a certain generation unchanged;
specifically, when a user clicks an "automatic configuration" button, an "automatic configuration" instruction triggers one of the operations to acquire device information and complete registration of a data receiving event processing function, and also triggers the other operation to generate a graphic code for identification/verification, in the process of generating the graphic code for identification/verification, the data processing terminal verifies, checks whether the content of an "unused" character string and/or graphic code is stored, and if not, executes an initialization operation to generate the graphic code, namely, the graphic code is completely generated by a preset production program without being influenced by the previous operation (at this time, the generation of the graphic code may be random/pseudo-random), and stores the content of the character string and/or the graphic code, and simultaneously marks the content of the character string and/or the graphic code as an "unused" state; subsequently, if the user finishes the code scanning operation by using the code scanning equipment and finally configures the communication parameters, deleting the stored character string and/or graphic code content, or marking the stored character string and/or graphic code content in a used state, and at the moment, repeating the process when the user clicks the automatic configuration button again; subsequently, if the user clicks the automatic configuration button again before the communication parameters are configured, the data processing terminal checks to check whether the unused character string and/or graphic code content is stored, and at the moment, the previously stored unused character string and/or graphic code content is detected, the graphic code is not generated according to the initialization operation, but is generated based on the unused character string and/or graphic code content;
the scheme has the advantages that no matter whether a user continuously clicks the 'automatic configuration' button or repeatedly issues a communication parameter configuration instruction in other modes, as long as the code scanning device correctly identifies the graphic code, even if delay or processing queuing exists, finally, as the character string and/or the graphic code always keeps unchanged, the content of the graphic code is not substantially changed when the graphic code generating process is repeatedly carried out, therefore, the information uploaded by the code scanning device can be still correctly identified and processed, and the condition that the code scanning is correct but the graphic code is changed can not occur.
In consideration of some working conditions, a user may need to connect multiple (two or more) code scanning devices to the data processing terminal at the same time, and accordingly, the data processing terminal needs to configure multiple sets of communication parameters at the same time, which may cause a problem in logical judgment for the data processing terminal (for example, whether the next communication parameter configuration needs to cover the original communication parameters), and in order to solve the problem, the character string S is randomly generated1And/or graphic code P1On the basis of the scheme, the following scheme can be adopted:
as dataA processing terminal configures a multi-parameter configuration mode, wherein in the multi-parameter configuration mode, whether code scanning equipment information is acquired or not is not needed, parameter configuration is carried out to obtain a flow end mark, a user instruction is used as the flow end mark, the single parameter configuration process is considered from the beginning of parameter configuration to the time when a completion instruction is received, and in the process, character strings and graphic codes are kept unchanged; the scheme has the advantages that for example, three code scanning devices are connected simultaneously, a user only needs to sequentially scan the graphic codes by using the three code scanning devices, the configuration result of the communication parameters corresponding to a certain code scanning device does not need to be waited in the process, and the data processing terminal can sequentially read the contents and perform R & ltR & gt processing according to the triggering sequence of the data receiving event processing functionn(content resolution value of data reception event) and S1Comparing (random value contained in graphic code) and determining equipment information and communication parameter configuration;
further improved, considering that in some cases, code scanning devices may be connected in a wireless manner to cause a large delay (a trigger sequence of a data receiving event processing function may not be consistent with an actual code scanning sequence), in other cases, if one code scanning device has a fault or fails to correctly scan code identification, a final parameter configuration condition may not meet an actual requirement of a user (the delay may cause a sequence disorder and the fault may cause a lack of an object), in order to solve the problem, a multi-parameter configuration mode is configured for a data processing terminal, in the multi-parameter configuration mode, whether code scanning device information is obtained and a parameter configuration is configured as a flow end flag, but a user instruction is used as the flow end flag, specifically, after an automatic parameter configuration operation is started, a code scanning device is used for code scanning operation first, the data processing terminal is configured to perform content reading, R, in sequence after the data reception event processing function is triggeredn(content resolution value of data reception event) and S1(random value contained in graphic code) comparing and determining equipment information and communication parameter configuration, before finishing single group communication parameter configuration (also can be regarded as finishing one-time communication parameter configuration), retaining character string S1And a graphic code P1After finishing configuring single group of communication parameters, new random character string S is produced immediately2And a graphic code P2The character string S2And the previous character string S1Of different values, graphic code P1And a graphic code P2The contained information values are different, on one hand, based on the change of the graphic code, the user can know that one-time communication parameter configuration is completed, so that the second code scanning device is used for code scanning operation, on the other hand, based on the change of the graphic code, the user can know that the first code scanning device is normally configured, in the process, if a code scanning device cannot be triggered and completes the configuration of communication parameters late, it can be predicted that the code scanning device may have a fault or is not successfully connected with the data processing terminal, another advantage of the improvement is that, since the string/graphic code is directly mapped to the parameter configuration of the code scanning device, the situation of the post-device pre-scan code or the pre-device post-scan code is avoided, as described in the previous example, before the first code scanning device fails to complete the communication parameter configuration, the second graphic code P is not generated.2After the first code scanning device completes the communication parameter configuration, the first graphic code P can not be generated1And (6) displaying.
This example shows another method for identifying and configuring communication parameters of a code scanning device on a data processing terminal, and specifically, as shown in fig. 3, the method includes a preparation phase, a code scanning phase, and a parameter configuration phase.
A preparation phase, as shown in figure 3, for establishing a connection between the data processing terminal and the code scanning device, and for generating a graphic code P recognizable by the code scanning device, similar to the previous example1Unlike the previous example, in this example, the device information of the external device is not acquired in the preparation stage; specifically, in this example, a communication connection is established between the data processing terminal and the code scanning device, the code scanning device is provided with a driver and actively installs the driver on the data processing terminal after establishing a connection with the data processing terminal, and after the installation is completed, data information identified by the code scanning device can be indiscriminately transmitted to the data processing terminal and analyzed by the data processing terminal; user' sWhen the code scanning equipment is required to acquire data information and utilize the data information (for example, the code scanning equipment is used for reading label information of each temperature instrument), a related application program is opened, after the application program is started, whether communication parameter configuration is performed or not is firstly detected, whether the configured communication parameters have corresponding equipment with established connection or not is detected, and if the configured communication parameters do not have corresponding equipment with established connection, a random character string S is generated and stored1Then according to the character string S1Generating a graphic code P1And the graphic code P is displayed by equipment or devices such as a display screen1Showing that the state which can be identified by the code scanning equipment is reached, if the configured communication parameters are detected to exist and data channels are established between the equipment corresponding to the communication parameters and the data processing terminal, defaulting the state, at the moment, a user can click a 'communication parameter configuration' button in an application program to start the configuration of the communication parameters, and if the state is so, a random character string S is generated and stored1Then according to the character string S1Generating a graphic code P1And is shown.
After the preparation phase is completed, a code scanning phase may be entered, as shown in fig. 2, for the graphic code P using the code scanning apparatus1Recognizing, judging the input data after the data of the external equipment is input to the data processing terminal, and judging the input data if the analysis value R of the input data is equal to S1(character string S1Namely the graphic code P1Content information) of the input data, determining a data source of the input data, entering a subsequent configuration parameter stage, and if an analytic value R of the input data is not equal to S1If yes, the code scanning stage is still remained;
specifically, in the operation executed by the application program, all external input data acquired by the data processing terminal are compared one by one (in time order), and if the external input data is input by other external devices, for example, the external device is not a code scanning device (action object is not right), or the code scanning device does not scan the graphic code (action form is not right), the external device at this time cannot acquire the graphic code P1Based on the information content of (a), data and character string S inputted from an external device1If the nature is different, the next piece of data is continuously processed; graphic code P using code scanning equipment1Carrying out code scanning identification, and obtaining analysis information R after the code scanning equipment identifies and decodes, wherein R is the graphic code P1The information content contained in the code scanning device is transmitted to the data processing terminal, and the data processing terminal compares the data input by the external device one by one according to the operation, and when the analysis information R of the code scanning device is analyzed, the R is obtained as S1As a result of the determination, the data processing terminal can determine the data source of the analysis information R (at least the data channel for transmitting the analysis information R can be known).
Configuring parameters by using the analytic value R ═ S of input data1The judgment result is triggered, after a data source of input data is determined, equipment information corresponding to the data source is obtained, all or part of the equipment information is used as communication parameters for configuration, meanwhile, a result of completing the configuration of the communication parameters is fed back to a user, and the user can communicate with the code scanning equipment according to the configured communication parameters;
specifically, in this example, the data processing terminal sends a device information reading instruction to the data channel opposite direction, since the data channel opposite direction is just a code scanning device, after the code scanning device obtains the device information reading instruction, the data processing terminal sends related device information to the data processing terminal, the data processing terminal obtains the related device information, then configures all or part of the device information as communication parameters, and simultaneously, takes a data source corresponding to the communication parameters as an independent variable source, registers a code scanning event processing function, outputs (for example, function values) of the code scanning event processing function correspond to a code scanning data input source of an application program, and simultaneously displays the configured communication parameters on a display screen, so that a user knows that the operation of configuring the communication parameters is completed.
In order to implement the foregoing examples, the data processing terminal should also be modified/changed, and specifically, the data processing terminal may adopt the same connection architecture as that of the foregoing examples, and the instruction input unit 110, the communication unit 130, the display unit 140, the power supply unit 150, and the like, as shown in fig. 2 and the foregoing examples, which are not described herein again; the data processing unit 120 in the data processing terminal is different from the foregoing examples, and the data processing unit is configured to have the following functions:
in response to an instruction from instruction unit 110, a random string S is generated1Saving the character string S1And generates a graphic code P based thereon1Graphic code P1For display in the display unit 140, a graphic code P1The content information is the character string S1
In response to an instruction originating from instruction unit 110 (which may be used to generate a random string S)1The same or different) to process all the data to be processed from the external device inputted to the data processing unit 120, the process includes calling the data to be processed one by one according to the time sequence, comparing the data to be processed R with the stored character string S1If R ≠ S1If the data source corresponding to the data to be processed is not the expected code scanning device, the next data to be processed is called, and the process is repeated until R is equal to S1Then, the data source corresponding to the data to be processed is the expected code scanning device;
by R ═ S1Triggering, determining a data source (Location) of the data to be processed, searching from a storage area (which may or may not be a designated path) of the data processing unit 120 according to the data source, determining whether the device information of the external device corresponding to the data source is stored, if the device information is stored, retrieving and storing the device information, if the device information is not stored, sending an instruction for reading the device information to the communication unit 130 (in this embodiment, the interface 131), and retrieving and storing the device information after the communication unit 130 feeds back the device information (feeds back from the external device, that is, the code scanning device);
triggering after the device information is called, calling a specific part (or all the device information) from the device information according to a preset rule, storing and marking the specific part as a communication parameter, completing the configuration of the communication parameter, sending display information containing the communication parameter to the display unit 140, enabling the display unit to display the communication parameter information, and deleting the stored character string S1
And when the scanning code data needs to be read by the subsequent application program, reading the scanning code data according to the communication parameters.
The specific embodiment respectively provides two groups of communication parameter configuration methods and data processing terminals, wherein the two groups of schemes are different in that firstly, the equipment information of code scanning equipment acquires time nodes, the former group of schemes is located in a preparation stage before code scanning action, the latter group of schemes is located in a parameter configuration stage after code scanning action, and the second group of schemes acquires an object of the equipment information, the former group of schemes acquires the equipment information of an unspecified object in a certain range, and the latter group of schemes acquires the equipment information of an appointed object after the object is determined; therefore, the former group of solutions, because the device information is acquired in the preparation stage, and based on the acquisition of the device information, a special data receiving inter-processing function can be established, so as to narrow the event trigger object to a smaller range, the data processing amount is relatively low in the subsequent code scanning or other actions (only the relevant data of the trigger function needs to be processed), the latter group of solutions, the operation in the preparation stage is less, and simultaneously, the device information is acquired based on the determined object, on one hand, unnecessary device information in the process of acquisition is unnecessary from the security authority, for some data processing terminals in specific fields, unnecessary authority of the application program is smaller, on the other hand, since the device information is acquired after the object is determined, even if the code scanning device knows the data processing terminal after the preparation stage, the accurate identification of the code scanning device is not influenced, and the reliability/working condition adaptability of the scheme is relatively higher (for example, a user connects the code scanning device to a data processing terminal after clicking automatic configuration).
The two sets of schemes are identical in that, one of them, both are the graphic code P1And code scanning equipment to graphic code P1The identification operation of the code scanning device is used as a key for determining the code scanning device, and the identification operation of the code scanning device and the code scanning device are configured by using all or part of device information of the code scanning device as communication parameters; therefore, neither of the two schemes requires the user or the data processing terminal to know the device information of the code scanning device in advance (to know the code scanning device)The code scanning device comprises a code scanning device which is contained in a certain range but is unclear to the bottom), from the operation angle, a user only needs to issue a configuration instruction and then performs code scanning operation (the two operations are very simple and easy to operate for the user), namely, the data processing terminal can determine and identify the code scanning device through the configuration operation between the data processing terminal and the code scanning device, and therefore, the scheme has better user experience.
It should be noted that improvements, alternatives, limitations, and the like in each set of examples may be substituted in other examples where feasible (including minor changes to some of the details of the schemes), and are not repeated here.

Claims (14)

1. A method for configuring communication parameters is characterized in that,
comprises the steps of (a) preparing a mixture of a plurality of raw materials,
establishing communication connection between the data processing terminal and the code scanning equipment;
acquiring equipment information of external equipment connected to the data processing terminal, wherein the external equipment comprises the code scanning equipment;
generating a graphic code which can be identified by the code scanning device at the data processing terminal;
the code scanning equipment identifies the graphic code, and the identification result of the code scanning equipment on the graphic code can be acquired by the data processing terminal;
the data processing terminal acquires data information from external equipment, compares the data information with the content information of the graphic code, determines the source of the data information as the code scanning equipment if the data information is consistent with the content information of the graphic code, and calls equipment information corresponding to the data information as communication parameters for configuration.
2. The communication parameter configuration method according to claim 1, wherein the acquiring device information of the external device connected to the data processing terminal includes acquiring device information of an external device that is not a specific object.
3. The communication parameter configuration method according to claim 2, wherein the data processing terminal includes a plurality of communication interfaces, the code scanning device is connected to one of the plurality of communication interfaces, and the acquiring of the device information of the external device connected to the data processing terminal includes acquiring the device information of all the external devices connected to the communication interfaces.
4. The communication parameter configuration method according to any one of claims 1 to 3, wherein after acquiring device information of an external device, a data reception event handling function is registered according to the device information, and the data reception event handling function is triggered when a data reception event occurs in the corresponding external device; and the code scanning equipment identifies the graphic code and triggers a corresponding data receiving event processing function.
5. The communication parameter configuration method according to claim 4, wherein after the data reception event processing function is triggered, comparing a function analysis value with the graphic code content information, and if the function analysis value is consistent with the graphic code content information, determining that the external device corresponding to the data reception event processing function is the code scanning device.
6. The communication parameter configuration method according to claim 1 or 2, wherein the graphic code is randomly generated.
7. The communication parameter configuration method according to claim 6, wherein the graphic code remains unchanged until the communication parameter configuration is completed.
8. A method for configuring communication parameters is characterized in that,
comprises the steps of (a) preparing a mixture of a plurality of raw materials,
establishing communication connection between the data processing terminal and the code scanning equipment;
generating a graphic code which can be identified by code scanning equipment at a data processing terminal;
the code scanning equipment identifies the graphic code, and the identification result of the code scanning equipment on the graphic code can be acquired by the data processing terminal;
and the data processing terminal acquires data information from external equipment, compares the data information with the content information of the graphic code, determines that the source of the data information is the code scanning equipment if the data information is consistent with the content information of the graphic code, acquires equipment information corresponding to the data information, and configures all or part of the equipment information as communication parameters.
9. The communication parameter configuration method according to claim 8, wherein the graphic code is randomly generated, and the graphic code remains unchanged before the communication parameter configuration is completed.
10. A data processing terminal capable of configuring communication parameters comprises an input unit, a data processing unit, a communication unit and a display unit, and is characterized in that,
the input unit is used for inputting instructions and/or information;
the communication unit is used for establishing communication connection with external equipment, and the external equipment comprises code scanning equipment;
the display unit is used for displaying the graphic code;
the data processing unit is used for processing information and is configured to generate graphic code data for display by the display unit, process data information transmitted by external equipment, compare the data information with content information of the graphic code, determine that the source of the data information is the code scanning equipment if the data information is consistent with the content information of the graphic code, acquire equipment information of the code scanning equipment and configure all or part of the data as communication parameters.
11. The data processing terminal of claim 10, wherein the generating of the graphic code data for display by the display unit comprises generating a random string, and generating the graphic code data based on the random string.
12. The data processing terminal of claim 11, wherein the random string remains unchanged until the communication parameter configuration is completed.
13. The data processing terminal of claim 10, wherein the data processing terminal comprises a plurality of communication interfaces, the code scanning device is connected to one of the plurality of communication interfaces, and the acquiring of the device information of the code scanning device comprises acquiring the device information of all external devices connected to the communication interfaces.
14. The data processing terminal according to claim 10, wherein device information of the external device is acquired, a data reception event handling function is registered according to the device information, and the data reception event handling function is triggered when a data reception event occurs in the corresponding external device; and the code scanning equipment identifies the graphic code and triggers a corresponding data receiving event processing function.
CN202111668431.1A 2021-12-31 2021-12-31 Communication parameter configuration method and data processing terminal Active CN114385262B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111668431.1A CN114385262B (en) 2021-12-31 2021-12-31 Communication parameter configuration method and data processing terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111668431.1A CN114385262B (en) 2021-12-31 2021-12-31 Communication parameter configuration method and data processing terminal

Publications (2)

Publication Number Publication Date
CN114385262A true CN114385262A (en) 2022-04-22
CN114385262B CN114385262B (en) 2024-05-17

Family

ID=81200337

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111668431.1A Active CN114385262B (en) 2021-12-31 2021-12-31 Communication parameter configuration method and data processing terminal

Country Status (1)

Country Link
CN (1) CN114385262B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105719457A (en) * 2016-02-01 2016-06-29 深圳市智水小荷技术有限公司 Intelligent water meter communication method based on Internet of Things
CN106372685A (en) * 2016-08-29 2017-02-01 李玮 Code scanning method and code scanning device
CN109996001A (en) * 2019-03-16 2019-07-09 平安城市建设科技(深圳)有限公司 Camera call method, terminal, device and computer readable storage medium
CN111479263A (en) * 2020-03-19 2020-07-31 深圳传音控股股份有限公司 Communication connection method, terminal and computer storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105719457A (en) * 2016-02-01 2016-06-29 深圳市智水小荷技术有限公司 Intelligent water meter communication method based on Internet of Things
CN106372685A (en) * 2016-08-29 2017-02-01 李玮 Code scanning method and code scanning device
CN109996001A (en) * 2019-03-16 2019-07-09 平安城市建设科技(深圳)有限公司 Camera call method, terminal, device and computer readable storage medium
CN111479263A (en) * 2020-03-19 2020-07-31 深圳传音控股股份有限公司 Communication connection method, terminal and computer storage medium

Also Published As

Publication number Publication date
CN114385262B (en) 2024-05-17

Similar Documents

Publication Publication Date Title
US7224903B2 (en) Universal remote control unit with automatic appliance identification and programming
US8400530B2 (en) Communication device, communication system, image presentation method, and program
CN109982123B (en) Matching method and device
CN101515404B (en) Controller, control system, and control method
CN111858472A (en) File format conversion method and device, computer equipment and storage medium
CN109947482A (en) A kind of loading method of USB device, storage medium and smart television
CN112567695B (en) Electronic device, server and control method thereof
CN110597523A (en) Board card firmware burning method, device and system, board card and terminal equipment
US9071706B2 (en) Image reading device and image reading-transmitting method
US8434145B2 (en) Information processing system, input apparatus, and information processing method
CN104703741B (en) Welding source management system and management method therefor
JP2009025997A (en) Information retrieval display device
CN110473050A (en) Order based reminding method, device, computer equipment and storage medium
CN114385262A (en) Communication parameter configuration method and data processing terminal
CN111614946A (en) Projector and projector firmware updating method
CN107463825B (en) Fingerprint login device and fingerprint login method
CN107229490B (en) Multi-application smart card transaction method and multi-application smart card
CN110765431A (en) Multi-user fingerprint or password login method and management system thereof
CN104754195A (en) Electronic Apparatus And Method For Controlling The Same
WO2022009802A1 (en) Operating system, processing system, operating method, program, and storage medium
JP7411960B2 (en) Control device, control system, control method, and program
CN111159720B (en) System for testing answering protection monotonic counter RPMC
JPH11353281A (en) Data transfer system and method and data transfer terminal
CN105005734A (en) Image based screen unlocking method and user terminal
CN112164157A (en) Real-time supervision method and system for equipment with lock based on Internet of things

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
GR01 Patent grant
GR01 Patent grant