GENERATING AND STORING UNIQUE MARKING CODES FOR LIQUID FOOD PACKAGES
20220391923 · 2022-12-08
Inventors
- Matteo Gazzadi Poggioli (Modena, IT)
- Gaurav Naik (Singapore, SG)
- Biagio Roberti (Milano, IT)
- Gregorio Occhiogrosso (Bitetto (Bari), IT)
Cpc classification
H04L9/0618
ELECTRICITY
G06F16/278
PHYSICS
H04L9/0894
ELECTRICITY
International classification
H04L9/06
ELECTRICITY
Abstract
A method of generating marking codes to uniquely identify packages of liquid food is performed within a system comprising a code generator operable to generate a marking code by encrypting package production data that uniquely represents the production of an individual package, and to provide the marking code for marking of the individual package. The system further comprises a key generator operable to generate a partition key as a function of the marking code, and a storage interface coupled to a database comprising a plurality of partitions. The storage interface is operable to determine a selected partition among the plurality of partitions based on the partition key and to store, in the selected partition, package itemization data comprising the marking code and the package production data.
Claims
1. A method of generating marking codes to uniquely identify packages for liquid food, said method comprising: obtaining package production data which is unique to each individual package; operating a predefined encryption algorithm on the package production data to generate encrypted package production data; generating a marking code that includes the encrypted package production data; providing the marking code for marking of the individual package; and storing, in a database that comprises a plurality of partitions, package itemization data comprising at least a subset of the marking code and at least a subset of the package production data of the individual package, wherein said storing comprises generating a partition key as a function of the marking code, and operating a controller coupled to the database to determine a selected partition among the plurality of partitions based on the partition key and to store the package itemization data in the selected partition.
2. The method of claim 1, wherein said operating the controller comprises operating a predefined mapping function on the partition key, the predefined mapping function being configured to map partition keys to a set of partition identifiers, which comprises a respective partition identifier for each partition among the plurality of partitions, wherein the selected partition is determined based on a current partition identifier generated by the mapping function for the partition key.
3. The method of claim 2, wherein the predefined mapping function comprises a hash function.
4. The method of claim 1, wherein the predefined encryption algorithm is a block cipher.
5. The method of claim 1, wherein the package production data is obtained to represent at least one of a location and a time of producing the individual package.
6. The method of claim 1, wherein said at least a subset of the marking code comprises the encrypted package production data.
7. The method of claim 1, wherein the database is a distributed database.
8. A non-transitory computer-readable medium comprising computer instructions which, when executed by a processor, cause the processor to perform the method of claim 1.
9. A system for generating marking codes to uniquely identify packages for liquid food, said system comprising: a code generator configured to operate a predefined encryption algorithm on package production data, which is unique to each individual package, to generate encrypted production data, said code generator being further configured to generate a marking code that includes the encrypted production data and to provide the marking code for marking of the individual package, a storage interface coupled to a database that comprises a plurality of partitions, the storage interface being arranged to receive package itemization data comprising at least a subset of the marking code and at least a subset of the package production data of the individual package, and a key generator configured to generate a partition key as a function of the marking code and provide the partition key to the storage interface, wherein the storage interface is configured to, upon receipt of the partition key, determine a selected partition among the plurality of partitions based on the partition key, and to store the package itemization data in the selected partition.
10. The system of claim 9, wherein the storage interface is further configured to perform a predefined mapping function on the partition key, the predefined mapping function being configured to map partition keys to a set of partition identifiers, which comprises a respective partition identifier for each partition among the plurality of partitions, wherein the selected partition is determined based on a current partition identifier generated by the mapping function for the partition key.
11. The system of claim 10, wherein the predefined mapping function comprises a hash function.
12. The system of claim 9, wherein the predefined encryption algorithm is a block cipher.
13. The system of claim 9, wherein the package production data is obtained to represent at least one of a location and a time of producing the individual package.
14. The system of claim 9, wherein said at least a subset of the marking code comprises the encrypted package production data.
15. The system of claim 9, wherein the database is a distributed database.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Embodiments will now be described, by way of example, with reference to the accompanying schematic drawings.
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
DETAILED DESCRIPTION
[0030] Embodiments will now be described more fully hereinafter with reference to the accompanying drawings, in which some, but not all, embodiments are shown. Indeed, the invention may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure may satisfy applicable legal requirements.
[0031] Also, it will be understood that, where possible, any of the advantages, features, functions, devices, and/or operational aspects of any of the embodiments described and/or contemplated herein may be included in any of the other embodiments described and/or contemplated herein, and/or vice versa. In addition, where possible, any terms expressed in the singular form herein are meant to also include the plural form and/or vice versa, unless explicitly stated otherwise. As used herein, “at least one” shall mean “one or more” and these phrases are intended to be interchangeable. Accordingly, the terms “a” and/or “an” shall mean “at least one” or “one or more”, even though the phrase “one or more” or “at least one” is also used herein. As used herein, except where the context requires otherwise owing to express language or necessary implication, the word “comprise” or variations such as “comprises” or “comprising” is used in an inclusive sense, that is, to specify the presence of the stated features but not to preclude the presence or addition of further features in various embodiments. As used herein, the term “and/or” comprises any and all combinations of one or more of the associated listed items.
[0032] As used herein, “liquid food” refers to any food product that is non-solid, semi-liquid or pourable at room temperature, including beverages, such as fruit juices, wines, beers, sodas, as well as dairy products, sauces, oils, creams, custards, soups, pastes, etc, and also solid food products in a liquid, such as beans, fruits, tomatoes, stews, etc.
[0033] As used herein, “a package” refers to any package or container suitable for sealed containment of liquid food products, including but not limited to containers formed of cardboard or packaging laminate, e.g. cellulose-based material, and containers made of or comprising plastic material.
[0034] Well-known functions or constructions may not be described in detail for brevity and/or clarity. Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0035] Like reference signs refer to like elements throughout.
[0036]
[0037] In the manufacturing stage 1, a sheet material for the packages is manufactured at a converting factory (plant) 10. The sheet material is typically paper-based and provided to the filling stage 2 in rolls 11. In the illustrated example, stage 1 further involves a dedicated factory (plant) 12 that manufactures caps 13 for the packages, typically of plastic material. If the packages are formed without a cap, the factory 12 is absent from stage 1. It is also conceivable that stage 1 includes additional factories that manufacture specific components for the package.
[0038] In the filling stage 2, a filling factory (plant) 14 operates on the sheet material 11, the caps 13 and the liquid food to provide packages containing liquid food. For example, a production line at the filling plant 14 may form the sheet material 11 into a container, fill the liquid food into the container, and seal the container to form the package. The production line may also attach a cap 13 to the container.
[0039] It should be understood that the manufacturing chain generally may involve many different converting plants 10, cap plants 12 and filling plants 14, which may be distributed globally. Each of the plants 10, 12, 14 may include a plurality of production lines.
[0040] As indicated in
[0041] The marking code is generated to be unique to the package 16 within the entire eco-system of plants 10, 12, 14 within the manufacturing chain as exemplified in
[0042] Embodiments are related to storing the marking codes and associated data in a database and will be exemplified in the following with reference to implementations of the marking code described in aforesaid EP3540664, which is incorporated herein in its entirety by reference.
[0043] Specifically, the marking code comprises payload data which is unique to the production of the individual package and which is encrypted by a predefined encryption algorithm. Generally, the marking code consists of a sequence of values, for example binary values. The payload data, which is denoted package production data (PPD) in the following, may include data elements that identify the location of production and/or the time of production. In a first example, the data elements in the PPD include identifiers of the producer that operates a plant (Producer ID), the plant (Plant ID), the production line in the plant (Line ID), the equipment where the marking code is added to the package (Equipment ID), and the PPD further identifies the current time of production, for example by year, day, hour, minute, second and a sub-second resolution counter (Package Counter), which may or may not be randomized. In a second example, the data elements in the PPD include identifiers of the plant (Production Unit ID), a production batch, and a package within the production batch, where the production batch may be identified by a time period, for example current year and month, and a batch number within the time period (Request Number), and where the package may be identified by a package number within the production batch (Package Counter). The package number may or may not be randomized. The marking code may further comprise a non-encrypted header portion, which may or may not be obfuscated and may contain data enabling decryption and validation of the encrypted PPD.
[0044] An example embodiment of a system 20 which is configured for code generation, code storage and marking of packages is schematically shown in
[0045] The storage controller 24 is configured to receive the PPD, the marking code (MC), and possibly additional data. Based thereon, the storage controller 24 generates and stores package itemization data, PID, in the database 30. Each PID corresponds to an individual package and forms a data item for storage in the database 30. In some implementations, the data item may, e.g., be a row in a table (SQL database) or a document in a collection (NoSQL database). As understood from the foregoing, a huge volume of data items will eventually be stored in the database 30, which therefore should be scalable, and preferably horizontally scalable for resource efficiency. In one embodiment, the database 30 is a distributed database comprising a plurality of logical partitions, where each logical partition may have a predefined maximum size and is assigned a unique partition identifier (Partition ID). In a non-limiting example, the predefined maximum size is in the range of 0.1-100 GB. A database management system (DBMS) 30A for the database 30 is operated to transparently and automatically distribute the data items among the logical partitions, for example based on a “partition key” (aka “distribution key”) for each data item. The storage controller 24 may provide an interface to the DBMS 30A that allows an operator to set the partition key to be used and that allows for manual or automatic upload of data items for storage in the database 30. The DBMS 30A may be proprietary to the host of the distributed database 30 and may be configured to map the logical partitions, in any suitable relation, to a plurality of nodes, which may include any one of physical servers, virtual servers or virtual LUNs (logical unit number) with access to one or more storage devices, such as hard-disk drives (HDDs) and/or solid-state drives (SSDs), for example to efficiently satisfy scalability and performance needs. As the throughput and storage requirements may increase, the DBMS 30A may move logical partitions to automatically spread the load across a greater number of servers. The DBMS 30A may be any commercially available system, and the distributed database 30 may be implemented as an SQL or a NoSQL database. In one embodiment, the DBMS 30A is a cloud computing platform. In a specific implementation, the DBMS 30A is included in Microsoft Azure Cosmos DB, which is a globally distributed, multi-model database service. In a specific example, the DBMS 30A is set up to operate as a NoSQL Document Database.
[0046] The package itemization data, PID, comprises the marking code, or a subset thereof, and at least a subset of the data elements in the PPD. The PID may also include additional data elements associated with the generation of the marking code, the production of the package or the storage in the database. In one non-limiting example, which conforms to the above-mentioned first and second examples of the PPD, the PID includes the marking code (or a subset thereof), Producer ID, Plant ID, Line ID, Equipment ID, year, day, hour, minute, second, Package Counter, Production Unit ID, and Request Number.
[0047] When implementing storage of the PID on the above-mentioned Microsoft Azure Cosmos DB, the present Applicant experienced poor performance, for example in terms of resource consumption and speed of search and retrieval. Further analysis of the data storage in the database 30 revealed a substantial non-uniformity in the distribution of data between partitions, also known as “skewness”.
[0048] Surprisingly, the present Applicant found that using the marking code as partition key rendered a substantially more uniform distribution of data among the logical partitions in the distributed database. It is presently believed that the encrypted data in the marking code imparts a randomness to the marking code that manifests itself as a substantially non-skewed data distribution among the partitions in the distributed database.
[0049]
[0050] Like in
[0051] The storage interface module 24C is configured to receive the partition key, PK, from the key generating module 24B and the PID from the aggregation module 24C. The storage interface module 24C, which is coupled to the database 30, is further operable to cause the DBMS 30A to select a partition among the partitions P1-Pj based on the partition key, PK, and store the PID in the selected partition. In one embodiment, the module 24C comprises a predefined mapping function which is configured to identify a selected partition, for example by the above-mentioned Partition ID. The module 24C may thus operate the mapping function on the partition key to compute a current Partition ID and provide the current Partition ID to the DBMS 30A for identification of the selected partition. In another embodiment, the mapping function is part of the DBMS 30A, which is caused to compute the current Partition ID when the module 24C supplies the partition key to the DBMS 30A. In one embodiment, the mapping function is configured to map all conceivable partition keys onto a set of unique Partition IDs, one for each partition P1-Pj. In one embodiment, the mapping function is further configured to scramble the bits of the partition key to improve the uniformity of the data distribution in the database 30. In one embodiment, the mapping function is a hash function. Any hash function may be used, including but not limited to a cryptographic hash function, a non-cryptographic hash function or a cyclic redundancy check (CRC) function. In one embodiment, the mapping function involves a modulo operation, e.g. modulo division by j or a prime number close to j. In another embodiment, the mapping function extracts a predefined number of bits in the partition key and collates the extracted bits into the Partition ID.
[0052]
[0053]
[0054] Reverting to the systems 20 in