Search

CN-121997892-A - Identification code generation method, device, equipment and medium

CN121997892ACN 121997892 ACN121997892 ACN 121997892ACN-121997892-A

Abstract

The identification code generation method, device, equipment and medium comprise the steps of determining a serial number coding rule, an inner box number coding rule and an outer box number coding rule of a product to be identified according to product category information, determining a target historical serial number, a target historical inner box number and a target historical outer box number which have an association relation with date code information, determining a target serial number according to serial numbers, serial number coding rules, date code information and product quantity information of target bits in the target historical serial number, determining an inner box number according to the relation between the serial numbers of the target bits in the target serial number and first preset information, date code information, inner box number coding rules and the target historical inner box number, and determining an outer box number according to the relation between the serial numbers of the target bits in the target serial number and second preset information, date code information, outer box number coding rules and the target historical outer box number. The generation speed of the serial number, the inner box number and the outer box number of the product is improved.

Inventors

  • ZHANG ZEYAN
  • LIU SHIZHU
  • LIU SHENG

Assignees

  • 浙江力积存储科技股份有限公司

Dates

Publication Date
20260508
Application Date
20260128

Claims (10)

  1. 1. An identification code generation method, comprising: Responding to the received date code information, product category information and product quantity information of a product to be identified submitted by a target object, and determining a serial number coding rule, an inner box number coding rule and an outer box number coding rule of the product to be identified according to the product category information; Determining a target history serial number, a target history inner box number and a target history outer box number which have an association relation with the date code information; Determining the target serial number of each product to be identified according to the serial number of the target bit in the target historical serial number, the serial number coding rule, the date code information and the product quantity information; Determining the inner box number of each product to be identified according to the relation between the serial number of the target bit in the target serial number and the first preset information, the date code information, the inner box number coding rule and the target historical inner box number; And determining the outer box numbers of the products to be identified according to the relation between the serial numbers of the target bits in the target serial numbers and the second preset information, the date code information, the outer box number coding rules and the target historical outer box numbers.
  2. 2. The method of claim 1, wherein determining a target history serial number, a target history inner box number, and a target history outer box number in association with the date code information comprises: Inquiring a historical serial number which is the same as the code information of the preset bit of the date code information from a database according to the date code information; according to the serial numbers of the target bits in the historical serial numbers, selecting the historical serial number with the largest serial number as the target historical serial number; and acquiring a target history inner box number and a target history outer box number corresponding to the target history serial number.
  3. 3. The method of claim 1, wherein determining the target serial number of each product to be identified based on the serial number of the target bit in the target historical serial number, the serial number encoding rule, the date code information, and the product quantity information comprises: Determining year information, week information and factory code information according to the date code information; sequentially increasing and generating a plurality of target serial numbers which are the same as the product quantity information by taking the serial numbers of the target bits in the target historical serial numbers as starting points; and generating the target serial numbers of the products to be identified according to the serial number coding rules, the year information, the week information, the factory code information and a plurality of target serial numbers.
  4. 4. The method according to claim 1, wherein the determining the inner box number of each product to be identified according to the relation between the serial number of the target bit in the target serial number and the first preset information, the date code information, the inner box number coding rule and the target history inner box number includes: When the serial numbers of the target bits in the target serial numbers are smaller than or equal to first preset information, a first inner box serial number of the target bits in the target historical inner box numbers is obtained, and the inner box numbers of the products to be identified are determined according to the first inner box serial numbers, the date code information and the inner box number coding rules of the target bits in the target historical inner box numbers; And determining the inner box numbers corresponding to the first target serial numbers according to the first inner box serial numbers, the date code information and the inner box number coding rules of the target bits in the target historical inner box numbers, and determining the inner box numbers corresponding to the second target serial numbers according to the quotient information of the maximum serial numbers of the target bits in the second target serial numbers and the first preset information, the first inner box serial numbers, the date code information and the inner box number coding rules of the target bits in the target historical inner box numbers.
  5. 5. The method according to claim 4, wherein the determining the inner box number corresponding to each second target serial number according to the quotient information of the maximum serial number of the target bit in each second target serial number and the first preset information, the first inner box serial number of the target bit in the target history inner box number, the date code information, and the inner box number coding rule includes: determining a second inner box serial number corresponding to each second target serial number according to the quotient information of the maximum serial number of the target bit in each second target serial number and the first preset information and the first inner box serial number of the target bit in the target historical inner box number; And determining the inner box number corresponding to each second target serial number according to the second inner box serial number, the date code information and the inner box number coding rule corresponding to each second target serial number.
  6. 6. The method according to claim 1, wherein the determining the bin number of each product to be identified according to the relation between the serial number of the target bit in the target serial number and the second preset information, the date code information, the bin number encoding rule, and the target historical bin number comprises: when the serial numbers of the target bits in the target serial numbers are smaller than or equal to second preset information, acquiring a first outer box serial number of the target bits in the target historical outer box numbers, and determining the outer box numbers of the products to be identified according to the first outer box serial numbers, the date code information and the outer box number coding rules of the target bits in the target historical outer box numbers; And determining the outer box numbers corresponding to the third target serial numbers according to the first outer box serial numbers, the date code information and the outer box number coding rules of the target bits in the target historical outer box numbers, and determining the outer box numbers corresponding to the fourth target serial numbers according to the quotient information of the maximum serial numbers of the target bits in the fourth target serial numbers and the second preset information and the first outer box serial numbers, the date code information and the outer box number coding rules of the target bits in the target historical outer box numbers.
  7. 7. The method of claim 6, wherein the determining the bin number corresponding to each fourth target sequence number according to the quotient information of the maximum sequence running number and the second preset information of the target bit in each fourth target sequence number, the first bin running number, the date code information and the bin number coding rule of the target bit in the target historical bin number, comprises: Determining a second outer box serial number corresponding to each fourth target serial number according to the quotient information of the maximum serial number of the target bit in each fourth target serial number and the second preset information and the first outer box serial number of the target bit in the target historical outer box number; And determining the outer box numbers corresponding to the fourth target serial numbers according to the second outer box serial numbers, the date code information and the outer box number coding rules corresponding to the fourth target serial numbers.
  8. 8. An identification code generation apparatus, comprising: The coding rule determining module is used for determining a serial number coding rule, an inner box number coding rule and an outer box number coding rule of the product to be identified according to the product category information in response to receiving date code information, product category information and product quantity information of the product to be identified submitted by the target object; The target history information determining module is used for determining a target history serial number, a target history inner box number and a target history outer box number which have an association relation with the date code information; The target serial number generation module is used for determining the target serial number of each product to be identified according to the serial number of the target bit in the target historical serial number, the serial number coding rule, the date code information and the product quantity information; The inner box number generation module is used for determining the inner box number of each product to be identified according to the relation between the serial number of the target bit in the target serial number and the first preset information, the date code information, the inner box number coding rule and the target historical inner box number; and the outer box number generation module is used for determining the outer box number of each product to be identified according to the relation between the serial number of the target bit in the target serial number and the second preset information, the date code information, the outer box number coding rule and the target historical outer box number.
  9. 9. A computer device, comprising: One or more processors; Storage means for storing one or more programs, When executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-7.
  10. 10. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any one of claims 1-7.

