Data blood relationship code generation method and device, electronic equipment and readable medium
By generating data blood relationship codes, the problem of waste of computer computing power caused by database connection operations in different systems or departments is solved, and efficient traceability of full-cycle data of material entity objects is achieved.
Patent Information
- Application Number
- CN202510263432.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-03-06
AI Technical Summary
在不同系统或部门中使用各自的数据库记录对象全生命周期信息时,导致计算机算力资源浪费,原因是追溯时需要执行复杂的数据库连接操作。
By generating data blood relationship codes, first obtain subject type information and object information from the data source, generate subject codes and object codes, combine behavior codes and extension codes, print them to label paper and paste them on material entity objects, reducing database connection operations.
Reducing the waste of computer computing resources, the user side can trace the full-cycle data of material entity objects through data blood relationship codes, without the need for complex database connection operations.
Smart Images

Figure CN120197634A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and more particularly to methods, apparatuses, electronic devices, and readable media for generating data lineage codes. Background Art
[0002] With the development of business and the improvement of digitalization, the amount of data involved in enterprises or organizations has increased sharply, and the types and sources of data have become more diverse. Data generated by different subject types (such as different product lines, different business departments, etc.) are intertwined with each other, and each subject type contains a large number of objects (such as specific products, various links in business processes, data, etc.), and these objects will undergo complex transfer processes at different stages. Generating data lineage codes is a technology for recording the full life cycle information of objects (data or entity substances) during their transfer between different systems and different departments. Currently, when recording the full life cycle information of objects during their transfer between different systems and different departments, the commonly used method is to use their respective databases in each system or department to record the relevant information of the objects in order to record the full life cycle information of the objects.
[0003] However, when using the above method to record the full life cycle information of objects during their transfer between different systems and different departments, the following technical problems often exist:
[0004] Using their respective databases in each system or department to record the relevant information of the objects in order to record the full life cycle information of the objects, when tracing the full life cycle information of the objects, in order to associate the relevant records in different databases, the database system needs to perform complex join operations, wasting computer computing resources.
[0005] The above information disclosed in this background art section is only used to enhance the understanding of the background of the inventive concept, and thus, it may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention
[0006] This content section of the present disclosure is used to briefly introduce concepts that will be described in detail in the subsequent detailed implementation section. This content section of the present disclosure is not intended to identify the key features or essential features of the claimed technical solution, nor is it intended to be used to limit the scope of the claimed technical solution.
[0007] Some embodiments of the present disclosure propose methods, apparatuses, electronic devices, and computer-readable media for generating data lineage codes to solve one or more of the technical problems mentioned in the above background art section.
[0008] In a first aspect, some embodiments of the present disclosure provide a method for generating a data lineage code. The method includes: obtaining various subject type information from a first data source; generating various subject codes based on the various subject type information, where each subject code in the various subject codes corresponds to a corresponding subject type information in the various subject type information; for each subject type information in the various subject type information, perform the following coding steps: determining the subject code corresponding to the subject type information in the various subject codes as the target subject code; obtaining various object information corresponding to the subject type information from a second data source, where each object information in the various object information corresponds to an object identifier; generating various object codes corresponding to the various object identifiers based on the various object information and the target subject code, where each object identifier in the various object identifiers corresponds to a corresponding object code in the various object codes, and the object code includes the subject code; for each object identifier in the various object identifiers, perform the following steps: obtaining object transfer information corresponding to the object identifier from a third data source, and generating a behavior code and an extended code corresponding to the object identifier based on the object transfer information, where the behavior code includes the object code; generating a data lineage code corresponding to the object identifier based on the behavior code and the extended code; in response to determining that the object identifier is a physical entity object identifier, controlling a printing device corresponding to the object identifier to print the data lineage code on a label paper; and controlling an associated robotic arm to paste the label paper containing the data lineage code onto the physical entity object corresponding to the object identifier for a client to trace the full-cycle traceability data corresponding to the physical entity object.
[0009] Second aspect, some embodiments of the present disclosure provide a data lineage code generation device, the device includes: an acquisition unit configured to acquire various subject type information from a first data source; a generation unit configured to generate various subject codes based on the various subject type information, wherein each subject code in the various subject codes corresponds to a corresponding subject type information in the various subject type information; an encoding unit configured to perform the following encoding steps for each subject type information in the various subject type information: determine the subject code corresponding to the subject type information in the various subject codes as the target subject code; acquire various object information corresponding to the subject type information from a second data source, wherein each object information in the various object information corresponds to an object identifier; generate various object codes corresponding to the various object identifiers based on the various object information and the target subject code, wherein each object identifier in the various object identifiers corresponds to a corresponding object code in the various object codes, and the object code includes the subject code; for each object identifier in the various object identifiers, perform the following steps: acquire object transfer information corresponding to the object identifier from a third data source, and generate a behavior code and an extended code corresponding to the object identifier based on the object transfer information, wherein the behavior code includes the object code; generate a data lineage code corresponding to the object identifier based on the behavior code and the extended code; in response to determining that the object identifier is a physical entity object identifier, control a printing device corresponding to the object identifier to print the data lineage code on a label paper; control an associated robotic arm to paste the label paper containing the data lineage code onto the physical entity object corresponding to the object identifier for tracing the full-cycle traceability data corresponding to the physical entity object.
[0010] Third aspect, some embodiments of the present disclosure provide an electronic device, including: one or more processors; a storage device having stored thereon one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the method described in any implementation manner of the first aspect above.
[0011] Fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having stored thereon a computer program, wherein the program, when executed by a processor, implements the method described in any implementation manner of the first aspect above.
[0012] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: Through the data lineage code generation method of some embodiments of the present disclosure, the waste of computer computing resources is reduced. Specifically, the reason for the waste of computer computing resources is that in each system or department, separate databases are used to record the relevant information of objects to record the full life cycle information of the objects. When tracing the full life cycle information of the objects, in order to associate the relevant records in different databases, the database system needs to perform complex join operations, wasting computer computing resources. Based on this, in the data lineage code generation method of some embodiments of the present disclosure, first, obtain various subject type information from the first data source. Thus, various subject type information of different subjects (such as different product lines, different business departments) can be obtained. Then, based on the above-mentioned various subject type information, generate various subject codes, where each subject code in the above-mentioned various subject codes corresponds to a corresponding subject type information in the above-mentioned various subject type information. Thus, various subject codes representing each subject can be generated. After that, for each subject type information in the above-mentioned various subject type information, perform the following coding steps: Determine the subject code corresponding to the above-mentioned subject type information in the various subject codes as the target subject code. Thus, the target subject code for generating various object codes can be obtained to achieve the inheritance of data lineage. Next, obtain various object information corresponding to the above-mentioned subject type information from the second data source, where each object information in the above-mentioned various object information corresponds to an object identifier. Thus, various object information under the subject corresponding to the subject type information can be obtained. Then, based on the above-mentioned various object information and the above-mentioned target subject code, generate various object codes corresponding to the various object identifiers, where each object identifier in the above-mentioned various object identifiers corresponds to a corresponding object code in the above-mentioned various object codes, and the object code includes the subject code. Thus, various object codes of the various object information can be generated and the object code includes the subject code, that is, the subject code of the subject to which the object belongs is inherited. Then, for each object identifier in the above-mentioned various object identifiers, perform the following steps: First step, obtain the object transfer information corresponding to the above-mentioned object identifier from the third data source, and based on the above-mentioned object transfer information, generate a behavior code and an extended code corresponding to the above-mentioned object identifier, where the behavior code includes the object code. Thus, the behavior code of the object transfer information can be generated and the behavior code inherits the object code of the object. Second step, based on the above-mentioned behavior code and the above-mentioned extended code, generate a data lineage code corresponding to the above-mentioned object identifier. Thus, a data lineage code recording the full life cycle information of the object can be generated. In response to determining that the above-mentioned object identifier is a physical entity object identifier, control the printing device corresponding to the above-mentioned object identifier to print the above-mentioned data lineage code on a label paper. Thus, when the object is a transferred physical entity, the data lineage code can be printed on the label paper.Control the associated robotic arm to paste the label paper containing the data lineage code onto the physical entity object corresponding to the above object identifier, so that the client can trace the full-cycle traceability data corresponding to the physical entity object. Thus, the client can trace the full-cycle traceability data corresponding to the physical entity object through the data lineage code with inherited data lineage, without performing complex connection operations between databases, reducing the waste of computer computing resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In combination with the accompanying drawings and with reference to the following specific embodiments, the above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and the elements and elements are not necessarily drawn to scale.
[0014] Figure 1 is a flowchart of some embodiments of a method for generating a data lineage code according to the present disclosure;
[0015] Figure 2 is a schematic structural diagram of some embodiments of a data lineage code generation device according to the present disclosure;
[0016] Figure 3 is a schematic structural diagram of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0017] The embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.
[0018] In addition, it should be noted that for the sake of convenience of description, only parts related to the relevant invention are shown in the drawings. Without conflict, the embodiments in the present disclosure and the features in the embodiments can be combined with each other.
[0019] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence relationship of the functions performed by these devices, modules or units.
[0020] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly stated in the context, it should be understood as "one or more".
[0021] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are for illustrative purposes only and are not used to limit the scope of these messages or information.
[0022] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0023] Figure 1 Flow 100 of some embodiments of the data lineage code generation method according to the present disclosure is shown. The data lineage code generation method includes the following steps:
[0024] Step 101, obtain various subject type information from a first data source.
[0025] In some embodiments, the execution entity (such as a computing device) of the data lineage code generation method may obtain various subject type information from a first data source. Among them, each subject type information in the above various subject type information includes a subject type identifier and a subject type abbreviation identifier. The above subject type identifier may be a subject name (for example, production department). The above subject type abbreviation identifier may be an abbreviation of the subject name (for example, production department abbreviation: SC). The above first data source may be a data source storing various subject type information (such as a metadata management system, a data warehouse, etc.).
[0026] Step 102, generate various subject codes based on the various subject type information.
[0027] In some embodiments, the above execution entity may generate various subject codes based on the above various subject type information. Among them, each subject code in the above various subject codes corresponds to one of the subject type information in the above various subject type information.
[0028] In some alternative implementation manners of some embodiments, the above execution entity may generate various subject codes based on the above various subject type information through the following steps:
[0029] The first step, obtain the coding requirement information corresponding to the above various subject type information.
[0030] The second step, for each subject type information in the above various subject type information, perform the following steps:
[0031] The first sub-step, determine the subject type abbreviation identifier included in the above subject type information.
[0032] The second sub-step, call a globally unique serial number generator to generate a serial number.
[0033] Step 3: Based on the above encoding requirement information, splice the above main body type abbreviation identifier and the above serial number to obtain the main body code, and input the main body code, the above main body type information, and their corresponding relationships into a preset database. Among them, the above encoding requirement information can represent the encoding format. As an example, the above encoding requirement information can be "main body type abbreviation identifier + serial number". The above main body type abbreviation identifier can be "SC". The above serial number can be "001", then the above main body code can be "SC001".
[0034] Step 103: For each main body type information in each main body type information, perform the following encoding steps:
[0035] Step 1031: Determine the main body code corresponding to the main body type information in each main body code as the target main body code.
[0036] In some embodiments, the above execution entity may determine the main body code corresponding to the above main body type information in each main body code as the target main body code.
[0037] Step 1032: Obtain each object information corresponding to the main body type information from the second data source.
[0038] In some embodiments, the above execution entity may obtain each object information corresponding to the above main body type information from the second data source. Among them, each object information in the above object information corresponds to an object identifier. The above second data source may be each object information of each object stored under the main body corresponding to the above main body type information (for example, the water cup production department or the data service department). The object in each of the above objects may be a physical entity object (for example, a water cup) or a virtual data object (for example, the water cup production data to be cleaned). The above second data source may be a database or a data system different from the first data source. Each object information in the above object information may be a detailed description and data related to the object. The above object identifier may be the product number or data name of the object.
[0039] Step 1033: Generate each object code corresponding to each object identifier based on each object information and the target main body code.
[0040] In some embodiments, the above execution entity may generate each object code corresponding to each object identifier based on the above object information and the above target main body code. Among them, each object identifier in the above object identifiers corresponds to one object code in the above object codes, and the object code includes the main body code.
[0041] In some alternative implementations of some embodiments, the above-mentioned execution entity may generate respective object codes corresponding to each object identifier based on the above-mentioned respective object information and the above-mentioned target entity code through the following steps:
[0042] First step, for each object information among the above-mentioned respective object information, perform the following encoding process:
[0043] First sub-step, determine the object identifier corresponding to the above-mentioned object information as the target object identifier.
[0044] Second sub-step, according to the preset object code specification information, perform a conversion process on the above-mentioned object information to obtain an initial object code. Among them, the above-mentioned preset object code specification information may include respective object specification sub-information. Each object specification sub-information among the above-mentioned respective object specification sub-information includes: object information and object mapping codes. In practice, first, the above-mentioned execution entity may determine the above-mentioned object information as the object information to be retrieved. Then, the above-mentioned execution entity may determine the object specification sub-information containing the above-mentioned object information to be retrieved among the respective object specification sub-information as the target object specification sub-information. After that, the above-mentioned execution entity may determine the object mapping code included in the above-mentioned target object specification sub-information as the initial object code. As an example, the above-mentioned object information is "Item raw material classification: plastic". The above-mentioned respective object specification sub-information may be "{Item raw material classification: plastic, PL}, {Item raw material classification: metal, ME}". Then the above-mentioned initial object code may be "PL".
[0045] Third sub-step, splice the above-mentioned target entity code and the above-mentioned initial object code to obtain a spliced code after splicing. In practice, the above-mentioned execution entity may splice the above-mentioned target entity code and the initial object code according to the first preset splicing order and a preset splicing symbol. The above-mentioned first preset splicing order may be that the target entity code is in the front and the initial object code is in the back. The above-mentioned preset splicing symbol may be " / ". As an example, the above-mentioned target entity code may be "SC001". The above-mentioned initial object code may be "PL". Then the spliced code after splicing may be "SC001 / PL".
[0046] Second step, determine the above-mentioned spliced code as the object code corresponding to the above-mentioned target object identifier, and record the corresponding relationship between the above-mentioned initial object code, the above-mentioned object information and them into a preset database.
[0047] Step 1034, for each object identifier among the respective object identifiers, perform the following steps:
[0048] Step 10341, obtain the object transfer information corresponding to the object identifier from a third data source, and generate a behavior code and an extended code corresponding to the object identifier based on the object transfer information.
[0049] In some embodiments, the above-mentioned execution entity may obtain object transfer information corresponding to the above-mentioned object identifier from a third data source, and generate a behavior code and an extended code corresponding to the above-mentioned object identifier based on the above-mentioned object transfer information. Among them, the above-mentioned behavior code includes an object code. The above-mentioned third data source may be a database or a data system for storing and managing object transfer information. The above-mentioned third data source may be different from the above-mentioned first data source and the above-mentioned second data source. The above-mentioned object transfer information records various states and changes experienced by an object during its life cycle, such as the creation, modification, deletion, transmission, use, etc. of the object. The above-mentioned object transfer information includes: status change information, status change time information, and extended information, and the above-mentioned extended information includes a custom code. The above-mentioned status change information may represent the status changes experienced by an object during its life cycle. The above-mentioned status change time information may represent the time when the status change occurs. For example, the above-mentioned status change information may be "packed and changed to shipped". The above-mentioned status change time may be "2025.02.27".
[0050] In some optional implementation manners of some embodiments, the above-mentioned execution entity may generate a behavior code and an extended code corresponding to the above-mentioned object identifier based on the above-mentioned object transfer information through the following steps:
[0051] First step, obtain preset behavior code specification information. Among them, the above-mentioned preset behavior code specification information includes a status code mapping information set and time specification information, and each status code mapping information in the above-mentioned status code mapping information set includes status change information and a status mapping code. Among them, the above-mentioned status mapping code may be a preset code representing the status change information. For example, the status change information included in the status code mapping information may be "packed and changed to shipped". The status mapping code corresponding to "packed and changed to shipped" may be "SHIPPED".
[0052] Second step, determine the object code corresponding to the above-mentioned object identifier as the target object code.
[0053] Third step, determine the status change information included in the above-mentioned object transfer information as the status change information to be queried.
[0054] Fourth step, determine the status change information in the above-mentioned status code mapping information set that is the same as the above-mentioned status change information to be queried as the target status change information.
[0055] Fifth step, determine the status code mapping information in the above-mentioned status code mapping information set that includes the above-mentioned target status change information as the target status code mapping information.
[0056] Step 6: Determine the state mapping code included in the above target state encoding mapping information as the target state mapping code.
[0057] Step 7: Based on the above time specification information, convert the above state change time information into a timestamp. Among them, the above time specification information can represent a method of standardized time representation. For example, the above time specification information can represent the ISO 8601 standard. The above state change time information can be "2025.02.27". The converted timestamp can be "2025-02-27".
[0058] Step 8: Concatenate the above target state mapping code and the above timestamp to obtain an initial behavior code. In practice, the above execution entity can concatenate the above target state mapping code and the above timestamp according to the second preset concatenation order and the second preset concatenation symbol to obtain an initial behavior code. For example, the above second preset concatenation order can be that the target state mapping code is in the front and the timestamp is in the back. The above preset concatenation symbol can be ".". As an example, the above target state mapping code can be "SHIPPED". The above timestamp can be "2025-02-27", then the initial behavior code can be "SHIPPED.2025-02-27".
[0059] Step 9: Concatenate the above target object code and the above initial behavior code to obtain a behavior code corresponding to the above object identifier. In practice, the above execution entity can concatenate the above target object code and the above initial behavior code according to the third preset concatenation order and the preset concatenation symbol. The above third preset concatenation order can be that the target object code is in the front and the initial behavior code is in the back. As an example, the above target object code can be "SC001 / PL", and the initial behavior code can be "SHIPPED.2025-02-27", then the behavior code can be "SC001 / PL / SHIPPED.2025-02-27".
[0060] Step 10: Determine the custom encoding included in the above extended information as the extended encoding, and record the above initial behavior code, the above extended encoding, and the corresponding relationship between the above object transfer information and them into a preset database. The above custom encoding can be a code preset by business personnel. For example, the above extended encoding can be AAA.
[0061] Step 10342: Generate a data lineage code corresponding to the object identifier based on the behavior code and the extended code.
[0062] In some embodiments, the above execution entity can generate a data lineage code corresponding to the above object identifier based on the above behavior code and the above extended code.
[0063] In some alternative implementations of some embodiments, the above-mentioned execution entity may generate a data lineage code corresponding to the above-mentioned object identifier based on the above-mentioned behavior encoding and the above-mentioned extended encoding through the following steps:
[0064] First step, splice the above-mentioned behavior encoding and the above-mentioned extended encoding to obtain a spliced encoding after splicing. In practice, the above-mentioned execution entity may splice the above-mentioned behavior encoding and the above-mentioned extended encoding according to a fourth preset splicing order and a preset splicing symbol. The above-mentioned fourth preset splicing order may be that the behavior encoding is in the front and the extended encoding is in the back. As an example, the above-mentioned behavior encoding may be "SC001 / PL / SHIPPED.2025-02-27", and the above-mentioned extended encoding may be "AAA", then the spliced encoding after splicing may be "SC001 / PL / SHIPPED.2025-02-27 / AAA".
[0065] Second step, determine the above-mentioned spliced encoding as the data lineage code corresponding to the above-mentioned object identifier.
[0066] Step 10343, in response to determining that the object identifier is a physical entity object identifier, control the printing device corresponding to the object identifier to print the data lineage code on a label paper.
[0067] In some embodiments, the above-mentioned execution entity may, in response to determining that the above-mentioned object identifier is a physical entity object identifier, control the printing device corresponding to the above-mentioned object identifier to print the above-mentioned data lineage code on a label paper. In practice, the above-mentioned execution entity may query the regional location information of the physical entity object corresponding to the above-mentioned object identifier from a preset supply chain management system. After that, the above-mentioned execution entity may control the printing device responsible for the area corresponding to the above-mentioned regional location information to print the above-mentioned data lineage code on a label paper. Among them, the above-mentioned regional location information may represent the warehouse location.
[0068] Step 10344, control the associated robotic arm to paste the label paper containing the data lineage code onto the physical entity object corresponding to the object identifier for the client to trace the full-cycle traceability data corresponding to the physical entity object.
[0069] In some embodiments, the above-mentioned execution entity may control the associated robotic arm to paste the label paper containing the data lineage code onto the physical entity object corresponding to the above-mentioned object identifier for the client to trace the full-cycle traceability data corresponding to the above-mentioned physical entity object. In practice, the above-mentioned execution entity may query the storage location information of the physical entity object corresponding to the above-mentioned object identifier from a preset warehouse management system. After that, the above-mentioned execution entity may control the robotic arm associated with the above-mentioned printing device to paste the label paper containing the data lineage code onto the physical entity object at the above-mentioned storage location information.
[0070] In some alternative implementation manners of some embodiments, after generating the data lineage code corresponding to the above object identifier based on the above behavior encoding and the above extended encoding, the above execution entity may further perform the following steps:
[0071] In response to determining that the above object identifier is a virtual data object identifier, bind the above data lineage code to the virtual data object in the preset data sink corresponding to the object identifier. In practice, the above execution entity may determine the above data lineage code as the label of the above virtual data to bind the data lineage code to the above virtual data object. Among them, the above virtual data object may refer to the data itself after being processed by various processing processes (for example, cleaning, deduplication, etc.).
[0072] In the process of adopting technical solutions to solve the problems mentioned in the background art, the following problems often accompany:
[0073] When receiving the data lineage code image sent by the user side and performing full-cycle data tracing, it is necessary to identify the data lineage code image to obtain the data lineage code for tracing. However, since the position of the code in the collected data lineage code image may change due to factors such as image content and shooting angle, identifying the data lineage code image without locating the code position requires searching for code features in the entire image, increasing the complexity and computational amount of identification. At the same time, the background outside the coding area in the image may interfere with the identification, resulting in a low accuracy of data lineage code identification.
[0074] Facing the above technical problems, the inventor decided to adopt the following solutions:
[0075] In some alternative implementation manners of some embodiments, the above execution entity may further perform the following steps:
[0076] First step, in response to receiving the data tracing request information including the data lineage code image sent by the user side, determine the above data lineage code image as the image to be recognized.
[0077] Second step, for each pixel point in the above image to be recognized, perform the following processing:
[0078] First sub-step, determine the three primary color value information of the above pixel point. Among them, the above three primary color value information may refer to the numerical information of the red, green, and blue channels in the pixel point. For example, the three primary color value information may be (26, 15, 90).
[0079] The second sub-step is to generate a color average value corresponding to the above pixel point according to the above three primary color value information. The above color average value may refer to the color average value of red, green and blue in the three primary color values. For example, the three primary color information may be (4, 5, 6), and the color average value is 5.
[0080] The third sub-step is to determine the number of color channels of the pixel point as a first preset value. For example, the first preset value may be "1".
[0081] The fourth sub-step is to determine the color average value as the color value of the pixel point.
[0082] In the third step, the image to be identified is determined as a pre-processed image after each pixel in the image to be identified is processed by the above pixel processing steps.
[0083] The fourth step is to perform denoising on the pre-processed image to obtain a denoised image to be identified. In practice, the execution subject may perform denoising on the pre-processed image by using a Gaussian filter algorithm to obtain a denoised image to be identified.
[0084] The fifth step is to perform binarization processing on the denoised image to be identified to obtain a binarized image to be identified. In practice, the execution subject may perform binarization processing on the denoised image to be identified by an adaptive threshold binarization algorithm to obtain a binarized image to be identified. The binarized image to be identified may be an image obtained by binarizing the denoised image to be identified.
[0085] Step 6: Perform the following coding and positioning processing on the above binary image to be identified:
[0086] Sub-step 1: performing edge detection processing on the above-mentioned binary image to be identified to obtain an edge image. In practice, the above-mentioned execution subject can perform edge detection processing on the above-mentioned binary image to be identified by a Sobel edge detection algorithm. The above-mentioned edge image can be an edge image in which edge pixels are marked after the binary image is processed by an edge detection algorithm.
[0087] Sub-step 2: dilate the edge image to obtain a dilated image. In practice, the execution subject may dilate the edge image using a morphological dilation technique to obtain a dilated image. The dilated image may be an image obtained by dilating the edge image.
[0088] Sub-step three, performing an erosion operation on the dilated image to obtain an eroded image. In practice, the execution subject may perform an erosion operation on the dilated image using a morphological erosion technique to obtain an eroded image. The eroded image may be an image obtained by performing an erosion operation on the dilated image.
[0089] Sub-step 4: Perform contour extraction processing on the above corrosion image to obtain a contour position information set. In practice, the above execution entity can perform contour extraction processing on the above corrosion image through a boundary tracking algorithm. Among them, each contour position information in the above contour position information set can represent the position of the extracted contour. The above contour position information may include the coordinates of each pixel point.
[0090] Sub-step 5: Determine the position information corresponding to the circumscribed rectangle area of the above contour position information set in the above binary image to be recognized as the circumscribed rectangle position information. Among them, the above circumscribed rectangle position information may be the coordinates of the four vertices of the circumscribed rectangle. In practice, the above execution entity can execute a preset function (for example, the boundingRect function) to determine the upper left corner coordinates (x, y), width w, and height h of the circumscribed rectangle corresponding to the circumscribed rectangle area of the contour position information set in the above binary image to be recognized. Then, the above execution entity can determine (x + width w, y) as the upper right corner coordinates of the circumscribed rectangle. After that, the above execution entity can determine (x + width w, y + height h) as the lower right corner coordinates of the circumscribed rectangle. Then, the above execution entity can determine (x, y + height h) as the lower left corner coordinates of the circumscribed rectangle. Finally, the above execution entity can determine the above upper left corner coordinates, the above upper right corner coordinates, the above lower right corner coordinates, and the above lower left corner coordinates as the circumscribed rectangle position information.
[0091] Step 7: Determine the above circumscribed rectangle position information as the encoded area position information.
[0092] Step 8: Based on the above encoded area position information, perform encoded recognition processing on the above binary image to be recognized to obtain a data lineage code. In practice, first, the above execution entity can retain the image within the encoded area position information in the binary image to be recognized through image cropping technology, and crop the image outside the encoded area position information to obtain an encoded positioning image. After that, the above execution entity can recognize the encoded positioning image through OCR technology to obtain the recognized code as the data lineage code.
[0093] Step 9: Identify and split the above data lineage code to obtain a traceability link coding sequence. Among them, the above traceability link coding sequence sequentially includes an extended code, an initial behavior code, an initial object code, and a subject code. In practice, the above execution subject can identify the positions of the preset splicing symbols in the above data lineage code. After that, the above execution subject can use the preset splicing symbol as a division identifier to split the above data lineage code from back to front. As an example, the above data lineage code can be "SC001 / PL / SHIPPED.2025-02-27 / AAA". Then the obtained traceability link coding sequence after splitting can be "{AAA, SHIPPED.2025-02-27, PL, SC001}". The codes in the above traceability link coding sequence are in turn: "AAA" is the extended code, "PL" is the initial behavior code, "SHIPPED.2025-02-27" is the initial object code, and "SC001" is the subject code.
[0094] Step 10: Generate full-cycle traceability data corresponding to the above data lineage code based on the above traceability link coding sequence. In practice, the above execution subject can query the object transfer information, object information, and subject type information corresponding to the initial behavior code, initial object code, and subject code in the traceability link coding sequence from a preset database. After that, the above execution subject can determine the queried object transfer information, object information, and subject type information as the full-cycle traceability data.
[0095] Step 11: Send the above full-cycle traceability data to the above user terminal.
[0096] The above technical solution and its related content, as an inventive point of an embodiment of the present disclosure, solve the technical problem of "low accuracy in identifying data lineage codes". The factors that lead to low accuracy in identifying data lineage codes are often as follows: Since the position of the code in the collected data lineage code image may change due to factors such as image content and shooting angle, identifying a data lineage code image without locating the code position requires searching for code features throughout the image, increasing the complexity and computational amount of identification. At the same time, the background outside the coded area in the image may interfere with the identification, resulting in low accuracy in identifying data lineage codes. If the above factors are solved, the effect of improving the accuracy of data lineage code identification can be achieved. To achieve this effect, first, in response to receiving data traceability request information including a data lineage code image sent by the user terminal, the above data lineage code image is determined as the image to be recognized. Then, for each pixel point in the above image to be recognized, the following processing is performed: The first step is to determine the tristimulus value information of the above pixel point. Thus, the tristimulus value information used to generate the color average of the pixel point can be obtained. The second step is to generate the color average corresponding to the above pixel point according to the above tristimulus value information. The third step is to determine the number of color channels of the above pixel point as a first preset value. Thus, the number of pixel channels of the pixel point can be changed. After that, the above color average is determined as the color value of the above pixel point. Then, the image to be recognized after processing each pixel point in the image to be recognized through the above pixel point processing steps is determined as the preprocessed image. Thus, through the above processing, the image to be recognized can be converted into a grayscale image, that is, the preprocessed image. After that, the above preprocessed image is denoised to obtain a denoised image to be recognized. Thus, the noise existing in the preprocessed image can be removed. Then, the above denoised image to be recognized is binarized to obtain a binarized image to be recognized. Thus, the denoised image to be recognized can be converted into a binarized image to be recognized with more prominent key features such as edges and textures. After that, the following coding location processing is performed on the above binarized image to be recognized: The first step is to perform edge detection processing on the above binarized image to be recognized to obtain an edge image. Thus, an edge image marking edge pixel points can be obtained for subsequent extraction of contours. The second step is to perform a dilation operation on the above edge image to obtain a dilated image. Thus, through the dilation operation, small breaks or gaps in the edge can be filled, making the edge more complete and continuous, thereby enhancing the edge features. The third step is to perform an erosion operation on the above dilated image to obtain an eroded image. Thus, small noise points or isolated pixel points in the image can be removed through the erosion operation. The fourth step is to perform contour extraction processing on the above eroded image to obtain a contour position information set. Thus, a contour position information set of each contour that may include a data lineage code can be obtained.Step 5: Determine the position information corresponding to the circumscribed rectangle region of the above contour position information set in the above binary image to be recognized as the circumscribed rectangle position information. Thus, the circumscribed rectangle position information of the rectangle region containing the data lineage code can be obtained. Then, determine the above circumscribed rectangle position information as the coding region position information. Thus, the coding region position information of the region where the data lineage code is located can be obtained. Through the above coding positioning process, the position information of the data lineage code in the binary image to be recognized, that is, the coding region position information, is determined. Next, based on the above coding region position information, perform coding recognition processing on the above binary image to be recognized to obtain the data lineage code. Thus, based on the coding region position information, the recognition range can be further reduced, and the interference of non-coding regions (i.e., the background) can be excluded, thereby improving the accuracy of coding recognition. Then, perform recognition and splitting processing on the above data lineage code to obtain a traceability link coding sequence, where the above traceability link coding sequence sequentially includes an extended code, an initial behavior code, an initial object code, and a subject code. Thus, a traceability link coding sequence for generating full-cycle traceability data can be obtained. Then, based on the above traceability link coding sequence, generate full-cycle traceability data corresponding to the above data lineage code. Finally, send the above full-cycle traceability data to the above user terminal. Also, because before recognizing the data lineage code image, the position information of the data lineage code in the binary image to be recognized, that is, the coding region position information, is determined through coding positioning processing. Based on the coding region position information, perform coding recognition processing on the image to be recognized, further reducing the recognition range and excluding the interference of non-coding regions (i.e., the background), thereby improving the accuracy of coding recognition.
[0097] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: Through the data lineage code generation method of some embodiments of the present disclosure, the waste of computer computing resources is reduced. Specifically, the reason for the waste of computer computing resources is that in each system or department, separate databases are used to record the relevant information of objects to record the full life cycle information of the objects. When tracing the full life cycle information of the objects, in order to associate the relevant records in different databases, the database system needs to perform complex join operations, wasting computer computing resources. Based on this, in the data lineage code generation method of some embodiments of the present disclosure, first, various subject type information is obtained from the first data source. Thus, various subject type information of different subjects (such as different product lines, different business departments) can be obtained. Then, based on the above-mentioned various subject type information, various subject codes are generated, where each subject code in the above-mentioned various subject codes corresponds to a corresponding subject type information in the above-mentioned various subject type information. Thus, various subject codes representing each subject can be generated. After that, for each subject type information in the above-mentioned various subject type information, the following coding steps are performed: The subject code corresponding to the above-mentioned subject type information in the various subject codes is determined as the target subject code. Thus, the target subject codes for generating various object codes can be obtained to achieve the inheritance of data lineage. Next, various object information corresponding to the above-mentioned subject type information is obtained from the second data source, where each object information in the above-mentioned various object information corresponds to an object identifier. Thus, various object information under the subject corresponding to the subject type information can be obtained. Then, based on the above-mentioned various object information and the above-mentioned target subject code, various object codes corresponding to the various object identifiers are generated, where each object identifier in the above-mentioned various object identifiers corresponds to a corresponding object code in the above-mentioned various object codes, and the object code includes the subject code. Thus, various object codes for the various object information can be generated and the object code includes the subject code, that is, the subject code of the subject to which the object belongs is inherited. Then, for each object identifier in the above-mentioned various object identifiers, the following steps are performed: First step, object transfer information corresponding to the above-mentioned object identifier is obtained from the third data source, and based on the above-mentioned object transfer information, a behavior code and an extended code corresponding to the above-mentioned object identifier are generated, where the behavior code includes the object code. Thus, the behavior code of the object transfer information can be generated and the behavior code inherits the object code of the object. Second step, based on the above-mentioned behavior code and the above-mentioned extended code, a data lineage code corresponding to the above-mentioned object identifier is generated. Thus, a data lineage code recording the full life cycle information of the object can be generated. In response to determining that the above-mentioned object identifier is a physical entity object identifier, the printing device corresponding to the above-mentioned object identifier is controlled to print the above-mentioned data lineage code on a label paper. Thus, when the object is a transferred physical entity, the data lineage code can be printed on the label paper.Control the associated robotic arm to paste the label paper containing the data lineage code onto the physical entity object corresponding to the above object identifier, so that the client can trace the full-cycle traceability data corresponding to the physical entity object. Thus, the client can trace the full-cycle traceability data corresponding to the physical entity object through the data lineage code with inherited data lineage, without performing complex connection operations between databases, reducing the waste of computer computing resources.
[0098] Further reference Figure 2 , as an implementation of the methods shown in the respective figures, the present disclosure provides some embodiments of a data lineage code generation device, and these device embodiments correspond to Figure 1 the method embodiments shown, and the device can be specifically applied to various electronic devices.
[0099] As Figure 2 shown, some embodiments of the data lineage code generation device 200 include: an acquisition unit 201, a generation unit 202, and an encoding unit 203. Among them, the acquisition unit 201 is configured to acquire various subject type information from a first data source; the generation unit 202 is configured to generate various subject codes based on the various subject type information, where each subject code in the various subject codes corresponds to a corresponding subject type information in the various subject type information; the encoding unit 203 is configured to perform the following encoding steps for each subject type information in the various subject type information: determine the subject code corresponding to the subject type information in the various subject codes as the target subject code; acquire various object information corresponding to the subject type information from a second data source, where each object information in the various object information corresponds to an object identifier; generate various object codes corresponding to the various object identifiers based on the various object information and the target subject code, where each object identifier in the various object identifiers corresponds to a corresponding object code in the various object codes, and the object code includes the subject code; for each object identifier in the various object identifiers, perform the following steps: acquire the object transfer information corresponding to the object identifier from a third data source, and generate a behavior code and an extended code corresponding to the object identifier based on the object transfer information, where the behavior code includes the object code; generate a data lineage code corresponding to the object identifier based on the behavior code and the extended code; in response to determining that the object identifier is a physical entity object identifier, control the printing device corresponding to the object identifier to print the data lineage code onto a label paper; control the associated robotic arm to paste the label paper containing the data lineage code onto the physical entity object corresponding to the object identifier, so that the client can trace the full-cycle traceability data corresponding to the physical entity object.
[0100] It can be understood that the various units described in the apparatus 200 correspond to the respective steps in the method described with reference to Figure 1 Thus, the operations, features, and beneficial effects described above for the method also apply to the apparatus 200 and the units included therein, and will not be elaborated here.
[0101] Reference will now be made to Figure 3 , which shows a schematic structural diagram of an electronic device 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present disclosure.
[0102] As Figure 3 shown, the electronic device 300 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 301, which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other through a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0103] Generally, the following devices may be connected to the I / O interface 305: an input device 306 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 309. The communication device 309 may allow the electronic device 300 to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 3 shows an electronic device 300 having various devices, it should be understood that it is not required to implement or include all the shown devices. Instead, more or fewer devices may be implemented or included. Figure 3 Each block shown in
[0104] In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product that includes a computer program carried on a computer-readable medium, and the computer program contains program codes for performing the methods shown in the flowcharts. In such some embodiments, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the functions defined in the methods of some embodiments of the present disclosure are performed.
[0105] It should be noted that the computer-readable medium described in some embodiments of the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In some embodiments of the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. And in some embodiments of the present disclosure, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program codes. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and the computer-readable signal medium can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program codes contained on the computer-readable medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0106] In some embodiments, the client and the server can communicate using any currently known or future-developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0107] The computer-readable medium can be included in an electronic device; it can also exist separately without being assembled into the electronic device. The computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device is caused to: obtain information on each subject type from a first data source; generate respective subject codes based on the information on each subject type, where each subject code among the respective subject codes corresponds to a corresponding one of the information on each subject type; for each of the information on each subject type among the information on each subject type, perform the following encoding steps: determine the subject code corresponding to the subject type information among the respective subject codes as the target subject code; obtain respective object information corresponding to the subject type information from a second data source, where each of the respective object information has an object identifier corresponding thereto; generate respective object codes corresponding to the respective object identifiers based on the respective object information and the target subject code, where each of the respective object identifiers corresponds to a corresponding one of the respective object codes, and the object codes include subject codes; for each of the respective object identifiers among the respective object identifiers, perform the following steps: obtain object transfer information corresponding to the object identifier from a third data source, and generate a behavior code and an extended code corresponding to the object identifier based on the object transfer information, where the behavior code includes the object code; generate a data lineage code corresponding to the object identifier based on the behavior code and the extended code; in response to determining that the object identifier is a material entity object identifier, control a printing device corresponding to the object identifier to print the data lineage code on a label paper; and control an associated robotic arm to paste the label paper containing the data lineage code onto the material entity object corresponding to the object identifier for the client to trace the full-cycle traceability data corresponding to the material entity object.
[0108] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may execute entirely on the user's computer, partially on the user's computer, execute as a stand-alone software package, execute partially on the user's computer and partially on a remote computer, or execute entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0109] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks may occur in a different order than noted in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system that performs the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0110] The units described in some embodiments of the present disclosure may be implemented in software or in hardware. The described units may also be provided in a processor. For example, it may be described as: a processor includes an acquisition unit, a generation unit, and an encoding unit. Among them, the names of these units do not constitute a limitation on the unit itself in some cases. For example, the generation unit may also be described as "the unit that generates each entity code based on the above-mentioned various entity type information".
[0111] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), systems on a chip (SOC), complex programmable logic devices (CPLD), and the like.
[0112] The above description is only some preferred embodiments of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by specific combinations of technical features, but should also cover other technical solutions formed by any combination of technical features or their equivalent features without departing from the inventive concept. For example, a technical solution formed by mutually replacing features with technical features having similar functions (but not limited to) disclosed in the embodiments of the present disclosure.
Claims
1. A method for generating a data blood relationship code, comprising: Acquire each subject type information from the first data source; Based on the respective subject type information, generating respective subject codes, wherein each subject code in the respective subject codes corresponds to a corresponding piece of subject type information in the respective subject type information; For each piece of subject type information in the subject type information, the following encoding steps are performed: Determine the subject code corresponding to the subject type information in each subject code as the target subject code; Acquire, from a second data source, each piece of object information corresponding to the subject type information, wherein each piece of object information corresponds to an object identifier; Based on the respective object information and the target subject code, generating respective object codes corresponding to respective object identifiers, wherein each of the respective object identifiers corresponds to a corresponding object code in the respective object codes, and the object codes include subject codes; For each of the object identifiers, perform the following steps: Acquire object flow information corresponding to the object identifier from a third data source, and generate a behavior code and an extended code corresponding to the object identifier based on the object flow information, wherein the behavior code includes an object code; Based on the behavior code and the extended code, generating a data blood relationship code corresponding to the object identifier; In response to determining that the object identifier is a material entity object identifier, controlling a printing device corresponding to the object identifier to print the data blood relationship code onto a label paper; The associated robotic arm is controlled to stick a label paper containing a data lineage code onto the material entity object corresponding to the object identifier, so that the user end can trace the full-cycle traceability data corresponding to the material entity object.
2. The method according to claim 1, wherein: After generating the data blood relationship code corresponding to the object identifier based on the behavior code and the extended code, the method further includes: In response to determining that the object identifier is a virtual data object identifier, the data lineage relationship code is bound to a virtual data object in a preset data sink corresponding to the object identifier.
3. The method according to claim 1, wherein: The step of generating a data kinship code corresponding to the object identifier based on the behavior code and the extended code includes: splicing the behavior code and the extended code to obtain a spliced code; The concatenated code is determined as a data lineage relationship code with the object identifier.
4. The method according to claim 1, wherein: The subject type information includes a subject type identifier and a subject type abbreviation identifier; And generating each subject code based on each subject type information includes: Obtaining encoding requirement information corresponding to each subject type information; For each piece of subject type information in the subject type information, perform the following steps: Determine the subject type abbreviation identifier included in the subject type information; Call the globally unique serial number generator to generate a serial number; Based on the coding requirement information, the subject type abbreviation identifier and the serial number are concatenated to obtain the subject code, and the subject code and the subject type information and the corresponding relationship between them are entered into a preset database.
5. The method according to claim 1, wherein: The generating of each object code corresponding to each object identifier based on each object information and the target subject code includes: For each of the various pieces of object information, the following encoding process is performed: Determine the object identifier corresponding to the object information as the target object identifier; According to the preset object coding specification information, the object information is converted to obtain an initial object coding; splicing the target subject code and the initial object code to obtain a spliced code; The concatenated code is determined as an object code corresponding to the target object identifier, and the initial object code and the object information and the corresponding relationship therebetween are entered into a preset database.
6. The method according to claim 1, wherein: The object flow information includes: state change information, state change time information and extended information, wherein the extended information includes a custom code; and the generating of a behavior code and an extended code corresponding to the object identifier based on the object flow information includes: Acquire preset behavior coding specification information, wherein the preset behavior coding specification information includes a state coding mapping information set and time specification information, and each state coding mapping information in the state coding mapping information set includes state change information and a state mapping code; Determine the object code corresponding to the object identifier as the target object code; Determining the state change information included in the object flow information as the state change information to be queried; Determine the state change information in the state code mapping information set that is the same as the state change information to be queried as the target state change information; Determine the state coding mapping information including the target state change information in the state coding mapping information set as the target state coding mapping information; Determine the state mapping code included in the target state code mapping information as the target state mapping code; Based on the time specification information, converting the state change time information into a timestamp; Concatenate the target state mapping code and the timestamp to obtain an initial behavior code; Concatenating the target object code and the initial behavior code to obtain a behavior code corresponding to the object identifier; The extended information including the custom code is determined as the extended code, and the initial behavior code, the extended code and the object flow information and the corresponding relationship therebetween are entered into a preset database.
7. A device for generating a data blood relationship code, comprising: An acquisition unit, configured to acquire each subject type information from a first data source; A generating unit is configured to generate each subject code based on each subject type information, wherein each subject code in each subject code corresponds to a corresponding one of the subject type information in each subject type information; The encoding unit is configured to perform the following encoding steps for each subject type information in the subject type information: determine the subject code corresponding to the subject type information in each subject code as the target subject code; obtain each object information corresponding to the subject type information from a second data source, wherein each object information in the object information corresponds to an object identifier; based on the object information and the target subject code, generate each object code corresponding to each object identifier, wherein each object identifier in the object identifier corresponds to an object code corresponding to each object code, and the object code includes a subject code; for each object identifier in the object identifier, perform The following steps are performed: obtaining object flow information corresponding to the object identifier from a third data source, and generating a behavior code and an extension code corresponding to the object identifier based on the object flow information, wherein the behavior code includes an object code; generating a data lineage code corresponding to the object identifier based on the behavior code and the extension code; in response to determining that the object identifier is a material entity object identifier, controlling a printing device corresponding to the object identifier to print the data lineage code onto a label paper; controlling an associated robotic arm to paste the label paper containing the data lineage code onto the material entity object corresponding to the object identifier, so that a user terminal can trace the full-cycle traceability data corresponding to the material entity object.
8. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
9. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Entity relationship extraction method and device, electronic equipment and storage medium
CN115357723A
Data blood relationship determination method, device and equipment and readable storage medium
CN117238398A
Data blood relationship model generation method and device, electronic equipment and readable medium
CN118779317A
Embedding and reading imperceptible codes on objects
US7044395B1
Blockchain-based user data transfer method, apparatus and device
WO2023207086A1