Cigarette Equipment Management Method, Device, Electronic Equipment and Medium Based on QR Code
By generating and processing equipment QR codes, the problem of low efficiency in cigarette equipment management is solved, standardized and efficient management of equipment management is realized, and query rate and maintenance accuracy are improved.
Patent Information
- Application Number
- CN202211452364.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-21
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2042-11-21
AI Technical Summary
Modern cigarette factories have many types of equipment, high degree of informatization, large maintenance workload, and difficult to achieve standardized operations, resulting in low equipment management efficiency.
By uniquely identifying cigarette equipment, generating equipment QR codes, performing image preprocessing and subject classification, establishing the associated storage of QR codes and equipment data, and decoding and updating based on the updated information, standardization and efficient management of equipment management are realized.
It improves the efficiency and query rate of cigarette equipment management, accurately manage equipment, enhances employees' familiarity with equipment structure and operating procedures, and creates a good learning atmosphere.
Smart Images

Figure CN115860023B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a cigarette equipment management method, device, electronic device and medium based on two-dimensional codes. Background Art
[0002] In the modern cigarette factory's silk reeling workshop, there are many types and models of equipment, high informatization level, large workload of maintenance, and after the standardization is revised, there are many standard documents, which are scattered and paper documents are not convenient to carry. How to effectively and conveniently achieve standardized operation, normative maintenance and timeliness control, so as to promote the improvement of process quality, is an urgent task for process quality personnel. Therefore, how to improve the management efficiency of cigarette equipment has become an urgent problem to be solved. Summary of the Invention
[0003] The present invention provides a cigarette equipment management method, device and medium based on two-dimensional codes, and its main purpose is to solve the problem of low efficiency in cigarette equipment management.
[0004] To achieve the above object, a cigarette equipment management method based on two-dimensional codes provided by the present invention includes:
[0005] Uniquely identify the cigarette equipment to obtain the equipment label of the cigarette equipment, and generate the equipment two-dimensional code of the cigarette equipment one by one according to the equipment label;
[0006] Perform image preprocessing on the equipment two-dimensional code to obtain the standard two-dimensional code of the equipment two-dimensional code;
[0007] Obtain the historical data of the cigarette equipment, classify the historical data by theme to obtain the theme data of the historical data;
[0008] Perform theme configuration on a preset blank two-dimensional code interface according to the theme data to obtain a first-level two-dimensional code interface;
[0009] Establish an associated storage of the standard two-dimensional code and the theme data by using the first-level two-dimensional code interface to obtain the data file of the cigarette equipment;
[0010] Obtain the update information of the cigarette equipment at a preset time, decode the standard two-dimensional code to obtain the parsed two-dimensional code of the standard two-dimensional code, and complete the data update of the cigarette equipment according to the parsed two-dimensional code and the update information.
[0011] Optionally, the generating the equipment two-dimensional code of the cigarette equipment one by one according to the equipment label includes:
[0012] Generate the coding information of the cigarette-making equipment one by one according to the equipment labels, and perform data coding on the coding information according to a preset coding rule to obtain the initial data structure of the cigarette-making equipment;
[0013] Perform error correction coding on the initial data structure to obtain the two-dimensional code data structure of the initial data structure;
[0014] Generate a template arrangement of the cigarette-making equipment by using the two-dimensional code data structure, and perform masking processing on the template arrangement to obtain the equipment two-dimensional code of the cigarette-making equipment.
[0015] Optionally, the image preprocessing of the equipment two-dimensional code to obtain the standard two-dimensional code of the equipment two-dimensional code includes:
[0016] Perform image grayscale processing on the equipment two-dimensional code to obtain a black-and-white two-dimensional code of the equipment two-dimensional code;
[0017] Perform image binarization processing on the black-and-white two-dimensional code to obtain the standard two-dimensional code of the black-and-white two-dimensional code.
[0018] Optionally, the image binarization processing of the black-and-white two-dimensional code to obtain the standard two-dimensional code of the black-and-white two-dimensional code includes:
[0019] Establish a two-dimensional code coordinate system of the black-and-white two-dimensional code, and select one point in the two-dimensional code coordinate system as the target coordinate point;
[0020] Obtain the central neighborhood of the target coordinate point with the target coordinate point as the center, and obtain the target gray value of the target coordinate point;
[0021] Calculate the neighborhood gray value of the central neighborhood by using the following neighborhood gray algorithm and the target gray value:
[0022]
[0023] where m(x, y) is the neighborhood gray value of the central neighborhood, r is the dimension of the central neighborhood, x is the abscissa of the target coordinate point, y is the ordinate of the target coordinate point, g(i, j) is the gray value of the neighborhood coordinate point in the central neighborhood, i is the abscissa of the neighborhood coordinate point, and j is the ordinate of the neighborhood coordinate point;
[0024] Generate the neighborhood standard variance of the target neighborhood according to the neighborhood gray value and the target gray value, and calculate the pixel threshold of each neighborhood coordinate point in the central neighborhood by using the neighborhood standard variance and the neighborhood gray value;
[0025] Binarize each pixel point in the black-and-white QR code according to the pixel threshold to obtain the standard QR code of the black-and-white QR code.
[0026] Optionally, the image binarization process on the black-and-white QR code to obtain the standard QR code of the black-and-white QR code includes:
[0027] Divide the black-and-white QR code into blocks according to a preset block ratio to obtain multiple QR code blocks of the black-and-white QR code, and select one of the QR code blocks in the QR code blocks as the target block one by one;
[0028] Calculate the grayscale mean value of the target block using the following grayscale mean value algorithm:
[0029]
[0030] where m(e,f) is the grayscale mean value of the target block, e is the abscissa of the target block, f is the ordinate of the target block, g(a,b) is the grayscale value of each pixel point in the target block, a is the abscissa of each pixel point in the target block, b is the ordinate of each pixel point in the target block, h′ is the number of pixel points selected on the abscissa, v′ is the number of pixel points selected on the ordinate, h is the length of the target block, and v is the width of the target block;
[0031] Determine the target pixel point of the target block according to the preset pixel point selection rule, and generate the pixel standard deviation of the target pixel point;
[0032] Calculate the block threshold of the target block according to the pixel standard deviation, and binarize each QR code block in the black-and-white QR code one by one according to the block threshold to obtain the standard QR code of the black-and-white QR code.
[0033] Optionally, the theme configuration of the preset blank QR code interface according to the theme data to obtain the primary QR code interface includes:
[0034] Configure the associated form module for the preset blank QR code interface to obtain the initial interface of the blank QR code interface;
[0035] Configure the device information module for the initial interface to obtain the intermediate interface of the initial interface;
[0036] Configure the device maintenance module for the intermediate interface to obtain the primary QR code interface of the intermediate interface.
[0037] Optionally, the decoding of the standard QR code to obtain the parsed QR code of the standard QR code includes:
[0038] Locate the decoding area of the standard QR code to obtain the light and dark areas of the standard QR code;
[0039] Generate the format version of the standard QR code according to the light and dark areas, and perform demasking processing on the format version using a preset mask pattern to obtain the standard version of the format version;
[0040] Perform decoding processing on the standard version using the encoding rule to obtain the decoded version of the standard version;
[0041] Perform error correction processing on the decoded version to obtain the parsed QR code of the decoded version.
[0042] To solve the above problems, the present invention also provides a cigarette equipment management device based on QR codes, and the device includes:
[0043] A QR code generation module, configured to uniquely identify a cigarette device to obtain a device label of the cigarette device, and generate a device QR code of the cigarette device one by one according to the device label;
[0044] A QR code preprocessing module, configured to perform image preprocessing on the device QR code to obtain a standard QR code of the device QR code;
[0045] A data theme classification module, configured to obtain historical data of the cigarette device, perform theme classification on the historical data to obtain theme data of the historical data;
[0046] An interface theme configuration module, configured to perform theme configuration on a preset blank QR code interface according to the theme data to obtain a first-level QR code interface;
[0047] An associated storage module, configured to establish an associated storage of the standard QR code and the theme data using the first-level QR code interface to obtain a data file of the cigarette device;
[0048] A data update module, configured to obtain update information of the cigarette device at a preset time, decode the standard QR code to obtain a parsed QR code of the standard QR code, and complete the data update of the cigarette device according to the parsed QR code and the update information.
[0049] To solve the above problems, the present invention also provides an electronic device, and the electronic device includes:
[0050] At least one processor; and,
[0051] A memory communicatively connected to the at least one processor; wherein,
[0052] The memory stores a computer program that can be executed by the at least one processor. When the computer program is executed by the at least one processor, the at least one processor is enabled to execute the above-mentioned cigarette equipment management method based on two-dimensional codes.
[0053] To solve the above problems, the present invention also provides a medium that stores at least one computer program. When the at least one computer program is executed by a processor in an electronic device, the above-mentioned cigarette equipment management method based on two-dimensional codes is implemented.
[0054] In the embodiments of the present invention, each cigarette equipment is uniquely identified one by one, and a device two-dimensional code corresponding to the identified cigarette equipment is generated, establishing a one-to-one correspondence between the device two-dimensional code and the cigarette equipment. Image preprocessing is performed on the two-dimensional code because the recognition of two-dimensional codes plays an important role in cigarette recognition, which is directly related to the success of data storage and data update. During the process of two-dimensional code image acquisition, it is extremely vulnerable to the influence of complex environments such as abnormal lighting, and an image with uneven lighting is collected. At this time, image preprocessing must be performed. Subject classification is performed on the historical data of the obtained cigarette equipment, which is beneficial to the management and query of historical data, improving the management efficiency and query speed. The standard two-dimensional code is decoded, and the data update of the cigarette equipment is completed according to the generated parsed two-dimensional code. The equipment maintenance parts are intuitively displayed, the equipment management and maintenance management are refined, facilitating subsequent equipment maintenance, and creating a good learning atmosphere for employees, resulting in a large number of on-site browsing and consultation times, enhancing the familiarity and mastery of equipment structure, operating procedures, parameter indicators, etc. Therefore, the present invention proposes a cigarette equipment management method, device, electronic device, and medium based on two-dimensional codes, which can solve the problem of low management efficiency of cigarette equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 It is a flowchart of a cigarette equipment management method based on two-dimensional codes provided by an embodiment of the present invention;
[0056] Figure 2 It is a flowchart of generating a device two-dimensional code provided by an embodiment of the present invention;
[0057] Figure 3 It is a flowchart of interface theme configuration provided by an embodiment of the present invention;
[0058] Figure 4 It is a functional module diagram of a cigarette equipment management device based on two-dimensional codes provided by an embodiment of the present invention;
[0059] Figure 5 It is a structural diagram of an electronic device for implementing the cigarette equipment management method based on two-dimensional codes provided by an embodiment of the present invention.
[0060] The realization, functional features and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. Specific embodiments
[0061] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0062] The embodiments of the present application provide a cigarette equipment management method based on two-dimensional codes. The execution subjects of the cigarette equipment management method based on two-dimensional codes include, but are not limited to, at least one of electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiments of the present application. In other words, the cigarette equipment management method based on two-dimensional codes can be executed by software or hardware installed on a terminal device or a server device. The server includes, but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms.
[0063] Refer to Figure 1 As shown, it is a flowchart of the cigarette equipment management method based on two-dimensional codes provided by an embodiment of the present invention. In this embodiment, the cigarette equipment management method based on two-dimensional codes includes:
[0064] S1. Uniquely identify the cigarette equipment to obtain the equipment label of the cigarette equipment, and generate the equipment two-dimensional code of the cigarette equipment one by one according to the equipment label.
[0065] In the embodiment of the present invention, since there are many types and models of cigarette equipment in the cigarette factory's silk reeling workshop, it is necessary to uniquely identify the cigarette equipment, which can well distinguish and manage the cigarette equipment.
[0066] Specifically, the unique identification is to label the equipment label on the cigarette equipment. For example, the first cigarette equipment on the right hand side when entering the door is equipment No. 1, and the cigarette equipment next to equipment No. 1 is equipment No. 2, and so on. All the cigarette equipment in the workshop can be identified to obtain the equipment labels of all the cigarette equipment.
[0067] In the embodiment of the present invention, refer Figure 2 As shown, the generating the equipment two-dimensional code of the cigarette equipment one by one according to the equipment label includes:
[0068] S21. Generate the coding information of the cigarette equipment one by one according to the equipment label, and perform data coding on the coding information according to a preset coding rule to obtain the initial data structure of the cigarette equipment;
[0069] S22. Perform error correction coding on the initial data structure to obtain the two-dimensional code data structure of the initial data structure;
[0070] S23. Generate a template arrangement of the cigarette equipment by using the two-dimensional code data structure, and perform masking processing on the template arrangement to obtain the equipment two-dimensional code of the cigarette equipment.
[0071] Specifically, compared with one-dimensional barcodes, the equipment two-dimensional code has a more powerful data storage capacity. It not only has a large data storage capacity but also can store more data types. In addition, the two-dimensional code also has strong self-error correction ability and high stability.
[0072] Specifically, the coding information is the character type of the coding content. The character types include numbers, 8-bit bytes, alphanumerics, Chinese characters, etc. The equipment two-dimensional code supports combinations between multiple modes, and can conveniently encode coding information mixed with multiple types. Each mode corresponds to an indicator. For example, the indicator corresponding to the extended interpretation module is 0111, the indicator corresponding to numbers is 0001, and the indicator corresponding to alphanumerics is 0010.
[0073] Further, the preset coding rule is to obtain a data structure composed of the multiple modes. For example, the elements in the preset coding rule are, in sequence, mode indicator, character count indicator, data, mode indicator, etc. Among them, taking the digital mode coding as an example: translate every 3-bit original data information into a 10-bit binary bit stream in sequence. If the length of the coded data is not an integer multiple of 3, then translate the last remaining 1 bit or 2 bits into a 4-bit or 7-bit binary. Suppose the input data is 34501267, the input data can be converted into binary data 0001 0000001000010101100100000011001000011.
[0074] Specifically, the error correction coding of the initial data structure can use the Reed-Solomon error correction coding algorithm of the equipment two-dimensional code to generate corresponding error correction code words, and perform error correction coding on the initial data structure according to the error correction operator.
[0075] Specifically, the masking processing is an exclusive OR bit operation on the coding area of the two-dimensional code according to the masking image in the national standard GB / T 18284-2000. The purpose of masking is to make the ratio of "black" and "white" squares appearing in the two-dimensional code image the most appropriate, and at the same time have fewer patterns similar to the two-dimensional code feature graphics.
[0076] S2. Perform image preprocessing on the device QR code to obtain the standard QR code of the device QR code.
[0077] In the embodiment of the present invention, the recognition of the QR code plays an important role in the cigarette recognition. It is directly related to whether the data storage and data update are successful. During the process of QR code image acquisition, it is extremely vulnerable to complex environments such as abnormal lighting, and an image with uneven lighting is collected. At this time, the image must be preprocessed.
[0078] In the embodiment of the present invention, the performing image preprocessing on the device QR code to obtain the standard QR code of the device QR code includes:
[0079] Perform image grayscale processing on the device QR code to obtain the black and white QR code of the device QR code;
[0080] Perform image binarization processing on the black and white QR code to obtain the standard QR code of the black and white QR code.
[0081] Specifically, the image grayscaling is the first step of QR code image preprocessing. The QR code reading device generally obtains a color image from a CMOS camera. Each pixel point of the color image is composed of the values of three channels, R, G, and B. Some graphics also have the value of the Alpha channel to represent the transparency. The QR code recognition is a process independent of the image color and is related to the brightness. The color image occupies a large storage space due to its rich colors, and the device also takes a long time to process. Compared with the color image, the grayscale image has a very small information capacity, and the color change range of the grayscale value is only 255 kinds. Grayscaling the color image solves this problem well. Because the QR code has only two colors, black and white, and there is no complex color transformation process. In addition, the color information has almost no impact on QR code recognition.
[0082] Specifically, a grayscaling algorithm with good real-time linear weighting can be used to perform grayscaling processing on the device QR code.
[0083] Further, the grayscaling algorithm is:
[0084]
[0085] where f is the grayscale value of the device QR code, R is the red value, G is the green value, B is the blue value, w R is the weighted ratio of red, w G is the weighted ratio of green, w B is the weighted ratio of blue.
[0086] Further, different weights can be given according to the sensitivity of the human eye to the three colors of red, green, and blue. For example, the following mathematical expression for weight ratio allocation can be used:
[0087] f = 0.30R + 0.59G + 0.11B
[0088] Specifically, the image binarization process is to compare the gray value of each pixel point in the image with the threshold value selected. If it is greater than the threshold value, the gray value of the point is set to 1, otherwise it is 0. The most core part of binarization is how to accurately select the most appropriate segmentation threshold for the image, because the choice of the threshold is the key to determining the success or failure of the entire image binarization. The purpose of binarization is to accurately select the important features of the image from the background. Due to the different application scenarios, the background environment is complex and variable during the process of the camera acquiring the image. Experts at home and abroad have conducted in-depth research on this and achieved a large number of research results.
[0089] Specifically, the image binarization process for the black and white two-dimensional code to obtain the standard two-dimensional code of the black and white two-dimensional code includes:
[0090] Establish a two-dimensional code coordinate system for the black and white two-dimensional code, and select one point in the two-dimensional code coordinate system as the target coordinate point;
[0091] Obtain the central neighborhood of the target coordinate point with the target coordinate point as the center, and obtain the target gray value of the target coordinate point;
[0092] Calculate the neighborhood gray value of the central neighborhood using the following neighborhood gray algorithm and the target gray value:
[0093]
[0094] where m(x, y) is the neighborhood gray value of the central neighborhood, r is the dimension of the central neighborhood, x is the abscissa of the target coordinate point, y is the ordinate of the target coordinate point, g(i, j) is the gray value of the neighborhood coordinate point in the central neighborhood, i is the abscissa of the neighborhood coordinate point, and j is the ordinate of the neighborhood coordinate point;
[0095] Generate the neighborhood standard variance of the target neighborhood according to the neighborhood gray value and the target gray value, and calculate the pixel threshold of each neighborhood coordinate point in the central neighborhood using the neighborhood standard variance and the neighborhood gray value;
[0096] Perform binarization processing on each pixel point in the black and white two-dimensional code according to the pixel threshold to obtain the standard two-dimensional code of the black and white two-dimensional code.
[0097] Specifically, in actual applications, due to factors such as uneven illumination, noise, and large background gray-scale variations, the contrast between the target and the background in many images changes significantly. At this time, the single-threshold algorithm of the global threshold can no longer complete the task, and different thresholds should be selected for different points in the image.
[0098] Specifically, to calculate the pixel threshold of each neighborhood coordinate point in the central neighborhood using the neighborhood standard deviation and the neighborhood gray value, the following threshold formula can be used:
[0099] T(x,y) = m(x,y) + α × s(x,y)
[0100] Where T(x,y) is the pixel threshold, m(x,y) is the neighborhood gray value of the central neighborhood, s(x,y) is the neighborhood standard deviation, and α is the correction coefficient.
[0101] Furthermore, the correction coefficient indicates that the pixel points within this offset range belong to the same type of pixel points.
[0102] Specifically, the image binarization process of the black and white QR code to obtain the standard QR code of the black and white QR code includes:
[0103] The black and white QR code is divided into blocks according to a preset block ratio to obtain multiple QR code blocks of the black and white QR code, and one of the QR code blocks in the QR code blocks is selected as the target block one by one;
[0104] The following gray-scale mean algorithm is used to calculate the gray-scale mean of the target block:
[0105]
[0106] Where m(e,f) is the gray-scale mean of the target block, e is the abscissa of the target block, f is the ordinate of the target block, g(a,b) is the gray value of each pixel point in the target block, a is the abscissa of each pixel point in the target block, b is the ordinate of each pixel point in the target block, h′ is the number of pixel points selected on the abscissa, v′ is the number of pixel points selected on the ordinate, h is the length of the target block, and v is the width of the target block;
[0107] Determine the target pixel point of the target block according to the preset pixel point selection rule, and generate the pixel standard deviation of the target pixel point;
[0108] Calculate the block threshold of the target block according to the pixel standard deviation, and perform binarization processing on the QR code blocks in the black and white QR code one by one according to the block threshold to obtain the standard QR code of the black and white QR code.
[0109] Specifically, since the QR code records data information by arranging black and white squares on a two-dimensional plane, some pixel points can be selectively selected for calculation when binarizing the QR code image. According to the characteristics of the QR code image features, the sampling points of the gray values of the pixels in the image are reduced to achieve the purpose of reducing the time required for the algorithm.
[0110] Further, the block processing of the black and white QR code according to the preset block ratio means that if the length and width of the standard QR code are q and p, and the length and width of the standard QR code are equally divided into n parts, then the length and width of each QR code block are h = q / n and v = p / n. If the value is a decimal, take the largest integer less than h and v. Among them, the preset block ratio means that the length and width of the standard QR code are equally divided into n parts.
[0111] Specifically, the value ranges of the abscissa and ordinate of the target block are both from 1 to n.
[0112] Further, the block threshold of the target block can be calculated according to the pixel standard variance by using a preset block threshold algorithm, where the preset block threshold algorithm can use the threshold formula.
[0113] S3. Obtain the historical data of the cigarette manufacturing equipment, perform theme classification on the historical data, and obtain the theme data of the historical data.
[0114] In the embodiment of the present invention, the historical data includes but is not limited to: equipment overview, operation and maintenance procedures, repair records, process quality standards, equipment safety, equipment information, equipment materials, process materials, and equipment pictures, etc.; the theme data is the historical data for which the theme has been determined. For example, the rated voltage belongs to the equipment overview.
[0115] Specifically, the theme classification of the historical data is to determine which category of which cigarette manufacturing equipment the historical data belongs to, so as to better query and manage the historical data.
[0116] Further, the theme classification can be performed by using the Naive Bayes algorithm, or the theme classification of the historical data can be performed by using the similarity algorithm.
[0117] S4. Perform theme configuration on the preset blank QR code interface according to the theme data to obtain a first-level QR code interface.
[0118] In the embodiment of the present invention, the preset blank QR code interface refers to the interface corresponding to the standard QR code of the cigarette manufacturing equipment, and the theme configuration is to perform functional partitioning on the interface.
[0119] In an embodiment of the present invention, refer to Figure 3 As shown, the theme configuration of a preset blank two-dimensional code interface according to the theme data to obtain a first-level two-dimensional code interface includes:
[0120] S31. Configure the associated form module for the preset blank two-dimensional code interface to obtain the initial interface of the blank two-dimensional code interface;
[0121] S32. Configure the device information module for the initial interface to obtain the intermediate interface of the initial interface;
[0122] S33. Configure the device maintenance module for the intermediate interface to obtain the first-level two-dimensional code interface of the intermediate interface.
[0123] Specifically, the configuration of the associated form module is to display the system maintenance records of the cigarette-making equipment; the configuration of the device information module is to facilitate the organization of relevant training and the inspection and supervision of the implementation process, to establish the division of labor of the cigarette-making equipment and to plan, coordinate and promote the projects according to the division of labor; the configuration of the device maintenance module is to facilitate the query and management of the maintenance information of the cigarette-making equipment.
[0124] S5. Use the first-level two-dimensional code interface to establish the associated storage of the standard two-dimensional code and the theme data to obtain the data file of the cigarette-making equipment.
[0125] In an embodiment of the present invention, the associated storage of the standard two-dimensional code and the theme data using the first-level two-dimensional code interface can store the theme data on the information management platform.
[0126] Specifically, because one cigarette-making equipment corresponds to one standard two-dimensional code, establish the relevant information of the standard two-dimensional code to realize the associated storage of the standard two-dimensional code and the theme data.
[0127] S6. Obtain the update information of the cigarette-making equipment at a preset time, decode the standard two-dimensional code to obtain the parsed two-dimensional code of the standard two-dimensional code, and complete the data update of the cigarette-making equipment according to the parsed two-dimensional code and the update information.
[0128] In an embodiment of the present invention, the preset time refers to the data update cycle determined according to business requirements or company progress arrangements, so the data update cycle can be once a month, once a week, or the update of the update information can be carried out immediately as long as there is update information.
[0129] Specifically, the update information includes but is not limited to: information maintenance information, training materials, equipment performance expansion information, etc.
[0130] In an embodiment of the present invention, decoding the standard two-dimensional code to obtain the parsed two-dimensional code of the standard two-dimensional code includes:
[0131] Performing decoding area positioning on the standard two-dimensional code to obtain the light and dark areas of the standard two-dimensional code;
[0132] Generating the format version of the standard two-dimensional code according to the light and dark areas, and performing demasking processing on the format version by using a preset masking pattern to obtain the standard version of the format version;
[0133] Performing decoding processing on the standard version by using the encoding rule to obtain the decoded version of the standard version;
[0134] Performing error correction processing on the decoded version to obtain the parsed two-dimensional code of the decoded version.
[0135] Specifically, decoding the standard two-dimensional code refers to the process of obtaining the feature points of the two-dimensional code from an image and identifying and translating the initial data according to the encoding principle, which is the reverse process of generating the two-dimensional code.
[0136] Specifically, the error correction processing can generate corresponding error correction codewords by using the Reed-Solomon error correction coding algorithm of the two-dimensional code device, and perform error correction processing on the decoded version according to the error correction codewords to obtain the parsed two-dimensional code of the decoded version.
[0137] Specifically, performing demasking processing on the format version by using a preset masking pattern means that the masking pattern can be cleared by performing exclusive OR on the coding area of the two-dimensional code according to the obtained masking pattern.
[0138] Specifically, completing the data update of the cigarette device according to the parsed two-dimensional code and the update information means entering the interface of the corresponding cigarette device according to the parsed two-dimensional code and updating the update information on the interface.
[0139] The embodiment of the present invention uniquely identifies cigarette equipment one by one and generates a device two-dimensional code corresponding to the identified cigarette equipment, thereby establishing a one-to-one correspondence between the device two-dimensional code and the cigarette equipment. The image preprocessing of the two-dimensional code is because the recognition of the two-dimensional code plays an important role in the cigarette recognition, which is directly related to whether the data storage and data update are successful. In the process of two-dimensional code image acquisition, it is very easy to be affected by complex environments such as abnormal lighting, and an image with uneven lighting is acquired. At this time, the image must be preprocessed, and the acquired historical data of the cigarette equipment is subject-classified, which is conducive to the management and query of historical data, improves management efficiency and query rate, decodes the standard two-dimensional code, and completes the data update of the cigarette equipment according to the generated parsed two-dimensional code, intuitively displays the equipment maintenance part, accurately manages the equipment maintenance, facilitates subsequent equipment maintenance, and creates a good learning atmosphere for employees, so that the number of on-site browsing and consultation is large, and the familiarity and mastery of equipment structure, operating procedures and parameter indicators are enhanced. Therefore, the present invention proposes a cigarette equipment management method based on two-dimensional code, which can solve the problem of low efficiency of cigarette equipment management.
[0140] like Figure 4 , which is a functional module diagram of a QR code-based cigarette equipment management device provided in one embodiment of the present invention.
[0141] The cigarette equipment management device 100 based on QR code of the present invention can be installed in an electronic device. According to the functions to be implemented, the cigarette equipment management device 100 based on QR code can include a QR code generation module 101, a QR code preprocessing module 102, a data theme classification module 103, an interface theme configuration module 104, an associated storage module 105 and a data update module 106. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0142] In this embodiment, the functions of each module / unit are as follows:
[0143] The QR code generating module 101 is used to uniquely identify the cigarette device, obtain the device label of the cigarette device, and generate the device QR code of the cigarette device one by one according to the device label;
[0144] The two-dimensional code preprocessing module 102 is used to perform image preprocessing on the device two-dimensional code to obtain a standard two-dimensional code of the device two-dimensional code;
[0145] The data subject classification module 103 is used to obtain the historical data of the cigarette making equipment, and subject-classify the historical data to obtain subject data of the historical data;
[0146] The interface theme configuration module 104 is configured to perform theme configuration on a preset blank two-dimensional code interface according to the theme data to obtain a primary two-dimensional code interface;
[0147] The association storage module 105 is configured to establish an associated storage of the standard two-dimensional code and the theme data by using the primary two-dimensional code interface to obtain a data file of the cigarette equipment;
[0148] The data update module 106 is configured to obtain update information of the cigarette equipment at a preset time, decode the standard two-dimensional code to obtain a parsed two-dimensional code of the standard two-dimensional code, and complete the data update of the cigarette equipment according to the parsed two-dimensional code and the update information.
[0149] As Figure 5 shown, it is a schematic structural diagram of an electronic device for implementing a cigarette equipment management method based on a two-dimensional code according to an embodiment of the present invention.
[0150] The electronic device may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may further include a computer program stored in the memory 11 and executable on the processor 10, such as a cigarette equipment management program based on a two-dimensional code.
[0151] Among them, the processor 10 may be composed of integrated circuits in some embodiments. For example, it may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same or different functions, including a combination of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control core (Control Unit) of the electronic device, connects various components of the entire electronic device through various interfaces and lines, and executes various functions of the electronic device and processes data by running or executing programs or modules stored in the memory 11 (such as executing a cigarette equipment management program based on a two-dimensional code, etc.) and calling data stored in the memory 11.
[0152] The memory 11 includes at least one type of readable storage medium, which includes flash memory, mobile hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device, such as the mobile hard disk of the electronic device. In some other embodiments, the memory 11 may also be an external storage device of the electronic device, such as a plug-in mobile hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. equipped on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 can be used not only to store application software installed in the electronic device and various types of data, such as the code of the cigarette device management program based on two-dimensional codes, etc., but also to temporarily store data that has been output or will be output.
[0153] The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable connection communication between the memory 11 and at least one processor 10, etc.
[0154] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), and is generally used to establish a communication connection between this electronic device and other electronic devices. The user interface may be a display, an input unit (such as a keyboard), and optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) toucher, etc. Among them, the display can also be appropriately referred to as a display screen or a display unit, and is used to display information processed in the electronic device and to display a visual user interface.
[0155] Only an electronic device with components is shown in the figure. Those skilled in the art can understand that the structure shown in the figure does not constitute a limitation on the electronic device, and it may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0156] For example, although not shown, the electronic device may further include a power source (such as a battery) for supplying power to each component. Preferably, the power source can be logically connected to the at least one processor 10 through a power management device, so as to implement functions such as charging management, discharging management, and power consumption management through the power management device. The power source may also include any components such as one or more DC or AC power sources, a recharge device, a power failure detection circuit, a power converter or inverter, and a power status indicator. The electronic device may also include various sensors, a Bluetooth module, a Wi-Fi module, etc., which will not be elaborated here.
[0157] It should be understood that the embodiments are for illustrative purposes only and are not limited by this structure in the scope of the patent application.
[0158] The cigarette device management program based on two-dimensional codes stored in the memory 11 of the electronic device is a combination of multiple instructions. When running in the processor 10, it can implement:
[0159] Uniquely identify the cigarette device to obtain the device label of the cigarette device, and generate the device two-dimensional code of the cigarette device one by one according to the device label;
[0160] Perform image preprocessing on the device two-dimensional code to obtain the standard two-dimensional code of the device two-dimensional code;
[0161] Obtain the historical data of the cigarette device, classify the historical data by theme to obtain the theme data of the historical data;
[0162] Perform theme configuration on a preset blank two-dimensional code interface according to the theme data to obtain a first-level two-dimensional code interface;
[0163] Establish an associated storage of the standard two-dimensional code and the theme data by using the first-level two-dimensional code interface to obtain the data file of the cigarette device;
[0164] Obtain the update information of the cigarette device at a preset time, decode the standard two-dimensional code to obtain the parsed two-dimensional code of the standard two-dimensional code, and complete the data update of the cigarette device according to the parsed two-dimensional code and the update information.
[0165] Specifically, for the specific implementation method of the processor 10 for the above instructions, reference can be made to the description of the relevant steps in the corresponding embodiments of the accompanying drawings, which will not be elaborated here.
[0166] Furthermore, if the modules / units integrated in the electronic device are implemented in the form of software functional units and sold or used as independent products, they can be stored in a medium. The medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory).
[0167] The present invention also provides a medium. The readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, it can implement:
[0168] Perform a unique identification on the cigarette equipment to obtain the equipment label of the cigarette equipment, and generate the equipment two-dimensional code of the cigarette equipment one by one according to the equipment label;
[0169] Perform image preprocessing on the equipment two-dimensional code to obtain the standard two-dimensional code of the equipment two-dimensional code;
[0170] Obtain the historical data of the cigarette equipment, perform theme classification on the historical data to obtain the theme data of the historical data;
[0171] Perform theme configuration on a preset blank two-dimensional code interface according to the theme data to obtain a first-level two-dimensional code interface;
[0172] Establish an associated storage of the standard two-dimensional code and the theme data by using the first-level two-dimensional code interface to obtain the data file of the cigarette equipment;
[0173] Obtain the update information of the cigarette equipment according to a preset time, decode the standard two-dimensional code to obtain the parsed two-dimensional code of the standard two-dimensional code, and complete the data update of the cigarette equipment according to the parsed two-dimensional code and the update information.
[0174] In several embodiments provided by the present invention, it should be understood that the disclosed equipment, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division, and there can be other division methods in actual implementation.
[0175] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they can be located in one place, or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0176] In addition, in each embodiment of the present invention, each functional module may be integrated into a processing unit, may exist physically as individual units, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware, or in the form of a combination of hardware and software functional modules.
[0177] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above-mentioned exemplary embodiments, and without departing from the spirit or basic characteristics of the present invention, the present invention can be implemented in other specific forms.
[0178] Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be encompassed within the present invention. Any reference signs in the claims should not be construed as limiting the claims involved.
[0179] The embodiments of the present application may acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is a theory, method, technology and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0180] In addition, obviously, the word "including" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or devices stated in the system claims may also be implemented by one unit or device through software or hardware. Words such as first, second, etc. are used to indicate names and do not indicate any specific order.
[0181] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A cigarette manufacturing equipment management method based on two-dimensional codes, characterized in that The method includes: Uniquely identifying the cigarette manufacturing equipment to obtain the equipment label of the cigarette manufacturing equipment, and generating the equipment QR code of the cigarette manufacturing equipment one by one according to the equipment label; Performing image preprocessing on the equipment QR code to obtain the standard QR code of the equipment QR code; Obtaining the historical data of the cigarette manufacturing equipment, and performing theme classification on the historical data to obtain the theme data of the historical data; Performing theme configuration on a preset blank QR code interface according to the theme data to obtain a primary QR code interface; Establishing an associated storage of the standard QR code and the theme data by using the primary QR code interface to obtain the data file of the cigarette manufacturing equipment; Obtaining the update information of the cigarette manufacturing equipment at a preset time, decoding the standard QR code to obtain the parsed QR code of the standard QR code, and completing the data update of the cigarette manufacturing equipment according to the parsed QR code and the update information; Generating the coding information of the cigarette manufacturing equipment one by one according to the equipment label, and performing data encoding on the coding information according to a preset coding rule to obtain the initial data structure of the cigarette manufacturing equipment; Performing error correction coding on the initial data structure to obtain the QR code data structure of the initial data structure; Generating a template arrangement of the cigarette manufacturing equipment by using the QR code data structure, and performing masking processing on the template arrangement to obtain the equipment QR code of the cigarette manufacturing equipment; The performing theme configuration on a preset blank QR code interface according to the theme data to obtain a primary QR code interface includes: Performing associated form module configuration on the preset blank QR code interface to obtain the initial interface of the blank QR code interface; Performing equipment data module configuration on the initial interface to obtain the intermediate interface of the initial interface; Performing equipment maintenance module configuration on the intermediate interface to obtain the primary QR code interface of the intermediate interface; The decoding the standard QR code to obtain the parsed QR code of the standard QR code includes: Performing decoding area positioning on the standard QR code to obtain the light and dark areas of the standard QR code; Generating the format version of the standard QR code according to the light and dark areas, and performing demasking processing on the format version by using a preset mask pattern to obtain the standard version of the format version; Performing decoding processing on the standard version by using the coding rule to obtain the decoded version of the standard version; Performing error correction processing on the decoded version to obtain the parsed QR code of the decoded version.
2. The method for managing cigarette manufacturing equipment based on two-dimensional codes according to claim 1, wherein, The performing image preprocessing on the equipment QR code to obtain the standard QR code of the equipment QR code includes: Performing image grayscale processing on the equipment QR code to obtain the black and white QR code of the equipment QR code; Performing image binarization processing on the black and white QR code to obtain the standard QR code of the black and white QR code.
3. The method for managing cigarette manufacturing equipment based on two-dimensional codes according to claim 2, wherein, The performing image binarization processing on the black and white QR code to obtain the standard QR code of the black and white QR code includes: Establishing the QR code coordinate system of the black and white QR code, and selecting one point in the QR code coordinate system as the target coordinate point; Taking the target coordinate point as the center, obtain the central neighborhood of the target coordinate point, and obtain the target gray value of the target coordinate point; Calculate the neighborhood gray value of the central neighborhood by using the following neighborhood gray algorithm and the target gray value: Where m(x, y) is the neighborhood gray value of the central neighborhood, r is the dimension of the central neighborhood, x is the abscissa of the target coordinate point, y is the ordinate of the target coordinate point, g(i, j) is the gray value of the neighborhood coordinate point in the central neighborhood, i is the abscissa of the neighborhood coordinate point, and j is the ordinate of the neighborhood coordinate point; Generate the neighborhood standard deviation of the target neighborhood according to the neighborhood gray value and the target gray value, and calculate the pixel threshold of each neighborhood coordinate point in the central neighborhood by using the neighborhood standard deviation and the neighborhood gray value; Perform binarization processing on each pixel point in the black and white two-dimensional code according to the pixel threshold to obtain the standard two-dimensional code of the black and white two-dimensional code.
4. The method for managing cigarette manufacturing equipment based on two-dimensional codes according to claim 2, wherein, The image binarization processing of the black and white two-dimensional code to obtain the standard two-dimensional code of the black and white two-dimensional code includes: Perform block processing on the black and white two-dimensional code according to a preset block ratio to obtain a plurality of two-dimensional code blocks of the black and white two-dimensional code, and select one of the two-dimensional code blocks in the two-dimensional code blocks as the target block one by one; Calculate the gray mean value of the target block by using the following gray mean value algorithm: Among them, m(e, f) is the average grayscale value of the target block, e is the abscissa of the target block, f is the ordinate of the target block, g(a, b) is the grayscale value of each pixel point in the target block, a is the abscissa of each pixel point in the target block, b is the ordinate of each pixel point in the target block, h ′ is the number of pixel points selected on the abscissa, v ′ is the number of pixel points selected on the ordinate, h is the length of the target block, and v is the width of the target block; Determine the target pixel point of the target block according to a preset pixel point selection rule, and generate the pixel standard deviation of the target pixel point; Calculate the block threshold of the black and white two-dimensional code except the target block according to the pixel standard deviation, and perform binarization processing on the two-dimensional code blocks in the black and white two-dimensional code one by one according to the block threshold to obtain the standard two-dimensional code of the black and white two-dimensional code.
5. A cigarette manufacturing equipment management device based on a two-dimensional code, characterized in that, The device includes: A two-dimensional code generation module, configured to uniquely identify a cigarette device to obtain a device label of the cigarette device, and generate a device two-dimensional code of the cigarette device one by one according to the device label; A two-dimensional code preprocessing module, configured to perform image preprocessing on the device two-dimensional code to obtain a standard two-dimensional code of the device two-dimensional code; A data theme classification module, configured to obtain historical data of the cigarette device, perform theme classification on the historical data, and obtain theme data of the historical data; An interface theme configuration module, configured to perform theme configuration on a preset blank two-dimensional code interface according to the theme data to obtain a first-level two-dimensional code interface; An associated storage module, configured to establish an associated storage of the standard two-dimensional code and the theme data by using the first-level two-dimensional code interface to obtain a data file of the cigarette device; A data update module, configured to obtain update information of the cigarette device at a preset time, decode the standard two-dimensional code to obtain a parsed two-dimensional code of the standard two-dimensional code, and complete data update of the cigarette device according to the parsed two-dimensional code and the update information; Generate the coding information of the cigarette device one by one according to the device label, and perform data coding on the coding information according to a preset coding rule to obtain the initial data structure of the cigarette device; Perform error correction coding on the initial data structure to obtain the two-dimensional code data structure of the initial data structure; Generate the template arrangement of the cigarette manufacturing equipment by using the two-dimensional code data structure, and perform masking processing on the template arrangement to obtain the equipment two-dimensional code of the cigarette manufacturing equipment; Perform theme configuration on the preset blank two-dimensional code interface according to the theme data to obtain the first-level two-dimensional code interface, including: Perform associated form module configuration on the preset blank two-dimensional code interface to obtain the initial interface of the blank two-dimensional code interface; Perform equipment information module configuration on the initial interface to obtain the intermediate interface of the initial interface; Perform equipment maintenance module configuration on the intermediate interface to obtain the first-level two-dimensional code interface of the intermediate interface; Decode the standard two-dimensional code to obtain the parsed two-dimensional code of the standard two-dimensional code, including: Locate the decoding area of the standard two-dimensional code to obtain the light and dark areas of the standard two-dimensional code; Generate the format version of the standard two-dimensional code according to the light and dark areas, and perform demasking processing on the format version by using a preset masking pattern to obtain the standard version of the format version; Perform decoding processing on the standard version by using the coding rule to obtain the decoded version of the standard version; Perform error correction processing on the decoded version to obtain the parsed two-dimensional code of the decoded version.
6. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the two-dimensional code-based cigarette manufacturing equipment management method according to any one of claims 1 to 4.
7. A medium stores a computer program, characterized in that, When the computer program is executed by the processor, it implements the two-dimensional code-based cigarette manufacturing equipment management method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Two-dimensional code label anti-counterfeiting identification system and method based on smart phone
CN102819724A
Material intelligent management, device and system based on two-dimensional code
CN107103443A