Description

Identification code generation method, device, equipment and medium Technical Field The present invention relates to the field of information processing technologies and related technologies, and in particular, to a method, an apparatus, a device, and a medium for generating an identification code. Background In modern electronic product manufacturing and supply chain management, it is a vital link to generate unique identification codes (such as product serial number SN, inner box number, outer box number) for products, inner boxes (middle package) and outer boxes (large package), which are used for product traceability, inventory management, quality control and logistics tracking. Currently, many manufacturers still rely on manual entry, excel form export followed by copy-paste, or use some simple scripting tool in generating these identification codes. For example, manual input/Excel export is performed, and an operator needs to manually calculate or search a corresponding serial number in Excel according to information such as a product material number, a Date Code (DC), a batch number and the like, and then complete serial numbers, inner box numbers or outer box numbers are formed by combining. This process is time consuming, error prone, especially when the production is large and the product types are numerous, some enterprises may develop underlying scripts to generate serial numbers, but these scripts often lack strict assurance of global uniqueness or have difficulty in handling complex association logic (e.g., serial numbers under different date codes are rolled independently, different product types have different generation rules, etc.). In the prior art, the automated generation and verification of these associations may be inadequate. Based on the problems existing in the prior art, a method for generating an identification code is needed. Disclosure of Invention The embodiments described herein provide a method, apparatus, device, and medium for generating an identification code, which improves the generation speed of serial numbers, inner box numbers, and outer box numbers of products. According to a first aspect of the present disclosure, there is provided an identification code generating method, including: Responding to the received date code information, product category information and product quantity information of a product to be identified submitted by a target object, and determining a serial number coding rule, an inner box number coding rule and an outer box number coding rule of the product to be identified according to the product category information; Determining a target history serial number, a target history inner box number and a target history outer box number which have an association relation with the date code information; Determining the target serial number of each product to be identified according to the serial number of the target bit in the target historical serial number, the serial number coding rule, the date code information and the product quantity information; Determining the inner box number of each product to be identified according to the relation between the serial number of the target bit in the target serial number and the first preset information, the date code information, the inner box number coding rule and the target historical inner box number; And determining the outer box numbers of the products to be identified according to the relation between the serial numbers of the target bits in the target serial numbers and the second preset information, the date code information, the outer box number coding rules and the target historical outer box numbers. In some embodiments of the present disclosure, the determining the target history serial number, the target history inner box number, and the target history outer box number, which have an association relationship with the date code information, includes: Inquiring a historical serial number which is the same as the code information of the preset bit of the date code information from a database according to the date code information; according to the serial numbers of the target bits in the historical serial numbers, selecting the historical serial number with the largest serial number as the target historical serial number; and acquiring a target history inner box number and a target history outer box number corresponding to the target history serial number. In some embodiments of the present disclosure, the determining the target serial number of each product to be identified according to the serial number of the target bit in the target historical serial number, the serial number coding rule, the date code information and the product quantity information includes: Determining year information, week information and factory code information according to the date code information; sequentially increasing and generating a plurality of target serial numbers which are the same as the product quantity