A single-terminal multi-system synchronization method and synchronization device for code scanning data
The information is converted into data synchronization information through the scanning code device, and the synchronization data routing table of the terminal device is used to realize data synchronization between the local cash register system and multiple third-party information collection systems, solving the problem of inconvenient data synchronization in the prior art. Efficient and accurate data synchronization and cost savings are achieved.
Patent Information
- Application Number
- CN202311798933.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-25
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2043-12-25
AI Technical Summary
In the prior art, it is difficult for brand retailers to synchronize data between local cash register systems and third-party information collection systems, resulting in inconvenient operation and waste of manpower and material resources.
The scan code information is obtained through the scanning device, and according to the preset data synchronization rules and communication protocol, the information is converted into data synchronization information and transmitted to the terminal equipment that simultaneously installs the local cash register system and the third-party information collection system, and the synchronization of the terminal equipment is used. Data routing tables realize multi-system data synchronization.
It realizes efficient, comprehensive, accurate and safe synchronization of sales data between the local cash register system and multiple third-party information collection systems, saving the cost of opening a store for equipment occupation and staffing.
Smart Images

Figure CN118118490B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission, and in particular to a single-terminal multi-system synchronization method and a synchronization device for scanned code data. Background Art
[0002] As corporate brand awareness continues to improve, most brand owners maintain or improve brand benefits by increasing supervision of various sales channels and corresponding commodity retailers, and collecting sales data of corresponding brand products from various commodity retailers has become an indispensable supervision method. Based on this, brand owners require each brand retailer to upload relevant sales data to the brand owner's information collection system when selling corresponding brand products, so that the brand owner can timely understand market demand and monitor market price chaos.
[0003] For brand retailers who sell multiple brands of products at the same time, in addition to purchasing and installing a local cash register system, they also need to install the information collection systems provided by various brands, such as retail supermarkets or chain stores. When selling related brand products, in addition to entering the corresponding sales information into the local cash register system, they also need to enter the corresponding information collection system at the same time. Due to the application limitation that existing barcode scanners can only connect to one cash register system on one terminal device, the brand product sales information synchronization method mostly adopted by existing brand retailers is to install the local cash register system and the brand information collection system on different terminal devices respectively, and the synchronization of the corresponding brand product sales information can be achieved by configuring the corresponding barcode scanners on different terminal devices respectively; this method is not only inconvenient for sales personnel to operate, but also requires the simultaneous use of multiple terminal devices, wasting a lot of manpower and material resources. Summary of the invention
[0004] The purpose of the present invention is to provide a single-terminal multi-system synchronization method for scanned code data, which converts the scanned code information obtained by a scanned code device into data synchronization information according to preset data synchronization rules and preset communication protocols, and then transmits it to a terminal device that is simultaneously installed with a local cash register system running in the foreground and at least one third-party information collection system running in the background, and the terminal device realizes simultaneous synchronous distribution of multi-system data according to the parsing result of the data synchronization information and a pre-constructed synchronization data routing table, thereby solving the application defect that brand retailers cannot realize the simultaneous entry of data required by the local cash register system and the third-party information collection system in a simple, efficient and low-cost manner, and can realize efficient, comprehensive, accurate and secure synchronization of sales data between the local cash register system running on the same terminal device and multiple third-party information collection systems based on only one scanned code information, while also effectively saving brand retailers' store opening costs such as equipment occupancy and staffing.
[0005] In order to achieve the above objectives, it is necessary to provide a single-terminal multi-system synchronization method, system, computer equipment and storage medium for scanning code data in response to the above technical problems.
[0006] In a first aspect, an embodiment of the present invention provides a single-terminal multi-system synchronization method for scanned code data, the method comprising the following steps:
[0007] Obtaining scanned code information through a code scanning device, converting the scanned code information into corresponding data synchronization information according to a preset data synchronization rule and a preset communication protocol, and transmitting the data synchronization information to a terminal device; the terminal device is simultaneously installed with a local cash register system running at the front desk and at least one third-party information collection system running at the back desk;
[0008] In response to the login and activation of the local cash register system and each third-party information collection system, the data synchronization information is received and parsed by the terminal device to obtain the system number to be synchronized and the corresponding data to be synchronized, and according to the system number to be synchronized and the pre-built synchronization data routing table, the data to be synchronized is synchronized to the corresponding system to be synchronized.
[0009] Furthermore, the data encapsulation structure of the preset communication protocol includes a data frame header, a data length, a data content and a check field in sequence; the data content includes a plurality of data segments arranged in sequence; and the data segment includes a system number to be synchronized and corresponding data to be synchronized.
[0010] Furthermore, the scanned code information includes commodity basic data and commodity payment data; the commodity basic data includes commodity basic information, sales quantity and sales price; the commodity basic information includes commodity name, commodity category, commodity number and commodity supplier;
[0011] The step of converting the scan code information into corresponding data synchronization information according to the preset data synchronization rule and the preset communication protocol includes:
[0012] When the scanned code information is the commodity basic data, a third-party information collection directory is obtained, the commodity basic information in the commodity basic data is matched with the third-party information collection directory, and corresponding data synchronization information is generated according to the corresponding matching result and the data encapsulation structure;
[0013] When the code scanning information data is the commodity payment data, the code scanning information is packaged according to the data packaging structure and the system number of the local cash register system to obtain corresponding data synchronization information.
[0014] Further, the step of generating corresponding data synchronization information according to the corresponding matching result and the data encapsulation structure includes:
[0015] Combine the system number of the local cashier system and the code scanning information to obtain a cashier synchronization data segment, and determine whether the matching result is a matching item;
[0016] When the matching result is that there are matching items, respectively obtaining the to-be-synchronized system numbers and to-be-synchronized data items corresponding to the matching items, and combining the to-be-synchronized system numbers and the corresponding to-be-synchronized data items to obtain the corresponding three-party synchronization data segments, and according to the data encapsulation structure, sequentially encapsulating the cashier synchronization data segment and the three-party synchronization data segments to obtain the data synchronization information;
[0017] When the matching result is that there is no matching item, the cashier synchronization data segment is encapsulated according to the data encapsulation structure to obtain the data synchronization information.
[0018] Furthermore, the step of transmitting the data synchronization information to the terminal device includes:
[0019] The data synchronization information is encrypted according to a preset encryption method, and the encrypted data synchronization information is transmitted to the terminal device.
[0020] Further, the receiving and parsing of the data synchronization information by the terminal device to obtain the system number to be synchronized and the corresponding data to be synchronized includes:
[0021] According to the data encapsulation structure, a security check is performed on the data synchronization information to obtain a corresponding check result;
[0022] When the verification result is that the verification is passed, the data content of the data synchronization information is analyzed in sequence to obtain the system number to be synchronized and the corresponding data to be synchronized;
[0023] When the verification result is verification failure, the data synchronization information is directly discarded.
[0024] Furthermore, the synchronous data routing table includes a plurality of synchronous routing information; the synchronous routing information includes a system number and a corresponding serial port number; the steps of constructing the synchronous data routing table include:
[0025] When the installation of the local cash register system and each third-party information collection system is completed, multiple virtual serial ports are created on the terminal device, and the local cash register system and each third-party information collection system are respectively bound to a virtual serial port to generate a corresponding synchronous data routing table.
[0026] Furthermore, the step of synchronizing the data to be synchronized to the corresponding system to be synchronized according to the system number to be synchronized and the pre-built synchronization data routing table includes:
[0027] According to the numbers of the systems to be synchronized, the synchronization data routing table is traversed to obtain the numbers of the serial ports to be synchronized corresponding to the systems to be synchronized;
[0028] The data to be synchronized corresponding to each system number to be synchronized are respectively written into the input buffer area corresponding to the serial port number to be synchronized.
[0029] In a second aspect, an embodiment of the present invention provides a single-terminal multi-system synchronization device for code scanning data, the synchronization device comprising a code scanning device and a terminal device; the terminal device is simultaneously installed with a local cash register system running in the foreground and at least one third-party information collection system running in the background;
[0030] The code scanning device is used to obtain the code scanning information, convert the code scanning information into corresponding data synchronization information according to the preset data synchronization rule and the preset communication protocol, and transmit the data synchronization information to the terminal device;
[0031] The terminal device is used to respond to the login activation of the local cash register system and each third-party information collection system, receive and parse the data synchronization information, obtain the system number to be synchronized and the corresponding data to be synchronized, and synchronize the data to be synchronized to the corresponding system to be synchronized according to the system number to be synchronized and a pre-built synchronization data routing table.
[0032] Furthermore, the terminal device is also used to create multiple virtual serial ports on the terminal device after the installation of the local cash register system and each third-party information collection system is completed, and to bind the local cash register system and each third-party information collection system to a corresponding virtual serial port respectively, and generate a corresponding synchronization data routing table.
[0033] The above-mentioned application provides a single-terminal multi-system synchronization method and synchronization device for scanned code data. The method is used to obtain scanned code information through a scanned code device, convert the scanned code information into corresponding data synchronization information according to preset data synchronization rules and preset communication protocols, and transmit the data synchronization information to a terminal device that simultaneously installs a local cash register system running in the foreground and at least one third-party information collection system running in the background. After the login of the local cash register system and each third-party information collection system is enabled, the data synchronization information is received and parsed by the terminal device to obtain the system number to be synchronized and the corresponding data to be synchronized, and a technical solution is used to synchronize the data to be synchronized to the corresponding system to be synchronized according to the system number to be synchronized and a pre-built synchronization data routing table. Compared with the existing technology, the single-terminal multi-system synchronization method of scan code data can not only realize the efficient, comprehensive, accurate and secure synchronization of sales data between the local cash register system running on the same terminal device and multiple third-party information collection systems based on only one scan code information, which is convenient for brand retailers to manage the sales of all commodities, and provides reliable guarantee for each brand to obtain brand commodity sales information in time for market demand analysis and market price regulation, but also can effectively save brand retailers' store opening costs such as equipment occupancy and staffing. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 1 is a flow chart of a single-terminal multi-system synchronization method for code scanning data in an embodiment of the present invention;
[0035] Figure 2 Schematic diagram of the structure of a single-terminal multi-system synchronization device for scanned code data in an embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical scheme and beneficial effects of the present application clearer, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. Obviously, the embodiments described below are part of the embodiments of the present invention and are only used to illustrate the present invention, but are not used to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] The single-terminal multi-system synchronization method of the scanned code data provided by the present invention can be understood as a method for simultaneously entering the required data of the local cash register system and the third-party information collection system in a simple, efficient and low-cost manner based on the current situation that retailers who sell multiple brands of goods at the same time find it difficult to sell related brand goods at a low cost, and can simultaneously meet the application requirements of multiple third-party information collection systems and local cash register systems by only scanning the code once, and converting the scanned code information obtained by a scanned code device into data synchronization information according to preset data synchronization rules and preset communication protocols, and transmitting the data to the terminal device that simultaneously installs the local cash register system running in the foreground and at least one third-party information collection system running in the background, and then the terminal device implements the multi-system data synchronization distribution when necessary according to the analysis results of the data synchronization information and the pre-built synchronization data routing table, and the required data of the local cash register system and the third-party information collection system are simultaneously entered. The following embodiments will explain the single-terminal multi-system synchronization method of the scanned code data of the present invention in detail.
[0038] In one embodiment, Figure 1 As shown, a single-terminal multi-system synchronization method for scanned code data is provided, including the following steps:
[0039] S11. Obtaining scanned code information through a code scanning device, converting the scanned code information into corresponding data synchronization information according to preset data synchronization rules and preset communication protocols, and transmitting the data synchronization information to a terminal device; wherein the scanned code information can be understood as relevant information obtained by scanning a product barcode or a user payment QR code through a code scanning device, including basic product data and product payment data; the basic product data preferably includes basic product information, sales quantity and sales price for effective identification of the product, and may also include other information such as remaining inventory of the product, price discount information, etc.; it should be noted that the above-mentioned basic product data and basic product information can be adjusted and set according to specific needs in actual applications, and will not be repeated here;
[0040] The terminal device in this embodiment can be understood as a device that is installed with the required code scanning data processing system software, including but not limited to a mobile terminal or a PC computer. In principle, it only needs to meet the multi-system operation standard that can simultaneously install a local cash register system running in the foreground and at least one third-party information collection system running in the background; wherein, the local cash register system can be understood as a system used by retailers to manage commodity sales data, and the third-party information collection system can be understood as a sales information collection system for the corresponding brand commodities sold by retailers by various brands. If the commodities sold by the retailer involve multiple brand commodities that need to be monitored, then the corresponding multiple third-party information collection systems can be installed and run on the terminal device at the same time; considering that the existing local cash register system and the third-party information collection system are mostly systems connected to the serial port code scanning gun, in order to ensure the simplicity, efficiency and low cost of the synchronization method, this implementation preferably adapts the existing local cash register system and the third-party information collection system to meet the synchronization requirements of single terminal and multiple systems without changing the principle of the way in which the existing local cash register system and the third-party information collection system collect data information based on the serial port, and effectively saves the investment cost of the store cash register terminal equipment through the way of one machine for multiple uses;
[0041] The manner in which the above-mentioned terminal device establishes a communication connection with the code scanning device includes at least one of serial port communication, USB interface communication or wireless interface communication, which is not specifically limited here; the preset data synchronization rule can be understood as a rule for screening and filtering the data information required by the local cash register system and various third-party information collection systems running on the terminal device, that is, a rule for determining whether the code scanning information needs to be synchronized to other third-party information collection systems other than the local cash register system, and to which third-party information collection system it needs to be synchronized. The corresponding preset communication protocol can be understood as a protocol rule for realizing that the data to be transmitted to the local cash register system and various third-party information collection systems are packaged in a specific data format and transmitted to the corresponding terminal device for synchronous distribution;
[0042] It should be noted that the above-mentioned preset data synchronization rules and preset communication protocols can be set according to actual application requirements in principle; in order to meet the efficient and comprehensive synchronization requirements of being able to extract and filter the once scanned code information according to different rules and then transmit it to the local cash register system and other third-party information collection systems when necessary, this embodiment preferably sets the data encapsulation structure of the preset communication protocol to a data format including a data frame header, data length, data content and a check field in sequence; wherein the data content includes a plurality of data segments arranged in sequence, and each data segment includes a system number to be synchronized and corresponding data to be synchronized; specifically, the step of converting the scanned code information into corresponding data synchronization information according to the preset data synchronization rules and the preset communication protocol includes:
[0043] When the scanned code information is the basic data of the commodity, a third-party information collection directory is obtained, the basic information of the commodity in the basic data of the commodity is matched with the third-party information collection directory, and corresponding data synchronization information is generated according to the corresponding matching result and the data encapsulation structure; wherein the basic information of the commodity includes the name of the commodity, the category of the commodity, the number of the commodity and the supplier of the commodity; the third-party information collection directory corresponding to the basic information of the commodity can be understood as a mapping relationship table pre-configured according to the commodity name, category of the commodity, number of the commodity, supplier of the commodity and the corresponding required data items to be collected corresponding to each third-party information collection system installed on the terminal device and required to be used simultaneously, for example, if a local cash register system, a tobacco company information collection system and a cola brand information collection system are simultaneously running on the terminal device, then the corresponding third-party information collection directory will simultaneously include the cigarette name, cigarette category, cigarette number, tobacco company name and the corresponding required data items to be collected (for example, tobacco name, cigarette number, sales quantity, sales price and remaining inventory, etc.) corresponding to the information collection system of a tobacco company, as well as the mapping relationship table pre-configured according to the third-party information collection system installed on the terminal device and required to be used simultaneously. The cola name, cola category, cola item number, cola company name and corresponding required data items (e.g., cola name, cola item number, sales quantity, sales price and remaining inventory, etc.) corresponding to the system; in actual application, if customer A buys bread and a cola of a certain cola brand at the same time, the basic information of the product obtained can be directly matched with the third-party information collection directory to obtain cola matching items, that is, it is only necessary to synchronize the cola-related information to a cola brand information collection system at the same time as the local cash register, and the bread data is only used to update the local cash register system; if customer B buys a cola of a certain cola brand and cigarettes of a certain tobacco company at the same time, the cola matching items and cigarette matching items can be obtained at the same time, and the cola-related information needs to be synchronized to a cola brand information collection system at the same time as the local cash register, and the cigarette-related information needs to be synchronized to a tobacco company information collection system, so that it can be directly judged according to the basic information of the product whether the current scan code information needs to be synchronously distributed on multiple operating systems of the terminal device, and when it is confirmed that synchronous distribution is required, the required synchronization data items of each system to be synchronized are accurately obtained and encapsulated into a data synchronization information and transmitted to the terminal device at the same time;
[0044] After obtaining the corresponding matching results through the above method steps, the data that needs to be synchronized to the local cash register system and the third-party information collection system running simultaneously on the terminal device can be assembled and transmitted according to the preset data encapsulation structure; specifically, the step of generating corresponding data synchronization information according to the corresponding matching results and the data encapsulation structure includes:
[0045] The system number of the local cash register system and the code scanning information are combined to obtain a cash register synchronization data segment, and it is determined whether the matching result is a matching item; wherein the cash register synchronization data segment can be understood as the data content part that needs to be written into the data synchronization information and transmitted to the local cash register system running on the terminal device;
[0046] When the matching result is that there is a matching item, the system number to be synchronized and the data item to be synchronized corresponding to each matching item are obtained respectively, and each system number to be synchronized and the corresponding data item to be synchronized are combined to obtain the corresponding three-party synchronization data segment, and according to the data encapsulation structure, the cashier synchronization data segment and each three-party synchronization data segment are sequentially encapsulated to obtain the data synchronization information; wherein, the system number to be synchronized can be understood as the preset number of the third-party information collection system corresponding to the commodity supplier in the third-party information collection directory in the matching item, and the corresponding data item to be synchronized can be understood as the required collection data item corresponding to the third-party information collection directory; it should be noted that the encapsulation order of the cashier synchronization data segment and each three-party synchronization data segment can be preset or arbitrarily combined, and data synchronization information including a data frame header, data length (total number of bytes of data content), data content (data segment A+data segment B+.....) and a check field can be obtained; when the terminal device parses the data synchronization information, the system to be sent to the corresponding data item to be synchronized can be accurately and efficiently identified according to the system number to be synchronized in each data segment, which is not specifically limited here;
[0047] When the matching result is that there is no matching item, the cash register synchronization data segment is encapsulated according to the data encapsulation structure to obtain the data synchronization information; it should be noted that in this embodiment, the local cash register system is a system in which the code scanning information must be uploaded, that is, regardless of whether there is a matching item in the above matching result, it is necessary to update the local cash register system according to the currently obtained code scanning information, so as to facilitate retailers to monitor and manage store sales operation data, so as to achieve that while meeting basic cash register management needs, there is no need for additional repeated code scanning, and some product sales data can be synchronized to the corresponding third-party information collection system according to the information collection needs of each brand, which is convenient for sales personnel to operate and effectively saves labor costs;
[0048] Through the above-mentioned method of converting the basic data of goods into data synchronization information based on preset data synchronization rules and preset communication protocols, efficient, comprehensive and accurate extraction and matching of relevant brand product data of local cash register systems and third-party information collection systems can be effectively achieved.
[0049] When the scan code information data is the commodity payment data, the scan code information is encapsulated according to the data encapsulation structure and the system number of the local cash register system to obtain corresponding data synchronization information; wherein, the commodity payment data can be understood as data information related to the customer's scan code payment consumption. In order to avoid unreasonable errors such as customers paying multiple times for one consumption, in this embodiment, preferably, the information identified as commodity payment data only needs to be directly encapsulated according to the data encapsulation structure to obtain the corresponding data synchronization information by combining the system number of the local cash register system and the scan code information to obtain the cash register synchronization data segment, thereby achieving the effect of transmitting the commodity payment data only to the local cash register system without synchronizing with any other third-party information collection system.
[0050] The above-mentioned method of converting the scanned code information into data synchronization information based on the preset data synchronization rules and preset communication protocols can ensure the normal operation of the local cashier management and provide reliable technical guarantee for the simultaneous entry of data required by the local cashier system and the third-party information collection system when necessary. In addition, in order to further ensure the security and reliability of the data synchronization information transmitted to the terminal device, this embodiment preferably encrypts the data synchronization information for transmission; specifically, the step of transmitting the data synchronization information to the terminal device includes:
[0051] According to a preset encryption method, the data synchronization information is encrypted, and the encrypted data synchronization information is transmitted to the terminal device; wherein, the preset encryption method can be selected from symmetric or asymmetric encryption algorithms such as AES encryption, ECC or SHA according to actual application requirements, and is not specifically limited here.
[0052] S12. In response to the login activation of the local cash register system and each third-party information collection system, the terminal device receives and parses the data synchronization information to obtain the system number to be synchronized and the corresponding data to be synchronized, and synchronizes the data to be synchronized to the corresponding system to be synchronized according to the system number to be synchronized and the pre-built synchronization data routing table; wherein, after the terminal device parses the data synchronization information transmitted by the code scanning device, it needs to parse and distribute it to ensure that the local cash register system and each third-party information collection system running on the terminal device can obtain the synchronization data of the required goods according to actual needs; specifically, the receiving and parsing of the data synchronization information by the terminal device to obtain the system number to be synchronized and the corresponding data to be synchronized includes:
[0053] According to the data encapsulation structure, the data synchronization information is security checked to obtain a corresponding verification result; wherein, the security check can select any communication data verification method such as the existing checksum CRC, CRC check (Cyclic Redundancy Check) or parity check (Parity Check) in combination with the check field in the data synchronization information to implement data integrity verification, so as to ensure the comprehensiveness and accuracy of subsequent synchronization data. The specific process of performing security verification on each data synchronization information to obtain the corresponding verification result can refer to the corresponding existing technology implementation, which will not be repeated here;
[0054] When the verification result is that the verification is passed, the data content of the data synchronization information is parsed in sequence to obtain the system number to be synchronized and the corresponding data to be synchronized; wherein, the process of sequentially parsing the data content of the data synchronization information can be understood as first obtaining the data length in the data synchronization information according to the aforementioned data encapsulation structure, and then intercepting the corresponding length bytes of the data content part according to the obtained data length, and then parsing in sequence according to the data segment format of the system number to be synchronized and the data to be synchronized, to obtain a parsing result including the local cash register system number and the corresponding synchronization information, or simultaneously including the local cash register system number and the corresponding synchronization information, and at least one third-party information collection system number and the corresponding synchronization information parsing result, so that all the system numbers to be synchronized and the corresponding data to be synchronized included in the data synchronization information can be obtained;
[0055] When the verification result is verification failure, the data synchronization information is directly discarded.
[0056] After the received data synchronization information is security-checked and parsed by the above method, the distribution of different data in different systems can be realized through the pre-constructed synchronization data routing table, thereby realizing the application effect of simultaneously synchronizing the same scanned code data to multiple independent different systems on the same terminal device; in this embodiment, the synchronization data routing table is preferably set to include multiple synchronization routing information, and the synchronization routing information includes a system number and a corresponding serial port number; correspondingly, the steps of constructing the synchronization data routing table include:
[0057] When the installation of the local cash register system and each third-party information collection system is completed, multiple virtual serial ports are created on the terminal device, and the local cash register system and each third-party information collection system are respectively bound to a virtual serial port to generate a corresponding synchronization data routing table; wherein, the number of virtual serial ports created on the terminal device can be determined according to actual application requirements. In this embodiment, it is preferred to create them according to the total number of local cash register systems and third-party information collection systems that need to be run simultaneously on the terminal device; the specific virtual serial port creation can be created by calling the serial port communication development architecture, or by using an existing virtual serial port creation software application, which is not specifically limited here.
[0058] After obtaining the system number to be synchronized and the corresponding data to be synchronized by the above method, the serial port to which the data to be synchronized needs to be distributed can be determined by searching the synchronization data routing table according to the system number, thereby realizing accurate and efficient synchronization of different data of multiple systems; specifically, the step of synchronizing the data to be synchronized to the corresponding system to be synchronized according to the system number to be synchronized and the pre-constructed synchronization data routing table includes:
[0059] According to the numbers of the systems to be synchronized, the synchronization data routing table is traversed to obtain the numbers of the serial ports to be synchronized corresponding to the systems to be synchronized;
[0060] The data to be synchronized corresponding to each system number to be synchronized are written into the input buffer area of the corresponding serial port number to be synchronized; wherein, after the data to be synchronized is written into the input buffer area of the corresponding serial port, the local cash register system or third-party information collection system bound to the serial port will read the data in the input buffer area in real time to update the system-related data. At this point, it is realized that a code scanning device and a terminal device can cooperate with each other to filter and process the scanned code data according to certain synchronization rules and synchronize it to multiple systems on a terminal device.
[0061] The embodiment of the present application provides a method for obtaining scanned code information through a scanned code device, converting the scanned code information into corresponding data synchronization information according to preset data synchronization rules and preset communication protocols, and transmitting the data synchronization information to a terminal device that simultaneously installs a local cash register system running in the foreground and at least one third-party information collection system running in the background, and when the login of the local cash register system and each third-party information collection system is enabled, the data synchronization information is received and parsed by the terminal device to obtain the system number to be synchronized and the corresponding data to be synchronized, and a solution for synchronizing the data to be synchronized to the corresponding system to be synchronized according to the system number to be synchronized and a pre-constructed synchronization data routing table, and the data synchronization rule setting and communication protocol data format construction on the scanned code device end are used. , cooperate with the virtual serial port and synchronous data routing table on the terminal device to realize the simultaneous distribution of multi-system data, effectively solving the application defect that existing brand retailers cannot realize the simultaneous entry of data required by the local cash register system and the third-party information collection system in a simple, efficient and low-cost manner. It can not only realize the efficient, comprehensive, accurate and secure synchronization of sales data between the local cash register system and multiple third-party information collection systems running on the same terminal device based on only one scan code information, but also facilitate brand retailers to manage the sales of all goods, and provide reliable guarantees for each brand to obtain brand product sales information in a timely manner for market demand analysis and market price chaos supervision, and can effectively save brand retailers' equipment occupancy and staffing and other store opening costs.
[0062] It should be noted that although the steps in the above flowchart are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders.
[0063] In one embodiment, Figure 2 As shown, a single-terminal multi-system synchronization device for code scanning data is provided, the synchronization device includes a code scanning device and a terminal device; the terminal device is simultaneously installed with a local cash register system running at the front desk and at least one third-party information collection system running at the back desk;
[0064] The code scanning device 1 is used to obtain code scanning information, convert the code scanning information into corresponding data synchronization information according to a preset data synchronization rule and a preset communication protocol, and transmit the data synchronization information to the terminal device;
[0065] The terminal device 2 is used to receive and parse the data synchronization information in response to the login activation of the local cash register system and each third-party information collection system, obtain the system number to be synchronized and the corresponding data to be synchronized, and synchronize the data to be synchronized to the corresponding system to be synchronized according to the system number to be synchronized and the pre-built synchronization data routing table.
[0066] In one embodiment, the terminal device 2 is also used to create multiple virtual serial ports on the terminal device after the installation of the local cash register system and each third-party information collection system is completed, and to bind the local cash register system and each third-party information collection system to a corresponding virtual serial port respectively, and generate a corresponding synchronization data routing table.
[0067] For the specific definition of the single-terminal multi-system synchronization device for code scanning data, please refer to the definition of the single-terminal multi-system synchronization method for code scanning data above, and the corresponding technical effects can also be obtained equivalently, which will not be repeated here. Each module in the above-mentioned single-terminal multi-system synchronization device for code scanning data can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0068] In summary, the embodiment of the present invention provides a single-terminal multi-system synchronization method and a synchronization device for scanned code data. The single-terminal multi-system synchronization method for scanned code data realizes obtaining scanned code information through a scanned code device, converting the scanned code information into corresponding data synchronization information according to preset data synchronization rules and preset communication protocols, and transmitting the data synchronization information to a terminal device that simultaneously installs a local cash register system running in the foreground and at least one third-party information collection system running in the background, and when the login of the local cash register system and each third-party information collection system is enabled, the data synchronization information is received and parsed by the terminal device to obtain the system number to be synchronized and the corresponding data to be synchronized, as well as the system number to be synchronized and the pre-constructed synchronization data routing table. A technical solution for synchronizing the data to be synchronized to the corresponding system to be synchronized. The method realizes simultaneous synchronous distribution of multi-system data by setting data synchronization rules on the code scanning device and constructing the communication protocol data format, in conjunction with the virtual serial port and synchronous data routing table on the terminal device. It can not only realize efficient, comprehensive, accurate and secure synchronization of sales data between the local cash register system running on the same terminal device and multiple third-party information collection systems based on only one code scanning information, but also facilitate brand retailers to manage the sales of all goods, and provide reliable guarantees for each brand to obtain brand product sales information in a timely manner for market demand analysis and market price chaos supervision, and can effectively save brand retailers' store opening costs such as equipment occupancy and staffing.
[0069] Each embodiment in this specification is described in a progressive manner, and the same or similar parts of each embodiment can be directly referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. It should be noted that the technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0070] The above-mentioned embodiments only express several preferred implementation modes of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in the technical field, several improvements and substitutions can be made without departing from the technical principles of the present invention, and these improvements and substitutions should also be regarded as the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be based on the protection scope of the claims.
Claims
1. A single-terminal multi-system synchronization method for scanned code data, characterized in that: The method comprises the following steps: The code scanning information is obtained through the code scanning device, and the code scanning information is converted into corresponding data synchronization information according to the preset data synchronization rules and the preset communication protocol, and the data synchronization information is transmitted to the terminal device; the terminal device is simultaneously installed with a local cash register system running at the front desk and at least one third-party information collection system running at the back desk; the data encapsulation structure of the preset communication protocol includes a data frame header, a data length, a data content and a check field in sequence; the data content includes a plurality of data segments arranged in sequence; the data segment includes a system number to be synchronized and the corresponding data to be synchronized; In response to the login activation of the local cash register system and each third-party information collection system, the data synchronization information is received and parsed by the terminal device to obtain the system number to be synchronized and the corresponding data to be synchronized, and the data to be synchronized is synchronized to the corresponding system to be synchronized according to the system number to be synchronized and a pre-built synchronization data routing table; the system to be synchronized includes a local cash register system running in the foreground on the same terminal device and at least one third-party information collection system running in the background; The synchronous data routing table includes multiple synchronous routing information; the synchronous routing information includes a system number and a corresponding serial port number; the steps of constructing the synchronous data routing table include: When the installation of the local cash register system and each third-party information collection system is completed, multiple virtual serial ports are created on the terminal device, and the local cash register system and each third-party information collection system are respectively bound to a virtual serial port, and a corresponding synchronous data routing table is generated; The step of synchronizing the data to be synchronized to the corresponding system to be synchronized according to the system number to be synchronized and the pre-constructed synchronization data routing table comprises: According to the numbers of the systems to be synchronized, the synchronization data routing table is traversed to obtain the numbers of the serial ports to be synchronized corresponding to the systems to be synchronized; The data to be synchronized corresponding to each system number to be synchronized are respectively written into the input buffer area corresponding to the serial port number to be synchronized.
2. The single-terminal multi-system synchronization method for scanned code data according to claim 1, characterized in that: The scanned code information includes commodity basic data and commodity payment data; the commodity basic data includes commodity basic information, sales quantity and sales price; the commodity basic information includes commodity name, commodity category, commodity number and commodity supplier; The step of converting the scan code information into corresponding data synchronization information according to the preset data synchronization rule and the preset communication protocol includes: When the scanned code information is the commodity basic data, a third-party information collection directory is obtained, the commodity basic information in the commodity basic data is matched with the third-party information collection directory, and corresponding data synchronization information is generated according to the corresponding matching result and the data encapsulation structure; When the code scanning information data is the commodity payment data, the code scanning information is packaged according to the data packaging structure and the system number of the local cash register system to obtain corresponding data synchronization information.
3. The single-terminal multi-system synchronization method for scanned code data according to claim 2, characterized in that: The step of generating corresponding data synchronization information according to the corresponding matching result and the data encapsulation structure includes: Combine the system number of the local cashier system and the code scanning information to obtain a cashier synchronization data segment, and determine whether the matching result is a matching item; When the matching result is that there are matching items, respectively obtaining the to-be-synchronized system numbers and to-be-synchronized data items corresponding to the matching items, and combining the to-be-synchronized system numbers and the corresponding to-be-synchronized data items to obtain the corresponding three-party synchronization data segments, and according to the data encapsulation structure, sequentially encapsulating the cashier synchronization data segment and the three-party synchronization data segments to obtain the data synchronization information; When the matching result is that there is no matching item, the cashier synchronization data segment is encapsulated according to the data encapsulation structure to obtain the data synchronization information.
4. The single-terminal multi-system synchronization method for scanned code data according to claim 1, characterized in that: The step of transmitting the data synchronization information to the terminal device comprises: The data synchronization information is encrypted according to a preset encryption method, and the encrypted data synchronization information is transmitted to the terminal device.
5. The single-terminal multi-system synchronization method for scanned code data according to claim 1, characterized in that: The receiving and parsing of the data synchronization information by the terminal device to obtain the system number to be synchronized and the corresponding data to be synchronized includes: According to the data encapsulation structure, a security check is performed on the data synchronization information to obtain a corresponding check result; When the verification result is that the verification is passed, the data content of the data synchronization information is analyzed in sequence to obtain the system number to be synchronized and the corresponding data to be synchronized; When the verification result is verification failure, the data synchronization information is directly discarded.
6. A single-terminal multi-system synchronization device for scanned code data, characterized in that: The synchronization device includes a code scanning device and a terminal device; the terminal device is simultaneously installed with a local cash register system running at the front desk and at least one third-party information collection system running at the back desk; The code scanning device is used to obtain the code scanning information, convert the code scanning information into corresponding data synchronization information according to the preset data synchronization rule and the preset communication protocol, and transmit the data synchronization information to the terminal device; the data encapsulation structure of the preset communication protocol includes a data frame header, a data length, a data content and a check field in sequence; the data content includes a plurality of data segments arranged in sequence; The data segment includes a system number to be synchronized and corresponding data to be synchronized; The terminal device is used to receive and parse the data synchronization information in response to the login activation of the local cash register system and each third-party information collection system, obtain the system number to be synchronized and the corresponding data to be synchronized, and synchronize the data to be synchronized to the corresponding system to be synchronized according to the system number to be synchronized and a pre-built synchronization data routing table; the system to be synchronized includes a local cash register system running in the foreground and at least one third-party information collection system running in the background on the same terminal device; the synchronization data routing table includes multiple synchronization routing information; the synchronization routing information includes a system number and a corresponding serial port number; The terminal device is further used to create multiple virtual serial ports on the terminal device after the installation of the local cash register system and each third-party information collection system is completed, and bind the local cash register system and each third-party information collection system to a virtual serial port respectively, and generate a corresponding synchronous data routing table; The step of synchronizing the data to be synchronized to the corresponding system to be synchronized according to the system number to be synchronized and the pre-built synchronization data routing table includes: According to the numbers of the systems to be synchronized, the synchronization data routing table is traversed to obtain the numbers of the serial ports to be synchronized corresponding to the systems to be synchronized; The data to be synchronized corresponding to each system number to be synchronized are respectively written into the input buffer area corresponding to the serial port number to be synchronized.
Citation Information
Patent Citations
Merchant service portal applications interface systems and methods
US20080189184A1