Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a smart city big data management platform based on an intelligent bar code scale,
The aim of the invention can be achieved by the following technical scheme:
Establishing communication connection between the intelligent bar code scale and a remote on-line management platform; the remote online management platform comprises a shopping module, a merchant management module, a third party distribution module and a background data management module; the intelligent bar code scale comprises a storage memory unit, an AI identification module and a weighing sensor;
The remote online management platform receives commodity weight information, commodity real photos and commodity data obtained in real time by the intelligent bar code scale, and the commodity real photos and the commodity data are shot and uploaded by an AI identification module on the intelligent bar code scale;
The third-party distribution module receives the distribution task sent by the shopping module and distributes the distribution task to a distribution personnel scheduling system;
The merchant management module is used for carrying out multi-source heterogeneous integration on the data transmitted to the remote online management platform by the intelligent bar code scale and merchant management information;
The background data management module is used for storing and managing the data information generated by the shopping module, the merchant management module and the third-party distribution module.
Specifically, the AI identification module specifically includes:
Presetting commodity category attributes and corresponding standard commodity images, performing nonlinear filtering treatment on the commodity real photos to remove image noise and obtain a comparison source image, wherein the calculation formula is as follows:
,
Wherein f (x, y) is a contrast source image, w is the size of the image, wb is the size of the filter window, Gd is a spatial domain gaussian filter function, Gr is a gray domain gaussian filter function, p (x, y) is a pixel point with a gray value of h0 in the image f (x, y), and p0(x0,y0) is a pixel point with a gray value of h in the image f (x, y);
extracting edge characteristics of the contrast source image by using an edge detection algorithm, and classifying the extracted edge characteristics to obtain a recognition classification result;
performing feature detection on the contrast source image and the standard commodity image to obtain corresponding local feature points, wherein the feature detection is used for judging pixels of the image through matrix judgment to obtain the local feature points;
Constructing a neighborhood circle according to the local feature points, constructing a geometric moment feature model according to gray information of the contrast source image, calculating geometric moment features in the neighborhood circle through the geometric moment feature model, and integrating the geometric moment features into local feature vectors;
And calculating the Euclidean measurement distance of the characteristic points of the contrast source image and the standard commodity image through the local characteristic vector, presetting a characteristic similarity threshold, and uploading the identification classification result and the original commodity real photo corresponding to the contrast source image to the remote online management platform if the Euclidean measurement distance of the characteristic points is larger than the characteristic similarity threshold.
Specifically, the method for acquiring commodity weight information comprises the following steps: the user is connected to the shopping module in the remote online management platform through the mobile terminal, the user selects a merchant according to personal requirements and places an order, the remote online management platform generates order information according to the order placing information, the merchant obtains the order information through the merchant management module in the remote online management platform and places commodities on the intelligent bar code scale according to the order information, and the intelligent bar code scale measures commodity weight information according to a weighing sensor in a scale body structure and uploads the commodity weight information to the remote online management platform through a serial port communication interface.
Specifically, the distinguishing mode of the local feature points is as follows:
if the matrix discriminant corresponding to the pixel points of the image is greater than 0, the pixel points are the local feature points, and the matrix discriminant is:
,
Wherein Det (H) is a matrix discriminant result, Lxx is a second derivative of the gaussian scale space of the image to the x direction, Lyy is a second derivative of the gaussian scale space of the image to the y direction, Lxy is a first derivative of the gaussian scale space of the image to the gray level difference of adjacent pixels in the x direction, and x and y are pixel point coordinates.
Specifically, the commodity data comprise unit price, production place and quality guarantee period of the commodity, and the unit price, production place and quality guarantee period are recorded by a merchant and stored in a storage memory unit in the intelligent bar code scale.
Specifically, the delivery task comprises a delivery address, commodity information and a merchant address; the delivery address, the commodity information and the merchant address are obtained according to the order information.
Specifically, the dispatching personnel dispatching system is used for receiving the dispatching task and managing working time, working state and real-time position information of the dispatching personnel; and carrying out intelligent scheduling planning according to the distribution task, the working time, the working state and the real-time position information.
Specifically, the multi-source heterogeneous integration method comprises the following steps: the data of the intelligent bar code scale transmitted to the remote online management platform and the data file of merchant management information are stored in a temporary storage area, the data stored in the temporary storage area is analyzed into a document tree through a document object model, and the sub-node information in the document tree is read to extract the attribute and the value of a data field; setting a periodically triggered timing task and acquiring system increment information, automatically scanning a platform database through the timing task, judging system newly-added data by adopting a time stamp if a time dimension attribute exists in the platform database, judging the system newly-added data by utilizing a main key value of the platform database if the time dimension attribute exists or a time stamp field cannot be acquired, and carrying out increment updating on the platform database according to the system newly-added data.
The beneficial effects of the invention are as follows:
The method of combining the traditional bar code recognition algorithm with the AI recognition algorithm is adopted, the bar codes in the images are primarily recognized through the bar code recognition algorithm, the similarity processing is carried out on the real data of the commodity and the preset standard images, and then the recognition result is uploaded, so that the real source of the data is ensured, and meanwhile, the reliability is improved; the remote online platform is connected with the intelligent bar code scale through communication, so that an automatic recognition and printing bar code system is constructed, automatic recognition and intelligent management of commodity information are realized, a large amount of commodity information can be processed and analyzed efficiently, the application of bar code recognition technology and intelligent big data management platform in commodity circulation and information management is further promoted, and the digital and intelligent development of related industries is promoted.
Detailed Description
In order to further describe the technical means and effects adopted by the invention for achieving the preset aim, the following detailed description is given below of the specific implementation, structure, characteristics and effects according to the invention with reference to the attached drawings and the preferred embodiment.
Referring to fig. 1, a smart city big data management platform based on an intelligent barcode scale:
Establishing communication connection between the intelligent bar code scale and a remote on-line management platform; the remote online management platform comprises a shopping module, a merchant management module, a third party distribution module and a background data management module; the intelligent bar code scale comprises a storage memory unit, an AI identification module and a weighing sensor;
The remote online management platform receives commodity weight information, commodity real photos and commodity data obtained in real time by the intelligent bar code scale, and the commodity real photos and the commodity data are shot and uploaded by an AI identification module on the intelligent bar code scale;
The third-party distribution module receives the distribution task sent by the shopping module and distributes the distribution task to a distribution personnel scheduling system;
The merchant management module is used for carrying out multi-source heterogeneous integration on the data transmitted to the remote online management platform by the intelligent bar code scale and merchant management information;
The background data management module is used for storing and managing the data information generated by the shopping module, the merchant management module and the third-party distribution module.
Specifically, the AI identification module specifically includes:
Presetting commodity category attributes and corresponding standard commodity images, performing nonlinear filtering treatment on the commodity real photos to remove image noise and obtain a comparison source image, wherein the calculation formula is as follows:
,
Wherein f (x, y) is a contrast source image, w is the size of the image, wb is the size of the filter window, Gd is a spatial domain gaussian filter function, Gr is a gray domain gaussian filter function, p (x, y) is a pixel point with a gray value of h0 in the image f (x, y), and p0(x0,y0) is a pixel point with a gray value of h in the image f (x, y);
extracting edge characteristics of the contrast source image by using an edge detection algorithm, and classifying the extracted edge characteristics to obtain a recognition classification result;
performing feature detection on the contrast source image and the standard commodity image to obtain corresponding local feature points, wherein the feature detection is used for judging pixels of the image through matrix judgment to obtain the local feature points;
Constructing a neighborhood circle according to the local feature points, constructing a geometric moment feature model according to gray information of the contrast source image, calculating geometric moment features in the neighborhood circle through the geometric moment feature model, and integrating the geometric moment features into local feature vectors;
And calculating the Euclidean measurement distance of the characteristic points of the contrast source image and the standard commodity image through the local characteristic vector, presetting a characteristic similarity threshold, and uploading the identification classification result and the original commodity real photo corresponding to the contrast source image to the remote online management platform if the Euclidean measurement distance of the characteristic points is larger than the characteristic similarity threshold.
In the embodiment, aiming at the problems of image preprocessing, feature extraction and matching, error correction and the like in the barcode recognition and feature processing process, gaussian filtering is adopted to perform noise reduction processing, so that noise interference in an image is effectively reduced, and the definition of the image is improved. Meanwhile, the binarization processing is carried out by adopting the self-adaptive threshold segmentation technology, and the bar code area is accurately extracted. The image is processed by adopting an edge detection algorithm to extract the edge characteristics of the bar code, and noise can be well restrained while the edge integrity is maintained, so that the processing effect on the bar code image is optimal. And a linear regression model is introduced to correct the perpendicularity of the bar code, so that the accuracy and stability of feature extraction are improved. And a support vector machine is adopted as a classifier to learn and classify the extracted bar code features. And correcting the bar code image through the rotation matrix and affine transformation, so as to ensure that all images are identified under a unified reference.
Specifically, the method for acquiring commodity weight information comprises the following steps: the user is connected to the shopping module in the remote online management platform through the mobile terminal, the user selects a merchant according to personal requirements and places an order, the remote online management platform generates order information according to the order placing information, the merchant obtains the order information through the merchant management module in the remote online management platform and places commodities on the intelligent bar code scale according to the order information, and the intelligent bar code scale measures commodity weight information according to a weighing sensor in a scale body structure and uploads the commodity weight information to the remote online management platform through a serial port communication interface.
Specifically, the distinguishing mode of the local feature points is as follows:
if the matrix discriminant corresponding to the pixel points of the image is greater than 0, the pixel points are the local feature points, and the matrix discriminant is:
,
Wherein Det (H) is a matrix discriminant result, Lxx is a second derivative of the gaussian scale space of the image to the x direction, Lyy is a second derivative of the gaussian scale space of the image to the y direction, Lxy is a first derivative of the gaussian scale space of the image to the gray level difference of adjacent pixels in the x direction, and x and y are pixel point coordinates.
Specifically, the commodity data comprise unit price, production place and quality guarantee period of the commodity, and the unit price, production place and quality guarantee period are recorded by a merchant and stored in a storage memory unit in the intelligent bar code scale.
Specifically, the delivery task comprises a delivery address, commodity information and a merchant address; the delivery address, the commodity information and the merchant address are obtained according to the order information.
Specifically, the dispatching personnel dispatching system is used for receiving the dispatching task and managing working time, working state and real-time position information of the dispatching personnel; and carrying out intelligent scheduling planning according to the distribution task, the working time, the working state and the real-time position information.
Specifically, the multi-source heterogeneous integration method comprises the following steps: the data of the intelligent bar code scale transmitted to the remote online management platform and the data file of merchant management information are stored in a temporary storage area, the data stored in the temporary storage area is analyzed into a document tree through a document object model, and the sub-node information in the document tree is read to extract the attribute and the value of a data field; setting a periodically triggered timing task and acquiring system increment information, automatically scanning a platform database through the timing task, judging system newly-added data by adopting a time stamp if a time dimension attribute exists in the platform database, judging the system newly-added data by utilizing a main key value of the platform database if the time dimension attribute exists or a time stamp field cannot be acquired, and carrying out increment updating on the platform database according to the system newly-added data.
In this embodiment, the system adopts a three-layer architecture mode, which is divided into a presentation layer, a service logic layer and a data access layer. The presentation layer is responsible for the interaction between the user and the system, and the construction and interaction of the user interface are realized through the front end framework Vue. Js and the Element UI component library. The service logic layer processes the core logic and functions of the system, simplifies development work by utilizing a Spring Boot frame, and uses ZXing open source library to perform bar code identification. The data access layer is responsible for interacting with the database and uses SPRING DATA JPA to perform data operations. Specifically, the presentation layer employs a combination of Vue. Js and Element UI to implement a responsive user interface. The business logic layer can quickly build an independently-running Java-based enterprise-level application program through a Spring Boot. The bar code recognition module adopts ZXing open source library, which is a high-efficiency bar code image processing library and supports the analysis and generation of one-dimensional and two-dimensional bar codes. The accuracy and speed of bar code recognition can be improved by combining a self-defined image preprocessing algorithm, such as graying and binarization. The data access layer uses MySQL database and combines SPRING DATA JPA to realize data persistence and inquiry. SPRING DATA JPA provides a convenient repositive interface, and performs data adding, deleting and modifying operation in a concise mode. In terms of database design, bar code information table, equipment information table and merchant management table are main table structures. The bar code information table is used for recording basic information of bar codes, such as bar code ID, type, generation time, state and the like; the equipment information table contains information such as ID, model, running state and the like of equipment; the merchant management table is used for storing basic information and authority settings of merchants.
The computer storage media of embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing. Computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The present invention is not limited in any way by the above-described preferred embodiments, but is not limited to the above-described preferred embodiments, and any person skilled in the art will appreciate that the present invention can be embodied in the form of a program for carrying out the method of the present invention, while the above disclosure is directed to equivalent embodiments capable of being altered or modified in a slight manner, any and all concise modifications, equivalent variations and alterations of the above embodiments are still within the scope of the present disclosure, all as may be made without departing from the scope of the present disclosure.