Code scanning method, device and terminal, computer storage medium and electronic device
By generating unique identification information and displaying it in the form of a unique code, the code scanning terminal can obtain the result information by scanning the unique code and the barcode to be scanned, which solves the problem of complex and high cost integration of the code scanning function under the browser and server architecture, and achieves a simple , low-cost integration and decoupling of code scanning functions.
Patent Information
- Application Number
- CN202111587416.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-23
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2041-12-23
AI Technical Summary
In the existing technology, the integration of code scanning functions under the browser and server architecture is complicated, requiring the purchase of hardware equipment such as code scanning guns and paying maintenance fees. When the hardware equipment is not used, image collection needs to be carried out through image acquisition equipment, which increases the cost of code scanning. .
By generating unique identification information and displaying it on the browser in the form of a unique code, the scanning terminal obtains the unique identification information and scanning result information by scanning the unique code and the barcode to be scanned, and passes the result information to the browser. , realize the integration and decoupling of code scanning functions and reduce dependence on hardware devices.
It simplifies the integration of QR code scanning functions, reduces the cost of maintaining and purchasing hardware equipment, improves QR code scanning efficiency, and enables any terminal device with QR code scanning functions to be used to enter the QR code scanning results.
Smart Images

Figure CN114282560B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of Internet technology, and more specifically, to a code scanning method, a code scanning device, a code scanning terminal, a computer storage medium, and an electronic device. Background Art
[0002] With the development of Internet technology and the popularization of smart terminals, the application of barcodes has become more and more extensive. Industries such as logistics, communications, snacks, medical care, warehousing, and manufacturing have begun to use barcodes for traceability and management to improve production and work efficiency. A barcode is a graphic identifier that arranges multiple black bars and blanks of varying widths according to certain coding rules to express a set of information. A barcode can identify the manufacturer, name, production date, category, and many other information of an item. Therefore, scanning a barcode quickly and accurately to obtain the scan result will bring more convenience to production and life.
[0003] In the related technology, in the browser and server architecture (B / S architecture), in order to meet the scanning needs of browser-side applications, it is necessary to purchase hardware equipment such as barcode scanners, and to continuously pay maintenance / maintenance / update fees. It is also necessary to carry out complex and targeted underlying / backend development to combine the barcode scanner and the host system, resulting in each system having to be developed separately for adaptation, that is, the integration complexity of the barcode scanning function is high; if hardware equipment such as barcode scanners is not used, it is necessary to call the image acquisition device (such as a camera) through the browser side to capture pictures, and transmit them back to the server side for barcode recognition, thereby increasing the purchase cost of the image acquisition device.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The purpose of the present disclosure is to provide a code scanning method, device and terminal, computer storage medium and electronic device, thereby at least to a certain extent overcoming the problems of high complexity of code scanning function integration and high code scanning cost caused by the limitations and defects of related technologies.
[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0007] According to one aspect of the present disclosure, a code scanning method is provided, including: generating unique identification information of a current code scanning request, and providing the unique identification information to a browser side, so as to display the unique identification information in the form of a unique code, wherein the unique identification information corresponds to a target fill-in box on the browser side; if the unique identification information and the code scanning result information generated by scanning a barcode to be scanned are received at the same time, the code scanning result information is provided to the browser side to fill in the target fill-in box, and the received unique identification information is obtained by scanning the unique code.
[0008] In an exemplary embodiment of the present disclosure, if the unique identification information and the scanning result information generated by scanning the barcode to be scanned are received at the same time, before providing the scanning result information to the browser to fill in the target fill box, the method also includes: receiving a scanning result polling request carrying the unique identification information sent by the browser; and querying whether there is scanning result information that matches the unique identification information.
[0009] In an exemplary embodiment of the present disclosure, the method further includes: receiving a code scanning request sent by the same browser, generating unique identification information corresponding to the code scanning request and using the unique identification information corresponding to the current code scanning request to update the unique identification information.
[0010] In an exemplary embodiment of the present disclosure, the unique identification information corresponding to the current scanning request includes preset marking information, which is used to distinguish that the scanning target of the current scanning request is to enter the scanning result information of the barcode to be scanned into the target filling box.
[0011] According to one aspect of the present disclosure, a code scanning method is provided, including: scanning a unique code corresponding to a current code scanning request on a browser side, obtaining unique identification information corresponding to the unique code, wherein the unique identification information corresponds to a target fill-in box on the browser side; scanning a barcode to be scanned to generate corresponding code scanning result information, and sending the code scanning result information and the unique identification information to a server, so as to provide the code scanning result information to the browser side based on the unique identification information to fill in the target fill-in box.
[0012] In an exemplary embodiment of the present disclosure, before the scanning of the barcode to be scanned generates corresponding scanning result information, and the scanning result information and the unique identification information are sent to the server, so as to provide the scanning result information to the browser based on the unique identification information to fill in the target fill-in box, the method also includes: determining whether there is preset marking information in the unique identification information for distinguishing the scanning target of the current scanning request as entering the scanning result information of the barcode to be scanned into the target fill-in box.
[0013] In an exemplary embodiment of the present disclosure, the unique code corresponding to the current scanning request is updated after a preset time, and the method also includes: scanning the updated unique code to obtain the unique identification information corresponding to the updated unique code; scanning the barcode to be scanned to generate corresponding scanning result information, and sending the scanning result information and the unique identification information to the server, so as to provide the scanning result information to the browser based on the unique identification information and fill it into the target fill-in box, including: sending the scanning result information and the unique identification information corresponding to the updated unique code to the server, so as to provide the scanning result information to the browser based on the unique identification information corresponding to the updated unique code and fill it into the target fill-in box.
[0014] According to one aspect of the present disclosure, a code scanning method is provided, including: obtaining unique identification information of a current code scanning request, generating and displaying a unique code corresponding to the unique identification information, wherein the unique identification information corresponds to a target fill-in box on the browser side; sending a code scanning result polling request carrying the unique identification information to a server, and if code scanning result information matching the unique identification information is received, filling the target fill-in box with the code scanning result information, wherein the code scanning result information matching the unique identification information is obtained by scanning the unique code and scanning a barcode to be scanned.
[0015] In an exemplary embodiment of the present disclosure, the method also includes: if no response result of the scan result polling request is received within a preset time, stopping sending the scan result polling request; in response to a re-request operation, resending the scan request to the server to obtain the unique identification information corresponding to the scan request, and generating and displaying a unique code corresponding to the unique identification information corresponding to the scan request.
[0016] In an exemplary embodiment of the present disclosure, the unique identification information corresponding to the current scanning request and the unique identification information corresponding to the scanning request include preset marking information, which is used to distinguish the scanning target of the current scanning request and the scanning request, and the scanning result information of the barcode to be scanned is entered into the target fill box.
[0017] According to one aspect of the present disclosure, a scanning device is provided, including: an information providing module, used to generate unique identification information of the current scanning request, and provide the unique identification information to a browser side, so as to display the unique identification information in the form of a unique code, and the unique identification information corresponds to a target fill-in box on the browser side; a first scanning processing module, used to provide the scanning result information to the browser side to fill in the target fill-in box if the unique identification information and the scanning result information generated by scanning a barcode to be scanned are received at the same time, and the received unique identification information is obtained by scanning the unique code.
[0018] According to one aspect of the present disclosure, there is provided a code scanning terminal, comprising:
[0019] The first scanning module is used to scan the unique code corresponding to the current scanning request of the browser side, and obtain the unique identification information corresponding to the unique code, and the unique identification information corresponds to the target filling box of the browser side; the second scanning module is used to scan the barcode to be scanned to generate corresponding scanning result information, and send the scanning result information and the unique identification information to the server side, so as to fill the scanning result information into the target filling box based on the unique identification information.
[0020] According to one aspect of the present disclosure, a scanning device is provided, including: an information processing module, used to obtain unique identification information of a current scanning request, generate and display a unique code corresponding to the unique identification information, and the unique identification information corresponds to a target fill-in box on the browser side; a second scanning processing module, used to send a scanning result polling request carrying the unique identification information to a server side, and if scanning result information matching the unique identification information is received, the scanning result information is filled into the target fill-in box, and the scanning result information matching the unique identification information is obtained based on scanning the unique code and scanning a barcode to be scanned.
[0021] According to one aspect of the present disclosure, a computer storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, any one of the above-mentioned code scanning methods is implemented.
[0022] According to one aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned code scanning methods by executing the executable instructions.
[0023] The scanning method in the exemplary embodiment of the present disclosure generates unique identification information of the current scanning request after receiving the current scanning request, and provides the unique identification information to the browser side, and the browser side displays the unique identification information in the form of a unique code; if the unique identification information and the scanning result information of the barcode to be scanned are received at the same time, the scanning result information is provided to the browser side and filled in the target fill box, wherein the received unique identification information is obtained by scanning the unique code. On the one hand, the barcode scanning terminal can obtain unique identification information and scanning result information by scanning twice, namely scanning the unique code and scanning the barcode to be scanned, respectively, so as to directly pass the scanning result information to the target filling box on the browser side based on the obtained unique identification information. Only a very small amount of front-end modification of the original system is required to integrate the barcode scanning function into the system. The integration of the barcode scanning function is simple and the maintenance cost is reduced. On the other hand, the barcode scanning function is decoupled from the integrated system, and no additional hardware equipment such as barcode scanning guns and image acquisition equipment are required for support, no later maintenance is required, and the scanning cost is also reduced. On the other hand, through the barcode scanning method disclosed in the present invention, any terminal device with a barcode scanning function can be used as a barcode scanning terminal, and the scanning result information can be entered by scanning the barcode, which is universal.
[0024] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, in which:
[0026] Figure 1 A flowchart of a code scanning method according to an exemplary embodiment of the present disclosure is shown;
[0027] Figure 2 A schematic diagram showing an initial page of a browser terminal according to an exemplary embodiment of the present disclosure is shown;
[0028] Figure 3 A system deployment structure diagram according to an exemplary embodiment of the present disclosure is shown;
[0029] Figure 4 A schematic diagram showing filling a target filling box with scan result information according to an exemplary embodiment of the present disclosure is shown;
[0030] Figure 5 A flowchart of a code scanning method according to an exemplary embodiment of the present disclosure is shown;
[0031] Figure 6 A schematic diagram of the structure of a code scanning terminal interface according to an exemplary embodiment of the present disclosure is shown;
[0032] Figure 7 A schematic diagram showing a method of scanning a unique code using a code scanning terminal according to an exemplary embodiment of the present disclosure is shown;
[0033] Figure 8 A schematic diagram showing a barcode to be scanned using a barcode scanning terminal according to an exemplary embodiment of the present disclosure is shown;
[0034] Fig. 9 A flowchart of a code scanning method according to an exemplary embodiment of the present disclosure is shown;
[0035] Fig.10 An interactive flow chart of a code scanning method according to an exemplary embodiment of the present disclosure is shown;
[0036] Fig.11 A schematic structural diagram of a code scanning device according to an exemplary embodiment of the present disclosure is shown;
[0037] Fig.12 A schematic diagram of the structure of a code scanning terminal according to an exemplary embodiment of the present disclosure is shown;
[0038] Fig.13 A schematic structural diagram of a code scanning device according to an exemplary embodiment of the present disclosure is shown;
[0039] Fig.14 A schematic diagram showing a storage medium according to an exemplary embodiment of the present disclosure; and
[0040] Fig.15 A block diagram of an electronic device according to an exemplary embodiment of the present disclosure is shown.
[0041] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION
[0042] The exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the present disclosure will be more comprehensive and complete and the concepts of the exemplary embodiments will be fully conveyed to those skilled in the art. The same reference numerals in the figures represent the same or similar structures, and thus their detailed description will be omitted.
[0043] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known structures, methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.
[0044] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or these functional entities or parts of functional entities may be implemented in one or more software hardened modules, or these functional entities may be implemented in different networks and / or processor devices and / or microcontroller devices.
[0045] In the related technologies in this field, the B / S architecture is a browser and server architecture mode. In this architecture, the user interface is implemented through the browser, a small part of the transaction logic is implemented on the front end, and the main transaction logic is implemented on the server side, thereby simplifying the client computer load. In the related technologies, the B / S architecture system has the following defects when integrating the barcode scanning function:
[0046] 1) You need to purchase hardware equipment such as barcode scanners, and you need to continue to support maintenance / maintenance / update costs;
[0047] 2) It requires relatively complex and targeted underlying / backend development to realize the integration of the barcode scanner and the host system. Each system needs to be developed and adapted separately, which means that the integration of the barcode scanning function is highly complex;
[0048] 3) If a barcode scanner is not used, it is necessary to call an image acquisition device, such as a camera, through the browser to capture pictures, and then send them back to the server for barcode recognition, thereby increasing the cost of purchasing the image acquisition device and the cost of integrating the barcode scanning function.
[0049] Based on this, in an exemplary embodiment of the present disclosure, a code scanning method is first provided, which is applied to a server. Figure 1 As shown, the code scanning method includes the following steps:
[0050] Step S110: Generate unique identification information of the current code scanning request, and provide the unique identification information to the browser side, so as to display the unique identification information in the form of a unique code, and the unique identification information corresponds to the target fill box of the browser side;
[0051] Step S120: If the unique identification information and the scanning result information generated by scanning the barcode to be scanned are received at the same time, the scanning result information is provided to the browser end to fill in the target fill box, and the received unique identification information is obtained by scanning the unique code.
[0052] According to the scanning method in this example embodiment, after receiving the current scanning request, the server generates unique identification information of the current scanning request and provides it to the browser side, and the browser side displays the unique identification information in the form of a unique code for other scanning terminals to scan. Other scanning terminals can obtain unique identification information and scanning result information respectively by scanning the code twice in succession, namely scanning the unique code and scanning the barcode to be scanned, so as to directly pass the scanning result information to the target fill box of the browser side based on the obtained unique identification information. Only a very small amount of front-end modification of the original system is required to integrate the scanning function into the system. The scanning function is simple to integrate and reduces maintenance costs. The scanning function is decoupled from the integrated system, and no additional hardware equipment such as scanning guns and image acquisition equipment are required for support. No later maintenance is required, which also reduces the scanning cost.
[0053] Combine the following Figure 1 The code scanning method in the exemplary embodiment of the present disclosure is further explained.
[0054] In step S110, unique identification information of the current code scanning request is generated, and the unique identification information is provided to the browser side so as to display the unique identification information in the form of a unique code.
[0055] In an exemplary embodiment of the present disclosure, the server receives a current code scanning request sent by a browser. The server may receive the current code scanning request sent by the browser via asynchronous JavaScript and XML ajax (Asynchronous JavaScript And XMLAnd HTML, a web data interaction method). The unique identification information of the current code scanning request has a corresponding association relationship with the target fill box of the browser.
[0056] Optionally, unique identification information may be randomly generated based on the current code scanning request. Optionally, unique identification information may be generated based on relevant information on the browser side corresponding to the current code scanning request (such as identification information of the browser side application, address information corresponding to the current code scanning request on the browser side, etc.). For example, the unique identification information may be a UUID (Universally Unique Identifier). Of course, any identification information that uniquely identifies the current code scanning request on the browser side may be used.
[0057] In some possible implementations, in order to distinguish the unique identification information corresponding to the browser end from the information obtained from other scanning results, that is, to distinguish that the scanning target of the current scanning request is the scanning result information of the barcode to be scanned entered into the target fill box, the generated unique identification information may also include preset marking information. For example, the generated unique identification information includes preset marking information "@@", "¥¥", etc., such as adding "@@" to the first two digits of the generated unique identification information. Of course, other preset marking information may also be included in the generated unique identification information according to actual scanning requirements. Any unique identification information that can identify the scanning target of the current scanning request as the scanning result information of the barcode to be scanned entered into the target fill box and is used to distinguish other scanning results (such as scanning results of ordinary login web pages, login applications, etc.) may be used, and the present disclosure does not make special limitations on this.
[0058] In some possible implementations, in order to distinguish and manage the current code scanning requests from different browser terminals, the preset tag information included in the unique identification information corresponding to the current code scanning requests from different browser terminals can also be distinguished. For example, "@@" is added to the unique identification information corresponding to the current code scanning request from browser terminal 1, and "¥¥" is added to the unique identification information corresponding to the current code scanning request from browser terminal 2, so that when saving the generated unique identification information, the unique identification information from the same browser terminal is managed in a unified manner, so that the code scanning result information can be stored according to the unique identification information in the future, and when the code scanning result information is queried according to the unique identification information, the corresponding unique identification information or code scanning result information can be accurately found, thereby improving the response speed.
[0059] In an exemplary embodiment of the present disclosure, the unique identification information includes a preset tag information, and when the scanning result corresponding to the barcode to be scanned is subsequently queried based on the unique identification information, by judging whether the preset tag information exists in the unique identification information, it can be determined whether the current scanning target is to enter the scanning result information of the barcode to be scanned into the target fill box. For example, if the unique identification information includes the preset tag information, it indicates that the scanning target of the current scanning request is to enter the scanning result information of the barcode to be scanned into the target fill box. On the contrary, if there is no preset tag information in the unique identification information, the corresponding scanning target is not to enter the scanning result information of the barcode to be scanned into the target fill box, so that the scanning requests of different scanning targets can be distinguished.
[0060] In some possible implementations, after the unique identification information is generated and saved, the unique identification information is provided to the browser side. Based on this, the browser side can display the obtained unique identification information in the form of a unique code. Among them, the unique code can be an ordinary barcode or a special barcode, such as a QR code, and the present disclosure does not make special restrictions on this. Based on this, the unique identification information is provided to the browser side, so that the browser side displays the unique identification information in the form of a unique code, so that the code scanning terminal can quickly obtain the unique identification information corresponding to the unique code by scanning the unique code, that is, the unique identification information corresponding to the current code scanning request. Among them, the browser side can be a browser located on any terminal device, for example, the browser side is a browser on a mobile phone terminal; the browser side can also be a browser on a computer terminal, and so on; the browser side can be a browser located on a code scanning terminal, or it can be a browser located on a terminal device different from the code scanning terminal.
[0061] In step S120, if the unique identification information and the scanning result information generated by scanning the barcode to be scanned are received at the same time, the scanning result information is provided to the browser to fill in the target fill box, wherein the received unique identification information is obtained by scanning the unique code displayed by the browser.
[0062] In an exemplary embodiment of the present disclosure, the barcode to be scanned is a barcode that is different from the unique code, and can be an ordinary barcode or a QR code. For example, the unique code is a barcode of the unique identification information of the current scan request corresponding to a browser-side webpage, and the barcode to be scanned is a QR code of an item for sale. Based on this, after the barcode scanning terminal scans the unique code provided by a browser-side webpage, the unique identification information corresponding to the current scan request is obtained. Correspondingly, if the barcode scanning terminal scans the barcode to be scanned, what is generated is the scan result information corresponding to the item for sale, such as item details (such as item serial code, price, specifications, etc.). The target fill box is a box to be input in the browser side, corresponding to the unique identification information, and is used to input the scan result information corresponding to the barcode to be scanned.
[0063] like Figure 2 shows part of the initial page of a browser according to an exemplary embodiment of the present disclosure, Figure 2 The "Scan Code Quick Fill" part in the figure is the unique code corresponding to the unique identification information of the current scan code request. The "Terminal Serial Code" input box in the figure is used to enter the barcode to be scanned ( Figure 2 (not shown) corresponding to the scan result information. Figure 2 In order to fill in the scan result information of the barcode to be scanned in the target fill box corresponding to the "Terminal Serial Code", the user can trigger and send the current scan request to the server through the browser, so that the server generates the unique identification information of the current scan request and provides it to the browser, so that the browser displays the QR code corresponding to the "Scan Code Quick Fill". Figure 2As shown, multiple boxes to be filled in can be provided in the same browser interface at the same time, and the corresponding scan code request can be sent to the server according to the user's selection (such as the box to be filled in corresponding to the terminal serial code 1). Figure 2 This is only an exemplary description of the initial page on the browser side, and the present disclosure does not make any special limitation on the page display on the browser side.
[0064] In some possible implementations, the server may receive the unique identification information obtained by the scanning terminal scanning the unique code, and receive the scanning result information generated by the scanning terminal scanning the barcode to be scanned, and save the scanning result information and the corresponding unique identification information. The unique identification information and the scanning result information may be saved in the form of a key-value pair, for example, see Figure 3 As shown, the unique identification information and the scan result information can be saved in a distributed cache in the form of a key-value pair, such as a distributed cache CTG-CACHE.
[0065] In some possible implementations, before simultaneously receiving the unique identification information and the scanning result information generated by scanning the barcode to be scanned, and providing the scanning result information to the browser, a scanning result polling request carrying the unique identification information sent by the browser can also be received, and it can be queried whether there is scanning result information that matches the unique identification information.
[0066] After the browser initiates the current scan request to the server and receives the returned unique identification information, and displays the unique identification in the interface in the form of a unique code, the server will receive a scan result polling request carrying the unique identification information from the browser to poll whether there is scan result information that matches the unique identification information. Based on this, after receiving the scan result polling request sent by the browser, the server queries the cache for scan result information that matches the unique identification information. This allows the scan result information to be filled into the target fill box in a timely manner through a highly concurrent and scalable polling architecture.
[0067] If the server receives both the unique identification information and the scan result information generated by scanning the barcode to be scanned, it will respond to the scan result polling request from the browser and provide the scan result information to the browser to fill in the target fill box in the browser interface. Figure 4 A schematic diagram of filling the scan result information into the target filling box according to an exemplary embodiment of the present disclosure is shown. Figure 4 , fill in the scanning result information "9787519744298" corresponding to the barcode to be scanned into the target fill box.
[0068] Through this exemplary embodiment, after receiving the unique identification information and scanning result information obtained by the scanning terminal through two barcode scans, the scanning result information is transmitted to the target filling box of the target terminal. Without the need for any hardware equipment such as a scanning gun, the current relevant information can be entered, thereby improving the scanning efficiency and reducing the scanning cost.
[0069] In some possible implementations, a scan request sent by the same browser may also be received, and unique identification information corresponding to the scan request is generated and used to update the unique identification information corresponding to the current scan request. Specifically, if the browser does not receive scan result information matching the unique identification information of the current scan request within a preset time, the browser stops sending scan result polling requests to avoid resource and network consumption caused by frequently sending scan polling requests.
[0070] When the browser receives a re-request operation triggered by the user, it re-sends the scan code request to the server. Correspondingly, after receiving the scan code request from the same browser, the server generates unique identification information corresponding to the scan code request and updates the old unique identification information with the newly generated unique identification information.
[0071] Through this exemplary embodiment, after receiving scan code requests sent by the same browser at different times, the unique identification information of the last received scan code request is used as the basis, and the unique identification information of the last received scan code request is provided to the browser and the unique code is updated at the same time. This not only avoids the consumption of network resources caused by long-term unsuccessful polling, but also avoids the occurrence of situations such as the unique identification and / or unique code of the same browser not being updated for a long time and being illegally used, thereby improving the security of scan code.
[0072] The present disclosure also provides a scanning method, which is applied to a code scanning terminal, including but not limited to a terminal device with a code scanning function such as a smart phone, a tablet computer, and a smart watch. Figure 5 A flowchart of a code scanning method according to an exemplary embodiment of the present disclosure is shown. Figure 5 As shown, the process may include the following steps:
[0073] Step S510: Scan the unique code corresponding to the current code scanning request on the browser side, and obtain the unique identification information corresponding to the unique code, wherein the unique identification information corresponds to the target fill box on the browser side.
[0074] Step S520: Scan the barcode to be scanned to generate corresponding scanning result information, and send the scanning result information and unique identification information to the server, so as to provide the scanning result information to the browser side to fill in the target fill box based on the unique identification information.
[0075] In an exemplary embodiment of the present disclosure, the barcode scanning terminal can first scan the unique code displayed on the browser interface to obtain the unique identification information corresponding to the unique code, and then scan the barcode to be scanned to generate the corresponding scanning result information, and simultaneously send the unique identification information and scanning result information obtained by the scans to the server, so that the server can save the unique identification information and the scanning result information, and upon receiving the scanning result polling request carrying the unique identification information, provide the scanning result information corresponding to the unique identification information as a response result to the browser and fill it in the target fill box corresponding to the unique identification information.
[0076] like Figure 6 A schematic diagram of the structure of a code scanning terminal interface according to an exemplary embodiment of the present disclosure is shown. Figure 6 The code scanning terminal interface 600 includes a scanning viewfinder 610 , an information prompt box 620 and a status reset button 630 .
[0077] The scanning frame 610 is used to scan a unique code or a barcode to be scanned, such as Figure 7 and 8 The schematic diagrams of scanning the unique code and the barcode to be scanned by the barcode scanning terminal are shown respectively. The unique code and the barcode to be scanned can be scanned respectively through the barcode scanning function of the barcode scanning terminal. Among them, the barcode to be scanned must be scanned after the unique code is scanned. In this case, only when the unique identification information obtained by scanning the unique code contains preset marking information for distinguishing the scanning target of the current scanning request as the scanning result information of the barcode to be scanned is entered into the target filling box, the barcode to be scanned is allowed to continue scanning, so as to clarify the scanning target, thereby distinguishing the current scanning request from other types of scanning requests (such as web page login, etc.). The information prompt box 620 is used to display prompt information after the user terminal completes scanning the unique code and / or the barcode to be scanned; the status reset button 630 is used to reset the current scanning status. For example, when the first unique code scanned by the scanning terminal for the first time corresponds to the first fill box in the browser interface, and the user's starting point is to scan the second unique code corresponding to the second fill box in the browser interface, the user resets the status through the status reset button 630 before scanning the barcode to be scanned, and rescans the second unique code, and then scans the barcode to be scanned.
[0078] In some possible implementations, if the unique code corresponding to the current scanning request is updated after a preset period of time, the scanning terminal can also rescan the updated unique code to obtain the unique identification information corresponding to the updated unique code. Based on this, the scanning result information and the unique identification information corresponding to the updated unique code can also be sent to the server, so that the scanning result information is determined as the response result of the current scanning request based on the unique identification information corresponding to the updated unique code, and provided to the browser and filled in the target fill box. Based on this, if the scanning terminal does not scan the barcode to be scanned for a long time after scanning the unique code, the unique code expires, and the scanning terminal needs to rescan the updated unique code to obtain the updated unique identification information, thereby improving the security of scanning and avoiding the consumption of network resources caused by the browser end polling for a long time whether there is scanning result information corresponding to the unique identification information.
[0079] In some possible implementations, the barcode scanning terminal can detect the scanning lighting environment when scanning the code. If it is in a dark light state (such as the current lighting conditions do not meet the preset scanning lighting conditions), it will automatically prompt to turn on the flash to improve the scanning success rate.
[0080] In some possible implementations, when the code scanning terminal successfully scans the code, it can also prompt the user that the scan is successful through a preset prompt method, such as a vibration prompt, a ring tone prompt, or a message prompt, etc.
[0081] After the code scanning terminal of the present invention completes scanning of the unique code and the barcode to be scanned, the status service is initialized.
[0082] Through the exemplary embodiments of the present disclosure, the scanning result information corresponding to the barcode to be scanned can be uploaded to the server only by scanning the barcode twice in succession through the scanning terminal, so as to be transmitted to the browser via the server and filled in the target fill box in the browser interface. There are no special requirements for the scanning terminal, and any terminal device with a scanning function can complete it. It has a wide range of applications, simple operation, and low scanning cost.
[0083] The present disclosure also provides a code scanning method, which is applied to a browser side, such as Fig. 9 A flowchart of a code scanning method according to an exemplary embodiment of the present disclosure is shown. Fig. 9 , the process includes the following steps:
[0084] Step S910: Acquire the unique identification information of the current code scanning request, generate and display a unique code corresponding to the unique identification information, wherein the unique identification information corresponds to the target fill box on the browser side;
[0085] Step S920: Send a scan result polling request carrying unique identification information to the server. If scan result information matching the unique identification information is received, fill the scan result information into the target fill box, where the scan result information matching the unique identification information is obtained by scanning the unique code and scanning the barcode to be scanned.
[0086] In an exemplary embodiment of the present disclosure, the browser sends a current scan request to the server, receives unique identification information of the current scan request fed back by the server, and displays the unique identification information in the form of a unique code; then, a scan result polling request carrying unique identification information is sent to the server, and when scan result information matching the unique identification information is received, the scan result information is filled in the target fill box corresponding to the unique identification information.
[0087] The request frequency of the scan result polling request is 1 second / time, 2 seconds / time, etc., which can be set according to the actual scanning requirements, and the present disclosure does not make any special restrictions on this. The scan result information matching the unique identification information is obtained by scanning the unique code and the barcode to be scanned by the scanning terminal, and uploaded to the server for storage.
[0088] In some possible implementations, if no response result is received to the scan result polling request within a preset time, the scan result polling request is stopped. If the browser receives a scan request triggered by the user, the scan request is resent to the server to obtain the unique identification information corresponding to the scan request, and generate and display the unique code corresponding to the unique identification information corresponding to the scan request. Based on this, it is possible to avoid the situation where the unique identification and / or unique code of the same browser end is not updated for a long time and is illegally used, thereby improving the security of scanning and avoiding the consumption of network resources caused by sending polling requests for a long time.
[0089] Fig.10 The interactive flow chart of the code scanning method according to the exemplary embodiment of the present disclosure is shown below. Fig.10 , taking the interaction between the server, the code scanning terminal and the browser as an example, the code scanning method of the exemplary embodiment of the present disclosure is explained.
[0090] 1) The user can trigger the browser to send the current scan code request to the server;
[0091] 2) The server generates unique identification information for the current code scanning request and provides the unique identification information to the browser, so that the browser displays the unique identification information in the form of a unique code;
[0092] 3) The browser sends a scan result polling request carrying unique identification information to the server. If the scan result information matching the unique identification is not returned by the server, the browser sends a scan result polling request to the server cyclically at a preset time interval;
[0093] 4) The user first scans the unique code displayed on the browser side through a scanning terminal with a scanning function to obtain the corresponding unique identification information, and then scans the barcode to be scanned to generate scanning result information, and sends the unique identification information and scanning result information obtained from the two scans to the server and stores them, so as to provide the browser side with a response result of the scanning result polling request;
[0094] 5) If the browser polls the server to return the scan result information that matches the unique identification information, it stops sending the scan result polling request and fills the scan result information into the target fill box of the interface to complete the scan result entry of the barcode to be scanned.
[0095] It should be noted that if the browser does not receive the scan result information matching the unique identification information within the preset time, it stops sending the scan result polling request until it receives the scan request triggered by the user again, and then it sends the scan request to the server again. The comparison will not be repeated.
[0096] Through the code scanning method of the exemplary embodiment of the present invention, after receiving the current code scanning request, the server generates the unique identification information of the current code scanning request and provides it to the browser, and the browser displays the unique identification information in the form of a unique code for scanning by the code scanning terminal. The code scanning terminal can obtain the unique identification information and the code scanning result information by scanning the code twice, namely scanning the unique code and scanning the barcode to be scanned, respectively, so as to directly transmit the scanning result information to the target filling box of the browser based on the obtained unique identification information. Only a very small amount of front-end modification of the original system is required to integrate the code scanning function into the system. The code scanning function is easy to integrate and reduce maintenance costs. The code scanning function is decoupled from the integrated system, and no additional hardware equipment such as code scanning guns and image acquisition equipment are required for support. There is no need for subsequent maintenance, which also reduces the cost of code scanning. It has a wide range of application scenarios, such as the business acceptance system scanning physical terminals (such as mobile terminals, optical modems, set-top boxes, smart home terminals, etc.) for serial code verification, the terminal management system scanning terminals (such as mobile terminals, optical modems, set-top boxes, smart home terminals, etc.) for serial code warehousing, the financial auxiliary system scanning document (such as invoice) barcodes, and daily financial settlement (such as shopping settlement), etc.
[0097] In an exemplary embodiment of the present disclosure, a code scanning device is also provided. Fig.11 As shown, the code scanning device 1100 may include an information providing module 1110 and a code scanning processing module 1120. Specifically:
[0098] The information providing module 1110 is used to generate unique identification information of the current code scanning request, and provide the unique identification information to the browser side, so as to display the unique identification information in the form of a unique code, and the unique identification information corresponds to the target fill box of the browser side;
[0099] The code scanning processing module 1120 is used to provide the code scanning result information to the browser end to fill in the target fill box if the unique identification information and the code scanning result information generated by scanning the barcode to be scanned are received at the same time. The received unique identification information is obtained by scanning the unique code.
[0100] Since the functional modules of the code scanning device of the exemplary embodiment of the present disclosure are the same as those in the inventive embodiment of the code scanning method described above, they will not be described in detail here.
[0101] In an exemplary embodiment of the present disclosure, a code scanning terminal is also provided. Fig.12 As shown, the code scanning terminal 1200 may include a first code scanning module 1210 and a second code scanning module 1220. Specifically:
[0102] The first code scanning module 1210 is used to scan the unique code corresponding to the current code scanning request of the browser end, and obtain the unique identification information corresponding to the unique code, wherein the unique identification information corresponds to the target filling box of the browser end;
[0103] The second scanning module 1220 is used to scan the barcode to be scanned to generate corresponding scanning result information, and send the scanning result information and the unique identification information to the server, so as to fill the scanning result information into the target filling box based on the unique identification information.
[0104] Since the functional modules of the code scanning terminal of the exemplary embodiment of the present disclosure are the same as those in the inventive embodiment of the code scanning method described above, they will not be described in detail here.
[0105] In an exemplary embodiment of the present disclosure, a code scanning device is also provided. Fig.13 As shown, the code scanning device 1300 may include an information processing module 1310 and a code scanning processing module 1320. Specifically:
[0106] The information processing module 1310 is used to obtain the unique identification information of the current code scanning request, generate and display the unique code corresponding to the unique identification information, and the unique identification information corresponds to the target fill box on the browser side;
[0107] The scanning processing module 1320 is used to send a scanning result polling request carrying the unique identification information to the server. If the scanning result information matching the unique identification information is received, the scanning result information is filled into the target fill box. The scanning result information matching the unique identification information is obtained based on scanning the unique code and scanning the barcode to be scanned.
[0108] Since the functional modules of the code scanning device of the exemplary embodiment of the present disclosure are the same as those in the inventive embodiment of the code scanning method described above, they will not be described in detail here.
[0109] It should be noted that although several modules or units of the code scanning device and the code scanning terminal are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.
[0110] In addition, in the exemplary embodiment of the present disclosure, a computer storage medium capable of implementing the above method is also provided. A program product capable of implementing the above method of this specification is stored thereon. In some possible embodiments, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to perform the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of this specification.
[0111] refer to Fig.14 As shown, a program product 1400 for implementing the above method according to an exemplary embodiment of the present disclosure is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0112] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0113] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0114] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0115] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0116] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided. It will be appreciated by those skilled in the art that various aspects of the present disclosure may be implemented as a system, method, or program product. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: a complete hardware embodiment, a complete software embodiment (including firmware, microcode, etc.), or an embodiment combining hardware and software aspects, which may be collectively referred to herein as a "circuit", "module", or "system".
[0117] Refer to the following Fig.15 15 to describe the electronic device 1500 according to such an embodiment of the present disclosure. Fig.15 The electronic device 1500 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0118] like Fig.15 As shown, the electronic device 1500 is in the form of a general computing device. The components of the electronic device 1500 may include, but are not limited to: the at least one processing unit 1510, the at least one storage unit 1520, a bus 1530 connecting different system components (including the storage unit 1520 and the processing unit 1510), and a display unit 1540.
[0119] The storage unit stores program codes, which can be executed by the processing unit 1510, so that the processing unit 1510 executes the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification.
[0120] The storage unit 1520 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 1521 and / or a cache memory unit 1522 , and may further include a read-only memory unit (ROM) 1523 .
[0121] The storage unit 1520 may also include a program / utility 1524 having a set (at least one) of program modules 1525, such program modules 1525 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0122] Bus 1530 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0123] The electronic device 1500 may also communicate with one or more external devices 1600 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1500, and / or communicate with any device that enables the electronic device 1500 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1550. In addition, the electronic device 1500 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 1560. As shown, the network adapter 1560 communicates with other modules of the electronic device 1500 via a bus 1530. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0124] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.
[0125] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0126] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0127] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A code scanning method, characterized in that: include: Receive the current scanning request sent by the browser, generate unique identification information of the current scanning request, and provide the unique identification information to the browser to display the unique identification information in the form of a unique code, wherein the unique identification information corresponds to a target fill-in box of the browser; the unique identification information includes preset marking information, which is used to distinguish that the scanning target of the current scanning request is to enter the scanning result information of the barcode to be scanned into the target fill-in box; If the unique identification information and the scanning result information generated by scanning the barcode to be scanned are received at the same time, the scanning result information is provided to the browser to fill in the target fill box, and the received unique identification information is obtained by receiving the unique code displayed by the browser by scanning the scanning terminal.
2. The method according to claim 1, characterized in that Before the unique identification information and the scanning result information generated by scanning the barcode to be scanned are received simultaneously, and the scanning result information is provided to the browser to fill in the target fill box, the method further includes: Receiving a scan result polling request carrying the unique identification information sent by the browser; Check whether there is scan result information matching the unique identification information.
3. The method according to claim 1, characterized in that: The method further comprises: Receive a code scanning request sent by the same browser, generate unique identification information corresponding to the code scanning request and use it to update the unique identification information corresponding to the current code scanning request.
4. A code scanning method, characterized in that: include: Scan the unique code corresponding to the current scanning request of the browser end, and obtain the unique identification information corresponding to the unique code, wherein the unique identification information corresponds to the target filling box of the browser end; the unique identification information includes preset marking information, which is used to distinguish that the scanning target of the current scanning request is to enter the scanning result information of the barcode to be scanned into the target filling box; The unique identification information is generated after the server receives the current code scanning request sent by the browser; Scan the barcode to be scanned to generate corresponding scanning result information, and send the scanning result information and the unique identification information to the server, so as to provide the scanning result information to the browser end based on the unique identification information to fill in the target fill box.
5. The method according to claim 4, characterized in that Before the scanning of the barcode to be scanned generates corresponding scanning result information, and the scanning result information and the unique identification information are sent to the server, so as to provide the scanning result information to the browser to fill in the target fill box based on the unique identification information, the method further includes: Determining whether the unique identification information contains preset marking information for distinguishing the scanning target of the current scanning request is to enter the scanning result information of the barcode to be scanned into the target filling box.
6. The method according to claim 4 or 5, characterized in that: After a preset time period, the unique code corresponding to the current code scanning request is updated, and the method further includes: Scan the updated unique code to obtain unique identification information corresponding to the updated unique code; The scanning of the barcode to be scanned generates corresponding scanning result information, and sends the scanning result information and the unique identification information to the server, so as to provide the scanning result information to the browser based on the unique identification information and fill it into the target fill box, including: The code scanning result information and the unique identification information corresponding to the updated unique code are sent to the server, so that the code scanning result information is provided to the browser end based on the unique identification information corresponding to the updated unique code and filled into the target fill box.
7. A code scanning method, characterized in that: include: Sending a current code scanning request to a server to obtain unique identification information of the current code scanning request generated by the server, generating and displaying a unique code corresponding to the unique identification information, wherein the unique identification information corresponds to a target fill-in box on the browser side; the unique identification information includes preset marking information, which is used to distinguish that the code scanning target of the current code scanning request is to enter the code scanning result information to be scanned into the target fill-in box; A scan result polling request carrying the unique identification information is sent to the server. If scan result information matching the unique identification information is received, the scan result information is filled into the target fill box. The scan result information matching the unique identification information is obtained by scanning the unique code and scanning the barcode to be scanned.
8. The method according to claim 7, characterized in that The method further comprises: If no response result of the code scanning result polling request is received within the preset time, stop sending the code scanning result polling request; In response to the re-request operation, the code scanning request is resent to the server to obtain the unique identification information corresponding to the code scanning request, and a unique code corresponding to the unique identification information corresponding to the code scanning request is generated and displayed.
