Card manufacturing data processing method, device, system, equipment, medium and product
Patent Information
- Application Number
- CN202611062646.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-16
- Publication Date
- 2026-10-30
AI Technical Summary
若在合成图传输或存储过程中,该合成图被攻击者整体替换,例如将合规风景照替换为违规图像,导致实际制卡内容与用户所需的内容不一致
[0013]本申请实施例中,通过服务端接收客户端上传的包含N个数据层及各自摘要值的第一制卡数据包,而非合成图本身,然后服务端按照预设合成顺序将各数据层重新合成为第一图像并计算第二摘要值,然后将各数据层、各层摘要值及第二摘要值打包为第二制卡数据包发送至工厂端,由于工厂端并非直接接收和使用客户端上传的合成图,而是基于各数据层重新合成图像并校验摘要值,即使合成图在传输过程中被替换,由于替换后的合成图无法通过摘要值校验,工厂端能够及时发现并拒绝制卡,如此本申请实施例将制卡依据从不可拆分的合成图转变为可逐层验证的数据层集合,在数据层面实现了对合成图整体替换攻击的有效防御,保障了实际制卡内容与用户需求的一致性。
Smart Images

Figure CN123013180A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of information security technology, specifically relating to a card manufacturing data processing method, apparatus, system, equipment, medium, and product. Background Technology
[0002] Currently, some cards that users use can be designed by themselves. For example, a user can design a bank card by themselves. The image and other information on the card can be added by the user according to their own needs. After the user completes the image editing, the system merges and renders all operations into a final flat composite image. Then, the image and process parameters are packaged together and sent to the card manufacturing factory. The card manufacturing factory then manufactures the card based on the composite image and process parameters.
[0003] In the above scheme, the final composite image is an indivisible, single file and the only direct basis for card production used by the factory. If, during the transmission or storage of the composite image, it is completely replaced by an attacker—for example, replacing a compliant landscape photo with a non-compliant image—the actual card content will be inconsistent with the content required by the user. Summary of the Invention
[0004] This application provides a card manufacturing data processing method, apparatus, system, device, medium, and product, which transforms the basis for card manufacturing from an indivisible composite diagram into a set of data layers that can be verified layer by layer. This effectively defends against overall replacement attacks on the composite diagram at the data level, ensuring the consistency between the actual card manufacturing content and user needs.
[0005] To solve the above-mentioned technical problems, this application is implemented as follows: In a first aspect, embodiments of this application provide a card-making data processing method, which is applied to a server and includes: The system receives a first card-making data packet uploaded by the client; wherein the first card-making data packet includes N data layers and a first digest value corresponding to each data layer, and a data layer includes a type of layer data, which is generated by the client in response to the type of editing operation performed by the user; According to a preset synthesis order, the data layers are synthesized to obtain a first image, and a second summary value of the first image is calculated. Each data layer, the first digest value corresponding to each data layer, and the second digest value are packaged into a second card production data packet, and the second card production data packet is sent to the factory so that the factory can verify the first digest value and the second digest value corresponding to each data layer. If the first digest value and the second digest value corresponding to each data layer pass the verification, the card is produced based on the second card production data packet.
[0006] Secondly, embodiments of this application provide a card manufacturing data processing method, which is applied at the factory level and includes: The system receives a second card-making data packet sent by the server. The second card-making data packet includes N data layers, a first digest value and a second digest value corresponding to each data layer. The N data layers and the first digest value corresponding to each data layer are data uploaded by the client to the server in the first card-making data packet. Each data layer includes a type of layer data, which is generated by the client in response to an editing operation of that type performed by the user. The second digest value is the digest value of the first image calculated by the server after combining the data layers according to a preset synthesis order to obtain the first image. Verify the first digest value and the second digest value corresponding to each of the data layers; If the first digest value and the second digest value corresponding to each of the data layers pass the verification, the card is manufactured based on the first card manufacturing data packet.
[0007] Thirdly, embodiments of this application provide a card manufacturing data processing system, which includes: A client is used to send a first card-making data packet to a server; wherein the first card-making data packet includes N data layers and a first digest value corresponding to each data layer, and a data layer includes a type of layer data, the type of layer data being generated by the client in response to an editing operation of the type performed by the user; The server is configured to synthesize each data layer according to a preset synthesis order to obtain a first image, and calculate a second digest value of the first image; package each data layer, the first digest value corresponding to each data layer, and the second digest value into a second card production data packet, and send the second card production data packet to the factory. On the factory side, the system verifies the first digest value and the second digest value corresponding to each data layer, and if the first digest value and the second digest value corresponding to each data layer pass the verification, the system produces a card based on the second card production data packet.
[0008] Fourthly, embodiments of this application provide a card-making data processing apparatus, which is applied to a server and includes: The receiving module is used to receive the first card-making data packet uploaded by the client; wherein the first card-making data packet includes N data layers and a first digest value corresponding to each data layer, and a data layer includes a type of layer data, which is generated by the client in response to the type of editing operation performed by the user; The compositing module is used to compose each of the data layers according to a preset compositing order to obtain a first image, and to calculate a second summary value of the first image; The sending module is used to package each data layer, the first digest value and the second digest value corresponding to each data layer into a second card production data packet, and send the second card production data packet to the factory end, so that the factory end can verify the first digest value and the second digest value corresponding to each data layer. If the first digest value and the second digest value corresponding to each data layer pass the verification, the card is produced based on the second card production data packet.
[0009] Fifthly, embodiments of this application provide a card manufacturing data processing device, which is applied at the factory level. The device includes: The receiving module is used to receive a second card-making data packet sent by the server. The second card-making data packet includes N data layers, a first digest value and a second digest value corresponding to each data layer. The N data layers and the first digest value corresponding to each data layer are data in the first card-making data packet uploaded by the client to the server. Each data layer includes a type of layer data, which is generated by the client in response to the type of editing operation performed by the user. The second digest value is the digest value of the first image calculated by the server after synthesizing the data layers according to a preset synthesis order to obtain the first image. The verification module is used to verify the first digest value and the second digest value corresponding to each of the data layers; The card-making module is used to make a card based on the first card-making data packet, provided that the first digest value and the second digest value corresponding to each of the data layers have passed the verification.
[0010] Sixthly, embodiments of this application provide an electronic device, including a processor and a memory storing computer program instructions; the processor executes the computer program instructions to implement the card data processing method described above.
[0011] In a seventh aspect, embodiments of this application provide a computer storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the card data processing method described above is implemented.
[0012] Eighthly, embodiments of this application provide a computer program product, wherein instructions in the computer program product, when executed by a processor of an electronic device, cause the electronic device to perform the card data processing method described above.
[0013] In this embodiment, the server receives a first card-making data packet uploaded by the client, containing N data layers and their respective digest values, instead of the composite image itself. The server then reassembles each data layer into a first image according to a preset synthesis order and calculates a second digest value. Finally, the server packages each data layer, each layer's digest value, and the second digest value into a second card-making data packet and sends it to the factory. Since the factory does not directly receive and use the composite image uploaded by the client, but reassembles the image based on each data layer and verifies the digest value, even if the composite image is replaced during transmission, the factory can promptly detect and refuse card production because the replaced composite image cannot pass the digest value verification. Thus, this embodiment transforms the basis for card production from an indivisible composite image into a set of data layers that can be verified layer by layer. This effectively defends against overall replacement attacks on the composite image at the data level, ensuring the consistency between the actual card content and user requirements. Attached Figure Description
[0014] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is a schematic diagram of the structure of a card-making data processing system provided in one embodiment of this application; Figure 2 This is a schematic flowchart of a card-making data processing method provided in one embodiment of this application; Figure 3 This is a schematic flowchart of a card-making data processing method provided in one embodiment of this application; Figure 4 This is a schematic flowchart of a card-making data processing method provided in one embodiment of this application; Figure 5 This is a schematic flowchart of a card-making data processing method provided in one embodiment of this application; Figure 6 This is a schematic diagram of the structure of a card-making data processing device provided in another embodiment of this application; Figure 7 This is a schematic diagram of the structure of a card-making data processing device provided in another embodiment of this application; Figure 8 This is a schematic diagram of the structure of an electronic device provided in another embodiment of this application. Detailed Implementation
[0016] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0017] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0018] The terminology used in the embodiments of this invention will be explained below.
[0019] Hash: It transforms an input of arbitrary length into an output of fixed length through a hash algorithm. This output is called the hash value.
[0020] Exchangeable Image File Format (EXIF) data can be a set of metadata embedded in image files such as JPEG and TIFF, recording auxiliary parameters of photo shooting and processing. For example, EXIF data may contain shooting parameters, device information, time information, geographic information, and image attributes. Shooting parameters can be exposure parameters of the camera at the time of shooting, such as aperture, shutter speed, and ISO. Device information can be information about the camera module at the time of shooting, such as camera model, lens model, and manufacturer. Time information can be the time when the photo was taken. Geographic information can be the location information where the photo was taken. Image attributes can be the attribute information of the captured photo, such as pixel size, color space, and resolution.
[0021] The technical solution of this application embodiment can be applied to the scenario of user-made cards. For example, if user Zhang wants to make a bank card for a certain bank, after logging into the bank's mobile banking app on his phone, Zhang first uploads a travel landscape photo as the original image for the card, then increases the brightness of the travel landscape photo by 20%, and selects a "gold metal" border, which is a decorative border added to the outer edge of the final composite image of the bank card. Then, Zhang increases the saturation of the global image (i.e., the current canvas, including the travel landscape photo uploaded by Zhang, the added border, and the image formed after increasing the brightness by 20%) by 10%, and then adds a "star" sticker to the lower right corner of the global image and rotates the "star" sticker 15° clockwise. After completing the above operations, Zhang submits the application to the bank's backend for review. After the bank approves the application, the factory can produce the bank card required by Zhang according to his needs.
[0022] It should be noted that the digest values (including the first digest value, and the second digest value, third digest value, etc. mentioned in the following embodiments) in the embodiments of this application can be generated by calculating the corresponding data using a hash algorithm, a secure hash algorithm, or a message digest algorithm. These algorithms can include, but are not limited to, MD5, Secure Hash Algorithm 1 (SHA-1), Secure Hash Algorithm 256 (SHA-256), SM3, etc. The following embodiments use the digest value calculated by a hash algorithm as an example for illustration; that is, the following embodiments use "digest value" as an example of "hash value." In other words, all hash values in the following implementations can be replaced with digest values.
[0023] The card-making data processing method provided in this application embodiment can be applied to, for example... Figure 1 In the system architecture shown, specifically combined with Figure 1 Please provide a detailed explanation.
[0024] Figure 1 This is an architectural diagram of a card-making data processing system according to an exemplary embodiment. Figure 1 As shown, the card-making data processing system 100 may include: Client 110 is used to send a first card-making data packet to server 120; wherein, the first card-making data packet includes N data layers and a first hash value corresponding to each data layer, and a data layer includes a type of layer data, which is generated by the client in response to the type of editing operation performed by the user; Server 120 is used to synthesize each data layer according to a preset synthesis order to obtain a first image and calculate the second hash value of the first image; and to package each data layer, the first hash value and the second hash value corresponding to each data layer into a second card production data packet and send the second card production data packet to the factory. Factory-side 130 is used to verify the first hash value and the second hash value corresponding to each data layer, and to produce cards based on the second card production data packet if the first hash value and the second hash value corresponding to each data layer pass the verification.
[0025] In this context, the client 110 and the server 120 can be the front-end and back-end of a bank's operating system. For example, in the example above, the client 110 and the server can be the front-end and back-end of a mobile banking application on Xiao Zhang's mobile phone.
[0026] The first card-making data packet can be a card-making data packet sent by the client 110 to the server 120. The first card-making data packet can include N data layers and a first hash value corresponding to each data layer.
[0027] A data layer as described above can include a type of layer data, which is generated by the client in response to an editing operation of that type performed by the user. In the example above, Xiao Zhang uploaded a photo of his travel scenery; this is an image editing operation, corresponding to the image data layer. The layer data of this image data layer includes the image data of the travel scenery photo uploaded by Xiao Zhang and the shooting parameters corresponding to the travel scenery photo, i.e., the EXIF metadata of the travel scenery photo.
[0028] For example, in the above example, Xiao Zhang increases the brightness of the travel scenery picture by 20%. This is an editing operation on the image parameters, which corresponds to the image adjustment data layer. The layer data of the image adjustment data layer includes the image adjustment parameters. For example, if Xiao Zhang increases the brightness of the travel scenery picture by 20%, then the adjustment parameter is "brightness increase by 20%".
[0029] For example, in the above example, Xiao Zhang selected a "gold metallic" border. This is an editing operation on the border, which corresponds to the border data layer. The layer data of this border data layer includes the border parameters added by Xiao Zhang, such as the border style sequence number (identity, ID) selected by Xiao Zhang, the border color, line width, inner margin, etc. It should be noted that the border parameters can be described in the form of vector data groups, or in other forms, which are not limited in this embodiment.
[0030] For example, in the above example, Xiao Zhang increases the saturation of the global image by 10%, which is also an editing operation on the image parameters. This corresponds to the image adjustment data layer, whose layer data includes the image adjustment parameters. For example, if Xiao Zhang increases the saturation of the global image by 10%, then the adjustment parameter is "saturation increase by 10%".
[0031] For example, in the above example, Xiao Zhang adds a "star" sticker to the bottom right corner of the global image and rotates the "star" sticker by 15°. This is an editing operation of adding a sticker, which corresponds to the sticker data layer. The layer data of this sticker data layer includes the sticker uploaded by the user, as well as the parameters of the sticker, such as the "star" sticker uploaded by Xiao Zhang, and the position, rotation angle, scaling ratio, and layer of the "star" sticker on the card. The position of the sticker on the card can be the coordinates of the sticker relative to the top left corner of the card.
[0032] It should be noted that users can add multiple stickers, and the specific number of stickers added by a user can be set according to the user's needs, which is not limited in this embodiment.
[0033] The first hash value corresponding to each data layer can be the hash value corresponding to each data layer. For each data layer, the first hash value can be obtained based on the layer data of that data layer. As in the example above, for the image data layer, its first hash value can be determined based on the image data and shooting parameters of the original image uploaded by the user. For the image adjustment data layer, its first hash value can be determined based on the image adjustment parameters. For the border data layer, its first hash value can be determined based on the border parameters. For the sticker data layer, its first hash value can be determined based on the sticker parameters.
[0034] It should be noted that the first hash value of each data layer mentioned above can be calculated based on client 110. The data layer division in the above example is merely an example; those skilled in the art should understand that the data layers are not limited to the four data layers shown in the example above. The specific number of data layers can be set according to user needs and is not limited in this embodiment. The preset synthesis order can be a pre-set synthesis order of the data layers, for example, the preset synthesis order could be: image data layer → image adjustment layer → border data layer → sticker data layer.
[0035] The first image can be an image obtained by combining the data layers according to a preset synthesis order.
[0036] The second hash value can be the hash value of the first image. This second hash value can be determined based on the image data of the first image.
[0037] The second card-making data packet can be a data packet that packages each data layer and the first hash value and second hash value corresponding to each data layer.
[0038] In some embodiments of this application, a first card-making data packet can be sent from a client to a server. The first card-making data packet includes N data layers and a first hash value corresponding to each data layer. Each data layer includes a type of layer data, which is generated by the client in response to a user's type of editing operation. The server can then synthesize the data layers according to a preset synthesis order to obtain a first image and calculate a second hash value for the first image. The server can also package each data layer, the first hash value, and the second hash value corresponding to each data layer into a second card-making data packet and send the second card-making data packet to the factory. The factory can verify the first hash value and the second hash value corresponding to each data layer. If the verification of the first hash value and the second hash value corresponding to each data layer is successful, the server can produce a card based on the second card-making data packet.
[0039] In this embodiment, the client uploads a first card-making data packet containing N data layers and the first hash value of each layer, rather than the composite image itself. The server re-composite each data layer into a first image according to a preset synthesis order and calculates the second hash value. Then, it packages each data layer, each layer's hash value, and the second hash value and sends them to the factory. The factory does not directly trust and use the received data, but re-composite the image based on each data layer and performs hash verification independently. Thus, through the constructed three-party collaborative architecture of "client generating layered data and the first hash value of each layer, server re-composite and calculate hash, and factory independently verifying," the client, server, and factory each assume the responsibilities of "data generation and hash calculation," "data synthesis and secondary hash calculation," and "independent data verification and card making" at each stage. If any single point is breached or the transmission link is hijacked, the tampered data cannot pass the factory's independent verification, thus ensuring the consistency between the actual card content and user needs from the system architecture level.
[0040] Figure 2 This is a flowchart illustrating a card-making data processing method provided in an embodiment of this application. The executing entity of this card-making data processing method can be the aforementioned... Figure 1 The card-making data processing system 100 in the middle.
[0041] like Figure 2 As shown, the card data processing method provided in this application embodiment may include steps 210-240.
[0042] Step 210: Send the first card-making data packet to the server through the client; wherein, the first card-making data packet includes N data layers and a first hash value corresponding to each data layer, and a data layer includes a type of layer data, which is generated by the client in response to the type of editing operation performed by the user.
[0043] Where N is a positive integer.
[0044] Step 220: The server synthesizes each data layer according to the preset synthesis order to obtain the first image, and calculates the second hash value of the first image.
[0045] Step 230: The server packages each data layer and the corresponding first hash value and second hash value into a second card-making data packet, and sends the second card-making data packet to the factory.
[0046] Step 240: Verify the first hash value and the second hash value corresponding to each data layer through the factory end, and if the first hash value and the second hash value corresponding to each data layer pass the verification, produce the card based on the second card production data packet.
[0047] In this embodiment, the client uploads a first card-making data packet containing N data layers and the first hash value of each layer, rather than the composite image itself. The server re-composite each data layer into a first image according to a preset synthesis order and calculates the second hash value. Then, it packages each data layer, each layer's hash value, and the second hash value and sends them to the factory. The factory does not directly trust and use the received data, but re-composite the image based on each data layer and performs hash verification independently. Thus, through the constructed three-party collaborative architecture of "client generating layered data and the first hash value of each layer, server re-composite and calculate hash, and factory independently verifying," the client, server, and factory each assume the responsibilities of "data generation and hash calculation," "data synthesis and secondary hash calculation," and "independent data verification and card making" at each stage. If any single point is breached or the transmission link is hijacked, the tampered data cannot pass the factory's independent verification, thus ensuring the consistency between the actual card content and user needs from the system architecture level.
[0048] The card data processing method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0049] Figure 3 This is a flowchart illustrating a card-making data processing method provided in an embodiment of this application. The executing entity of this card-making data processing method may be the aforementioned... Figure 1 The server-side component 120.
[0050] like Figure 3As shown, the card data processing method provided in this application embodiment may include steps 310-330.
[0051] Step 310: Receive the first card production data packet uploaded by the client; wherein the first card production data packet includes N data layers and a first hash value corresponding to each data layer. A data layer includes a type of layer data, and the type of layer data is generated by the client in response to the type of editing operation performed by the user.
[0052] Where N is a positive integer.
[0053] In some embodiments of this application, receiving the first card-making data packet uploaded by the client may specifically include: Receive the image data layer uploaded by the client and the first hash value corresponding to the image data layer; Receive the image adjustment data layer and the first hash value corresponding to the image adjustment data layer uploaded by the client; Receive the border data layer and the first hash value corresponding to the border data layer uploaded by the client; Receive the sticker data layer uploaded by the client and the first hash value corresponding to the sticker data layer.
[0054] The image data layer can be a data layer constructed corresponding to the image uploaded by the user. This image data layer can include the original image uploaded by the user in response to the client, as well as the shooting parameters corresponding to the original image.
[0055] The original image mentioned above can be an image uploaded by the user. For example, in the above example, the landscape photo of his trip uploaded by Xiao Zhang is the original image.
[0056] The first hash value corresponding to the image data layer mentioned above can be generated based on the image data and shooting parameters of the original image.
[0057] The image adjustment data layer can correspond to the user's editing operation of adjusting image parameters. The image adjustment layer can include client-side adjustment parameters for the entire image range of the original image in response to the user. The first hash value corresponding to the image adjustment data layer can be determined based on the adjustment parameters.
[0058] The border data layer can correspond to the user's editing operation on the border. The border data layer can include border parameters added by the user in response to the client. The first hash value corresponding to the border data layer is determined based on the border parameters.
[0059] The sticker data layer can correspond to the user's editing operation on the sticker. The sticker data layer can include sticker parameters added by the client in response to the user's addition to the original image. The first hash value corresponding to the sticker data layer is determined based on the sticker parameters.
[0060] In some embodiments of this application, the client can obtain different data layers in response to different types of editing operations performed by the user, and calculate the first hash value corresponding to each data layer. The client can then upload the obtained different data layers and their corresponding first hash values to the server. The server can then receive the different data layers uploaded by the client, along with the first hash value for each data layer.
[0061] Specifically, the server can receive the image data layer and the corresponding first hash value uploaded by the client; the image adjustment data layer and the corresponding first hash value; the border data layer and the corresponding first hash value; and the sticker data layer and the corresponding first hash value.
[0062] In the embodiments of this application, the user editing process is decomposed into an image data layer, an image adjustment data layer, a border data layer, and a sticker data layer. Differentiated hash generation strategies are adopted based on the data structure characteristics of different data layers. For the original image data layer, the image data of the original image and the shooting parameters are used together as the basis for hash calculation. Once any item in the original image content or shooting parameters is tampered with, the hash value of that layer changes, thereby protecting the integrity of the layer's content. For the image adjustment data layer, border data layer, and sticker data layer, the hash value is generated based on the corresponding adjustment parameters, border parameters, or sticker parameters of each layer. Since each layer's parameters contain specific adjustment values, such as brightness +20%, border style ID, sticker position coordinates, etc., modification of any parameter will cause a change in the hash value of the corresponding layer. Through the aforementioned differentiated hash generation strategy, precise anti-tampering protection for different types of data layers is achieved. When the factory-side verification finds that the hash value of a certain layer does not match, it can be directly determined whether the original image has been tampered with, the overall image adjustment parameters have been tampered with, the border style has been tampered with, or the sticker content or position has been tampered with, based on the data layer type. This provides a more refined technical basis for problem localization and responsibility tracing.
[0063] Step 320: According to the preset synthesis order, synthesize each data layer to obtain the first image, and calculate the second hash value of the first image.
[0064] Step 330: Package each data layer and the first hash value and second hash value corresponding to each data layer into a second card manufacturing data packet, and send the second card manufacturing data packet to the factory so that the factory can verify the first hash value and second hash value corresponding to each data layer. If the first hash value and second hash value corresponding to each data layer pass the verification, the card is manufactured based on the second card manufacturing data packet.
[0065] In some embodiments of this application, each data layer, its corresponding first hash value, and its corresponding second hash value can be packaged into a second card manufacturing data packet, which is then sent to the factory. This allows the factory to verify the first hash value and the corresponding second hash value for each data layer. If the verification of the first hash value and the corresponding second hash value for each data layer passes, card manufacturing is performed based on the second card manufacturing data packet. The specific process of the factory verifying the first hash value and the corresponding second hash value for each data layer will be described in detail in later embodiments.
[0066] In some embodiments of this application, if the layer data of each data layer is the same, their corresponding first hash values are also the same. However, if the order of operations for each data layer is changed during the user's editing operation, the resulting bank card may be different from the card the user needs. For example, in the example above, Xiao Zhang first uploaded a travel landscape photo, then adjusted the brightness, then added a border, then adjusted the saturation, and then added a sticker. If the card-making data is maliciously attacked when the bank sends the card-making data to the factory, for example, by changing the order of Xiao Zhang's editing operations, such as changing the order of adding a border and adjusting saturation, although the first hash value corresponding to each data layer remains unchanged, the change in execution order will result in a different final bank card than the card Xiao Zhang needs.
[0067] To address the aforementioned problems, in some embodiments of this application, after step 320, the method may further include: The first hash value and the second hash value of each data layer are linked together in a chain to generate the first chained hash value; The step of packaging each data layer and the corresponding first hash value and second hash value into a second card-making data packet may specifically include: Each data layer, along with its corresponding first hash value, second hash value, and first chained hash value, is packaged into a second card-making data packet. This allows the factory to verify the first hash value, second hash value, and first chained hash value corresponding to each data layer. If the verification of the first hash value, second hash value, and first chained hash value corresponding to each data layer passes, the card is made based on the second card-making data packet.
[0068] The first chain hash value can be the hash value obtained by chaining the first hash value and the second hash value of each data layer, and the first chain hash value clarifies the order of editing operations performed by the user.
[0069] It should be noted that the order of editing operations performed by the user can be the same as or different from the preset synthesis order, and this application embodiment does not impose any limitation.
[0070] In some embodiments of this application, a first chain hash value can be generated by chaining the first hash value and the second hash value of each data layer. Then, each data layer, the first hash value, the second hash value and the first chain hash value corresponding to each data layer can be packaged into a second card manufacturing data package. This allows the factory to verify the first hash value, the second hash value and the first chain hash value corresponding to each data layer. If the verification of the first hash value, the second hash value and the first chain hash value corresponding to each data layer passes, the card is manufactured based on the second card manufacturing data package. That is, not only the first hash value and the second hash value corresponding to each data layer are verified, but also the first chain hash value is verified. Only if the verification of the first chain hash value passes, that is, if the editing order executed by the user passes the verification, will the factory manufacture the card based on the second card manufacturing data package.
[0071] In the embodiments of this application, a first chain hash value is generated by chaining the first hash value and the second hash value of each data layer. The generation process of the first chain hash value binds the first hash value of each data layer to the second hash value in sequence according to the user's operation order, so that each data layer and the final composite image form an inseparable chain dependency relationship. After receiving the second card production data packet, the factory recalculates the hash values of each layer, recombines the image, and calculates the local second hash value. Then, it recalculates the local chain hash value according to the same chain association rule as the server and compares it with the first chain hash value. If the attacker changes the arrangement order of the data layers, or introduces a compliant but different data layer from other data packets for splicing, even if the first hash value verification of each data layer passes and the hash value of a single composite image also passes the verification, the locally calculated first chain hash value will not match the first chain hash value in the data packet because the calculation order and composition of the chain hash value have changed. This effectively defends against splicing attacks and rearrangement attacks that cannot be detected by single-layer independent hash verification, and further improves the security of card production data.
[0072] In some embodiments of this application, the step of chaining the first hash value and the second hash value of each data layer to generate a first chained hash value may specifically include: Obtain the operation sequence of the editing operations corresponding to each data layer; Based on the order of operations, the first hash value of each data layer is sequentially linearly concatenated and hashed to obtain the third hash value; The second and third hash values are concatenated to generate the first chained hash value.
[0073] The third hash value can be a hash value obtained by linearly concatenating the first hash values of each data layer in the order of the editing operations corresponding to each data layer.
[0074] In some embodiments of this application, the operation order of the editing operations corresponding to each data layer can be obtained. Then, based on the operation order, the first hash value of each data layer is linearly concatenated and hashed sequentially to obtain the third hash value. Then, the second hash value and the third hash value are concatenated to generate the first chained hash value.
[0075] Continuing with the example above, Xiao Zhang's operation sequence is to first upload a travel landscape photo, then adjust the brightness, then add a border, then adjust the saturation, and then add a sticker. Based on the above operation sequence, the first hash value of each data layer is linearly concatenated and hashed sequentially to obtain the third hash value, as shown in the following formula (1):
[0076] In the above formula (1), chain_hash_i is the hash value after the i-th edit operation, H(a,b) is the hash calculation of a and b, layer i.type is the type of the i-th data layer, as in the example above, layer1.type is the type of the first data layer, i.e., the image data layer, and layer i.hash is the first hash value of the i-th data layer, as in the example above, layer 1.hash is the first hash value corresponding to the image data layer.
[0077] Based on the calculation method of the above formula, the third hash value chain_hash_n can be obtained by sequentially performing linear concatenation hash calculation on the first hash value of each data layer.
[0078] Then, the second hash value and the third hash value are concatenated to generate the first chained hash value, as shown in the following formula (2):
[0079] In the above formula (2), final_chain_hash is the first chain hash value and composite_image_hash is the second hash value.
[0080] In the embodiments of this application, the first hash value of each data layer participates in the hash operation in a determined order, making the operation order an inherent component of the chain hash calculation. When an attacker attempts to swap the order of two data layers, such as swapping the border layer and the sticker layer, the calculated third hash value will be completely different due to the change in the concatenation order of the first hash values of each layer, thus causing the final first chain hash value to change. In this way, when the factory recalculates the local chain hash, it performs linear concatenation according to the same operation order as the server. If the actual arrangement order of each data layer in the data packet is inconsistent with the operation order at the time of generation, the locally calculated first chain hash value will not be able to match the first chain hash value in the data packet, thereby effectively defending against order swapping attacks and cross-data packet concatenation attacks.
[0081] In some embodiments of this application, the data layers are synthesized on the server side to obtain a first image. This first image can then be reviewed. If the first image is valid, it passes the review and is sent to the factory for card production. However, if, during the data transmission process from the server to the factory, an attacker replaces the synthesized image with another compliant but completely different image—for example, replacing Zhang's travel scenery photo with Zhang's portrait—the factory will not be able to recognize it, resulting in a card that does not match the user's needs.
[0082] To address the aforementioned problem, after calculating the second hash value of the first image, the method described above may further include: If the first image passes the review, the second hash value is encrypted to obtain the digital signature corresponding to the second hash value; The step of sending each data layer and the corresponding first and second hash values to the factory end can specifically include: Each data layer, its corresponding first hash value, second hash value, and digital signature are sent to the factory end so that the factory end can verify the first hash value, second hash value, and digital signature corresponding to each data layer. If the first hash value, second hash value, and digital signature corresponding to each data layer pass the verification, the card is manufactured based on the first card manufacturing data packet.
[0083] The digital signature can be an encrypted value of the second hash value obtained by encrypting the second hash value.
[0084] In some embodiments of this application, if the first image passes the review, the second hash value can be encrypted using a private key to obtain the digital signature corresponding to the second hash value. Specifically, the second hash value can be encrypted using a digital signature algorithm based on the private key to obtain the digital signature corresponding to the second hash value.
[0085] Furthermore, when sending each data layer and the corresponding first hash value and second hash value to the factory, each data layer, the corresponding first hash value, the second hash value, and the digital signature can all be sent to the factory. When the factory verifies the first hash value and second hash value corresponding to each data layer, it also needs to verify the digital signature. If the first hash value, the second hash value, and the digital signature corresponding to each data layer pass the verification, the card is manufactured based on the first card manufacturing data packet.
[0086] In the embodiments of this application, when the first image passes the review, the server can encrypt the second hash value to generate a digital signature corresponding to the second hash value, and send the digital signature, along with each data layer, the first hash value of each layer, and the second hash value, to the factory. Before card production, the factory first verifies the digital signature using the server's public key to confirm that the second hash value has indeed been reviewed and approved by the server. Because digital signatures are anti-forge and non-repudiation, the factory can independently confirm that the composite image corresponding to the current data packet has passed the review by verifying the signature, without relying on trust in the transmission link or the server's sending behavior. Thus, based on the tamper-proof data transmission, the trust gap between the review and card production stages is further filled, achieving a security upgrade from "data immutability" to "review result immutability".
[0087] In some embodiments of this application, after a user completes an editing operation, they may need to modify a certain type of data. For example, if Xiao Zhang wants to move the "star" sticker from the lower right corner of the card to the upper left corner, the traditional solution requires re-combining the entire image, re-uploading, and re-approving, which is extremely inefficient.
[0088] To address the aforementioned problems, the methods described above may further include: Receive the modified first data layer and the corresponding fourth hash value uploaded by the client; The process of merging the data layers according to a preset synthesis order to obtain a first image and calculating the second hash value of the first image may specifically include: According to the preset synthesis order, the modified first data layer and the other data layers among the N data layers except the first data layer are synthesized to obtain the first image, and the second hash value of the first image is calculated.
[0089] The first data layer can be at least one of N data layers, such as the sticker data layer in the example above.
[0090] The modified first data layer can be generated by the client in response to the user's editing operation corresponding to the first data layer. For example, in the example above, if Xiao Zhang wants to move the "star" sticker from the lower right corner of the card to the upper left corner, the modified first data layer can be generated.
[0091] The fourth hash value can be the modified hash value of the first data layer. That is, after the first data layer is modified, its corresponding hash value needs to be recalculated.
[0092] In some embodiments of this application, if a user modifies the first data layer through editing, the client can regenerate a new first data layer. The client can then recalculate the first hash value of this first data layer to obtain a fourth hash value. When uploading data layers, the client can upload only the modified data layer; the unmodified data layers do not need to be re-uploaded. Subsequently, after receiving the modified first data layer and the fourth hash value, the server, when compositing the image, can combine the modified first data layer and the other N data layers (excluding the first data layer) according to a preset compositing order to obtain a first image, and calculate the second hash value of the first image.
[0093] In the embodiments of this application, when a user performs a modification operation on only at least one of the N data layers, the client only uploads the modified first data layer and its corresponding fourth hash value. Other unmodified data layers do not need to be re-uploaded. After receiving the data, the server synthesizes the modified first data layer with the other data layers (excluding the first data layer) according to a preset synthesis order to obtain a first image. It then recalculates the second hash value and updates the corresponding first hash value and chained hash value, thus achieving an incremental update effect of "uploading only the changed parts." Simultaneously, since the volume of a single data layer is much smaller than the total volume of the complete data packet, the data transmission volume is significantly reduced, greatly shortening user waiting time and server network resource consumption.
[0094] Figure 4 This is a flowchart illustrating a card-making data processing method provided in an embodiment of this application. The executing entity of this card-making data processing method may be the aforementioned... Figure 1 130 at the factory end.
[0095] like Figure 4 As shown, the card data processing method provided in this application embodiment may include steps 410-430.
[0096] Step 410: Receive the second card-making data packet sent by the server. The second card-making data packet includes N data layers, a first hash value and a second hash value corresponding to each data layer. The N data layers and the first hash value corresponding to each data layer are data in the first card-making data packet uploaded by the client to the server. Each data layer includes one type of layer data, which is generated by the client in response to the type of editing operation performed by the user. The second hash value is the hash value of the first image calculated by the server after synthesizing the data layers according to the preset synthesis order to obtain the first image.
[0097] Step 420: Verify the first hash value and the second hash value corresponding to each data layer.
[0098] Step 430: If the first hash value and the second hash value corresponding to each data layer pass the verification, then the card is manufactured based on the second card manufacturing data packet.
[0099] In some embodiments of this application, after the factory receives the second card production data packet sent by the server, it can verify the first hash value and the second hash value corresponding to each data layer. Then, if the first hash value and the second hash value corresponding to each data layer pass the verification, the card can be produced based on the first card production data packet.
[0100] In the embodiments of this application, after receiving the second card production data packet, the factory verifies the first hash value and the second hash value in the data packet. Only when both verifications pass can the card be produced. This enables the factory to have third-party verification capabilities independent of the server and the client. It does not rely on any external trust assumptions and can complete the verification of data integrity and authenticity on its own based solely on the hash algorithm and preset synthesis rules. This provides a last independent line of defense for data security before card production and effectively ensures the consistency between the actual card content and user needs.
[0101] In some embodiments of this application, the verification of the first hash value and the second hash value corresponding to each data layer may specifically include: Calculate the hash values of N data layers in the second card data packet respectively to obtain the fifth hash value corresponding to each data layer; The N data layers in the second card data packet are re-synthesized according to a preset synthesis order to obtain the second image, and the sixth hash value of the second image is calculated. The first hash value corresponding to each data layer is verified based on the fifth hash value corresponding to each data layer, and the second hash value is verified based on the sixth hash value.
[0102] For each data layer, the fifth hash value of a data layer can be the hash value calculated by the factory based on the layer data of that data layer.
[0103] The second image can be an image obtained by the factory side synthesizing N data layers received in a preset synthesis order.
[0104] The sixth hash value can be the hash value of the second image calculated on the factory side.
[0105] In some embodiments of this application, after the factory receives the second card manufacturing data packet, it can calculate the hash values of N data layers in the second card manufacturing data packet to obtain the fifth hash value corresponding to each data layer. Then, the N data layers in the second card manufacturing data packet are re-synthesized according to a preset synthesis order to obtain the second image. The sixth hash value of the second image is calculated, and then the first hash value corresponding to each data layer is verified based on the fifth hash value corresponding to each data layer, and the second hash value is verified based on the sixth hash value.
[0106] In the embodiments of this application, the factory calculates the hash values of N data layers in the second card-making data packet to obtain the fifth hash value corresponding to each data layer, and compares it one by one with the first hash value corresponding to each data layer stored in the data packet. This covers each independent data layer, enabling the detection of tampering with any data layer without the need for layer-by-layer investigation or manual inspection. By re-combining the N data layers according to a preset synthesis order, a second image is obtained, and the sixth hash value of the second image is calculated and compared with the second hash value stored in the data packet. This covers the mapping relationship between the synthesized image and each data layer, enabling the detection of whether the synthesized image matches each data layer. Furthermore, after receiving the second card-making data packet, the factory does not directly trust and use the composite image information in the data packet. Instead, it uses each data layer in the data packet as the original input and re-combines it into a second image according to the same preset synthesis order as the server. This re-combining process is executed independently by the factory and does not depend on any existing composite image data in the data packet. The factory compares the sixth hash value of the re-combined second image with the second hash value calculated and carried by the server in the data packet. If the composite image is replaced during transmission, since the data layers remain unchanged, the image re-combined by the factory is still the original compliant image. Its sixth hash value is inconsistent with the second hash value in the data packet, the verification fails, and card production is rejected. In this way, the factory completely gets rid of its reliance on the composite image transmitted by the server, and fundamentally defends against the overall replacement attack of the composite image during transmission.
[0107] In some embodiments of this application, the verification of the first hash value corresponding to each data layer based on the fifth hash value corresponding to each data layer, and the verification of the second hash value based on the sixth hash value, may specifically include: The first hash value corresponding to each of the N data layers in the second card data packet is compared with the fifth hash value corresponding to each data layer to obtain the first comparison result. The second hash value is compared with the sixth hash value to obtain the second comparison result; The step of producing a card based on the second card production data packet after the first hash value and the second hash value corresponding to each data layer have passed verification may specifically include: If the first comparison result indicates that the first hash value corresponding to each of the N data layers in the second card manufacturing data packet is consistent with the fifth hash value corresponding to each data layer, and the second comparison result indicates that the second hash value is consistent with the sixth hash value, then card manufacturing is performed based on the second card manufacturing data packet.
[0108] The first comparison result can be the comparison result obtained by comparing the first hash value corresponding to N data layers in the second card data packet with the fifth hash value corresponding to each data layer.
[0109] The second comparison result can be the result obtained by comparing the second hash value with the sixth hash value.
[0110] In some embodiments of this application, card production can be performed based on the first card production data packet only if the first hash value corresponding to the N data layers in the second card production data packet is consistent with the fifth hash value corresponding to each data layer, and the second hash value is consistent with the sixth hash value.
[0111] In the embodiments of this application, the card production decision at the factory end is not based on a single verification indicator, but on the logical AND operation of the first comparison result and the second comparison result. That is, the card production process is only allowed when the dual conditions of the first hash value and the fifth hash value of all N data layers are consistent and the second hash value and the sixth hash value are consistent are met simultaneously. In this way, through the logical AND operation of the dual comparison results, the failure of any verification dimension can independently block the card production process, effectively avoiding the security blind spots that may exist in a single verification indicator, and forming a strict control over the integrity of the card production data.
[0112] In some embodiments of this application, the methods described above may further include: Receive the first chained hash value sent by the server; The fifth and sixth hash values of each data layer are chained together to generate a second chained hash value; The first chain hash value is compared with the second chain hash value to obtain the third comparison result; The step of producing a card based on the second card production data packet after the first hash value and the second hash value corresponding to each data layer have passed verification may specifically include: If the first hash value and the second hash value corresponding to each data layer pass the verification respectively, and the third comparison result indicates that the first chain hash value and the second chain hash value are consistent, then the card is manufactured based on the second card manufacturing data packet.
[0113] The first chain hash value can be obtained by the server chaining the first hash value and the second hash value of each data layer.
[0114] The second chained hash value can be the hash value generated by the factory side after chaining the fifth and sixth hash values of each data layer. The specific calculation method of the second chained hash value is the same as that of the first chained hash value, and will not be repeated here.
[0115] The third comparison result can be the result obtained by comparing the first chain hash value with the second chain hash value.
[0116] In some embodiments of this application, the factory can receive a first chained hash value sent by the server, and then chain the fifth hash value and the sixth hash value of each data layer to generate a second chained hash value. Then, the first chained hash value and the second chained hash value are compared. If the first hash value and the second hash value corresponding to each data layer pass the verification respectively, and the first chained hash value and the second chained hash value are consistent, the card is produced based on the second card production data packet.
[0117] In the embodiments of this application, after the factory completes the calculation of the fifth and sixth hash values, it links the fifth and sixth hash values of each data layer according to the same chain association rules as the server, generating a second chain hash value. The second chain hash value is then compared with the first chain hash value generated by the server in the data packet to obtain a third comparison result. The card production decision is thus upgraded from dual verification to triple verification. That is, the card production process is only allowed if the first comparison result, the second comparison result, and the third comparison result are all consistent. In this way, the three dimensions of verification are independent and complementary to each other, and together they constitute a comprehensive verification of the integrity of the card production data packet. Any abnormality in any dimension will be captured by the corresponding verification result and block the card production process, thereby improving the accuracy of card production verification.
[0118] To better understand the card production data processing method provided in the embodiments of this application, the following describes the card production data processing method provided in the embodiments of this application using a specific scenario.
[0119] Figure 5This is a flowchart illustrating a card-making data processing method provided in an embodiment of this application. The executing entity of this card-making data processing method may be the aforementioned... Figure 1 The card-making data processing system 100 in the middle.
[0120] like Figure 5 As shown, the card data processing method provided in this application embodiment may include steps 501-509.
[0121] Step 501: The client receives the user's editing operation.
[0122] In step 501, the client can receive editing operations from the user. For example, in the example above, the client receives operations from Xiao Zhang that he uploaded a travel landscape photo, adjusted the brightness, added a border, adjusted the saturation, and added a sticker.
[0123] Step 502: The client determines the type of the user's editing operation.
[0124] In step 502, the type of editing operation can be determined based on the user's editing operation, such as uploading an image, adjusting image parameters, adding a border, or adding a sticker.
[0125] Step 503: The client determines N data layers based on the type of user's editing operation and calculates the first hash value for each data layer.
[0126] In step 503, the client can determine N data layers according to the type of the user's editing operation, and then calculate the first hash value of each data layer. The method for determining the N data layers and the method for calculating the first hash value of each data layer can refer to the implementation method of the above embodiment, and will not be repeated here.
[0127] Step 504: The client uploads the first card manufacturing data package.
[0128] In step 504, the first card data packet may include N data layers and a first hash value corresponding to each data layer.
[0129] Step 505: The server receives the first card-making data packet uploaded by the client.
[0130] Step 506: The server synthesizes each data layer according to the preset synthesis order to obtain the first image, and calculates the second hash value of the first image.
[0131] Steps 505-506 above are the same as steps 310-320 above, and will not be repeated here.
[0132] Step 507: The server links the first hash value and the second hash value of each data layer in a chain to generate the first chained hash value.
[0133] In step 507, the first hash value and the second hash value of each data layer are chained together to generate the first chained hash value. This process is the same as the process in the above embodiment of chaining together the first hash value and the second hash value of each data layer to generate the first chained hash value, and will not be repeated here.
[0134] Step 508: The server packages each data layer, the first hash value, the second hash value, and the first chain hash value corresponding to each data layer into a second card-making data packet, and sends the second card-making data packet to the factory.
[0135] In step 508, the process is consistent with that in the above embodiment, where the server packages each data layer, the first hash value, the second hash value, and the first chain hash value corresponding to each data layer into a second card-making data packet, and sends the second card-making data packet to the factory. It will not be described again here.
[0136] Step 509: The factory verifies the first hash value, second hash value, and first chain hash value corresponding to each data layer. If the first hash value, second hash value, and first chain hash value corresponding to each data layer pass the verification, the card is manufactured based on the second card manufacturing data packet.
[0137] In step 509, the process of verifying the first hash value, second hash value, and first chain hash value corresponding to each data layer at the factory end in the above embodiment, and making a card based on the second card making data packet when the first hash value, second hash value, and first chain hash value corresponding to each data layer pass the verification, is the same and will not be described again here.
[0138] The card manufacturing data processing method provided in this application can be executed by a card manufacturing data processing device. This application uses the execution of the card manufacturing data processing method by a card manufacturing data processing device as an example to illustrate the card manufacturing data processing device provided in this application.
[0139] Figure 6 This is a schematic diagram illustrating the structure of a card-making data processing apparatus according to an exemplary embodiment. This card-making data processing apparatus can be applied to the above-described... Figure 1 Server 120 in the middle. For example... Figure 6 As shown, the card-making data processing device 600 may include: The receiving module 610 is used to receive a first card-making data packet uploaded by the client; wherein the first card-making data packet includes N data layers and a first hash value corresponding to each data layer, and a data layer includes a type of layer data, and the type of layer data is generated by the client in response to the type of editing operation performed by the user; The compositing module 620 is used to compose each of the data layers according to a preset compositing order to obtain a first image, and to calculate a second hash value of the first image; The sending module 630 is used to package each of the data layers, the first hash value corresponding to each of the data layers, and the second hash value into a second card-making data packet, and send the second card-making data packet to the factory end, so that the factory end can verify the first hash value and the second hash value corresponding to each of the data layers. If the first hash value and the second hash value corresponding to each of the data layers pass the verification, the factory end can make a card based on the second card-making data packet.
[0140] In this embodiment, the server receives a first card-making data packet containing N data layers and their respective hash values uploaded by the client, instead of the composite image itself. The server then reassembles each data layer into a first image according to a preset synthesis order and calculates a second hash value. Finally, the server packages each data layer, each hash value, and the second hash value into a second card-making data packet and sends it to the factory. Since the factory does not directly receive and use the composite image uploaded by the client, but reassembles the image based on each data layer and verifies the hash value, even if the composite image is replaced during transmission, the factory can promptly detect and refuse card production because the replaced composite image cannot pass the hash value verification. Thus, this embodiment transforms the basis for card production from an indivisible composite image into a set of data layers that can be verified layer by layer. This effectively defends against overall replacement attacks on the composite image at the data level, ensuring the consistency between the actual card content and user requirements.
[0141] In some embodiments of this application, the receiving module 610 is specifically used for: The system receives an image data layer uploaded by the client and a first hash value corresponding to the image data layer. The image data layer includes an original image uploaded by the client in response to the user, and shooting parameters corresponding to the original image. The first hash value corresponding to the image data layer is generated based on the image data of the original image and the shooting parameters. The system receives an image adjustment data layer uploaded by the client and a first hash value corresponding to the image adjustment data layer. The image adjustment data layer includes adjustment parameters for the entire image range of the original image in response to the user's adjustment. The first hash value corresponding to the image adjustment data layer is determined based on the adjustment parameters. The client receives a border data layer and a first hash value corresponding to the border data layer. The border data layer includes border parameters added by the client in response to the user. The first hash value corresponding to the border data layer is determined based on the border parameters. The system receives a sticker data layer uploaded by the client and a first hash value corresponding to the sticker data layer. The sticker data layer includes sticker parameters added by the client in response to the user's addition to the original image. The first hash value corresponding to the sticker data layer is determined based on the sticker parameters.
[0142] In some embodiments of this application, the apparatus may further include: The generation module is configured to, after calculating the second hash value of the first image, chain-associate the first hash value of each data layer with the second hash value to generate a first chained hash value; The sending module 630 is specifically used for: Each data layer, the first hash value, the second hash value, and the first chained hash value corresponding to each data layer are packaged into a second card manufacturing data packet, so that the factory verifies the first hash value, the second hash value, and the first chained hash value corresponding to each data layer. If the first hash value, the second hash value, and the first chained hash value corresponding to each data layer pass the verification, the card is manufactured based on the second card manufacturing data packet.
[0143] In some embodiments of this application, the generation module is specifically used for: Obtain the operation sequence of the editing operations corresponding to each of the data layers; Based on the operation order, the first hash values of each data layer are sequentially linearly concatenated and hashed to obtain the third hash value; The second hash value and the third hash value are concatenated to generate the first chained hash value.
[0144] In some embodiments of this application, the apparatus may further include: An encryption module is used to encrypt the second hash value after the first image has been calculated, provided that the first image has passed the review, to obtain a digital signature corresponding to the second hash value. The sending module 630 is specifically used for: Each data layer, the first hash value corresponding to each data layer, the second hash value corresponding to each data layer, and the digital signature are sent to the factory end so that the factory end can verify the first hash value corresponding to each data layer, the second hash value corresponding to each data layer, and the digital signature. If the first hash value corresponding to each data layer, the second hash value corresponding to each data layer, and the digital signature are verified, the card is manufactured based on the second card manufacturing data packet.
[0145] In some embodiments of this application, the apparatus may further include: The receiving module is used to receive the modified first data layer and the fourth hash value corresponding to the modified first data layer uploaded by the client. The first data layer is at least one of N data layers, and the modified first data layer is generated by the client in response to the modification instruction executed by the user in response to the editing operation corresponding to the first data layer. The synthesis module 620 is specifically used for: According to a preset synthesis order, the modified first data layer and the other data layers among the N data layers excluding the first data layer are synthesized to obtain a first image, and the second hash value of the first image is calculated.
[0146] Figure 7 This is a schematic diagram illustrating the structure of a card-making data processing apparatus according to an exemplary embodiment. This card-making data processing apparatus can be applied to the above-described... Figure 1 130 at the factory end. (e.g., ...) Figure 7 As shown, the card-making data processing device 700 may include: The receiving module 710 is used to receive a second card-making data packet sent by the server. The second card-making data packet includes N data layers, a first hash value and a second hash value corresponding to each data layer. The N data layers and the first hash value corresponding to each data layer are data in the first card-making data packet uploaded by the client to the server. Each data layer includes a type of layer data, which is generated by the client in response to the type of editing operation performed by the user. The second hash value is the hash value of the first image calculated by the server after synthesizing the data layers according to a preset synthesis order to obtain the first image. The verification module 720 is used to verify the first hash value and the second hash value corresponding to each of the data layers; The card-making module 730 is used to make a card based on the second card-making data packet when the first hash value and the second hash value corresponding to each of the data layers have been verified and passed.
[0147] In the embodiments of this application, after receiving the second card production data packet, the factory verifies the first hash value and the second hash value in the data packet. Only when both verifications pass can the card be produced. This enables the factory to have third-party verification capabilities independent of the server and the client. It does not rely on any external trust assumptions and can complete the verification of data integrity and authenticity on its own based solely on the hash algorithm and preset synthesis rules. This provides a last independent line of defense for data security before card production and effectively ensures the consistency between the actual card content and user needs.
[0148] In some embodiments of this application, the verification module 720 is specifically used for: Calculate the hash values of N data layers in the second card data packet respectively to obtain the fifth hash value corresponding to each data layer; The N data layers in the second card data packet are re-synthesized according to the preset synthesis order to obtain the second image, and the sixth hash value of the second image is calculated. The first hash value corresponding to each data layer is verified based on the fifth hash value corresponding to each data layer, and the second hash value is verified based on the sixth hash value.
[0149] In some embodiments of this application, the verification module 720 is specifically used for: The first hash value corresponding to each of the N data layers in the second card data packet is compared with the fifth hash value corresponding to each data layer to obtain the first comparison result; The second hash value is compared with the sixth hash value to obtain a second comparison result; The card-making module 730 is specifically used for: If the first comparison result indicates that the first hash value corresponding to N data layers in the second card manufacturing data packet is consistent with the fifth hash value corresponding to each data layer, and the second comparison result indicates that the second hash value is consistent with the sixth hash value, then card manufacturing is performed based on the second card manufacturing data packet.
[0150] In some embodiments of this application, the receiving module 710 is further configured to: The server receives a first chained hash value, which is obtained by the server chaining the first hash value of each data layer with the second hash value. The device may further include: A generation module is used to chain-associate the fifth hash value of each data layer with the sixth hash value to generate a second chained hash value; The comparison module is used to compare the first chained hash value with the second chained hash value to obtain a third comparison result; The card-making module 730 is specifically used for: If the first hash value and the second hash value corresponding to each of the data layers pass the verification respectively, and the third comparison result indicates that the first chain hash value and the second chain hash value are consistent, then the card is made based on the second card making data packet.
[0151] Figure 8 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application is shown. The electronic device may include a processor 801 and a memory 802 storing computer program instructions.
[0152] Specifically, the processor 801 may include a central processing unit, an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0153] Memory 802 may include mass storage for data or instructions. For example, and not limitingly, memory 802 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 802 may include removable or non-removable (or fixed) media. Where appropriate, memory 802 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 802 is non-volatile solid-state memory.
[0154] In a particular embodiment, memory 802 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Thus, generally, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of this disclosure.
[0155] The processor 801 reads and executes computer program instructions stored in the memory 802 to implement any of the card data processing methods in the above embodiments.
[0156] In one example, the electronic device may also include a communication interface 803 and a bus 810. For example, Figure 8 As shown, the processor 801, memory 802, and communication interface 803 are connected through bus 810 and complete communication with each other.
[0157] The communication interface 803 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0158] Bus 810 includes hardware, software, or both, that couples components of an online data flow metering device together. For example, and not limited to, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standard Association (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 810 may include one or more buses. Although specific buses are described and illustrated in the embodiments of this application, this application considers any suitable bus or interconnection.
[0159] Furthermore, in conjunction with the card-making data processing method in the above embodiments, this application embodiment can provide a computer storage medium for implementation. This computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the card-making data processing methods in the above embodiments.
[0160] This application also provides a computer program product, including a computer program, which, when executed, implements any of the card data processing methods described in the above embodiments.
[0161] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0162] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0163] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0164] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowchart illustrations, and combinations of blocks in the block diagrams and / or flowchart illustrations, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0165] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A card-making data processing method, characterized in that, The method is applied to the server side, and the method includes: The system receives a first card-making data packet uploaded by the client; wherein the first card-making data packet includes N data layers and a first digest value corresponding to each data layer, and a data layer includes a type of layer data, which is generated by the client in response to the type of editing operation performed by the user, and N is a positive integer; According to a preset synthesis order, the data layers are synthesized to obtain a first image, and a second summary value of the first image is calculated. Each data layer, the first digest value corresponding to each data layer, and the second digest value are packaged into a second card production data packet, and the second card production data packet is sent to the factory so that the factory can verify the first digest value and the second digest value corresponding to each data layer. If the first digest value and the second digest value corresponding to each data layer pass the verification, the card is produced based on the second card production data packet.
2. The method according to claim 1, characterized in that, The first card-making data packet uploaded by the receiving client includes: The system receives an image data layer uploaded by the client and a first digest value corresponding to the image data layer. The image data layer includes an original image uploaded by the client in response to the user, and shooting parameters corresponding to the original image. The first digest value corresponding to the image data layer is generated based on the image data of the original image and the shooting parameters. The system receives an image adjustment data layer uploaded by the client and a first summary value corresponding to the image adjustment data layer. The image adjustment data layer includes adjustment parameters for the entire image range of the original image in response to the user's adjustment. The first summary value corresponding to the image adjustment data layer is determined based on the adjustment parameters. The client uploads a border data layer and a first digest value corresponding to the border data layer. The border data layer includes border parameters added by the client in response to the user. The first digest value corresponding to the border data layer is determined based on the border parameters. The system receives a sticker data layer uploaded by the client and a first summary value corresponding to the sticker data layer. The sticker data layer includes sticker parameters added by the client in response to the user's addition to the original image. The first summary value corresponding to the sticker data layer is determined based on the sticker parameters.
3. The method according to claim 1, characterized in that, After calculating the second summary value of the first image, the method further includes: The first digest value and the second digest value of each data layer are linked together to generate a first chained digest value; The step of packaging each data layer, the corresponding first digest value, and the second digest value into a second card-making data packet includes: Each data layer, the first digest value, the second digest value, and the first chain digest value corresponding to each data layer are packaged into a second card manufacturing data packet, so that the factory can verify the first digest value, the second digest value, and the first chain digest value corresponding to each data layer. If the first digest value, the second digest value, and the first chain digest value corresponding to each data layer pass the verification, the card is manufactured based on the second card manufacturing data packet.
4. The method according to claim 3, characterized in that, The step of chaining the first digest value and the second digest value of each data layer to generate a first chained digest value includes: Obtain the operation sequence of the editing operations corresponding to each of the data layers; Based on the operation sequence, the first digest values of each data layer are sequentially linearly concatenated to obtain the third digest value; The second digest value and the third digest value are concatenated to generate a first chained digest value.
5. The method according to claim 1, characterized in that, After calculating the second summary value of the first image, the method further includes: If the first image passes the review, the second digest value is encrypted to obtain the digital signature corresponding to the second digest value; Sending each data layer, the corresponding first digest value, and the second digest value to the factory includes: Each data layer, the first digest value, the second digest value, and the digital signature corresponding to each data layer are sent to the factory terminal so that the factory terminal verifies the first digest value, the second digest value, and the digital signature corresponding to each data layer. If the first digest value, the second digest value, and the digital signature corresponding to each data layer pass the verification, the card is manufactured based on the first card manufacturing data packet.
6. The method according to claim 1, characterized in that, The method further includes: The system receives a modified first data layer and a corresponding fourth digest value uploaded by the client. The first data layer is at least one of N data layers, and the modified first data layer is generated by the client in response to a modification instruction executed by the user in response to the editing operation corresponding to the first data layer. The step of merging the data layers according to a preset merging order to obtain a first image, and calculating a second summary value for the first image, includes: According to a preset synthesis order, the modified first data layer and the other data layers among the N data layers excluding the first data layer are synthesized to obtain a first image, and the second summary value of the first image is calculated.
7. A card-making data processing method, characterized in that, The method is applied at the factory level, and the method includes: The system receives a second card-making data packet sent by the server. The second card-making data packet includes N data layers, a first digest value and a second digest value corresponding to each data layer. The N data layers and the first digest value corresponding to each data layer are data uploaded by the client to the server in the first card-making data packet. Each data layer includes a type of layer data, which is generated by the client in response to an editing operation of that type performed by the user. The second digest value is the digest value of the first image calculated by the server after combining the data layers according to a preset synthesis order to obtain the first image. Verify the first digest value and the second digest value corresponding to each of the data layers; If the first digest value and the second digest value corresponding to each of the data layers pass the verification, the card is manufactured based on the second card manufacturing data packet.
8. The method according to claim 7, characterized in that, The verification of the first digest value and the second digest value corresponding to each of the data layers includes: Calculate the digest values of N data layers in the second card data packet respectively to obtain the fifth digest value corresponding to each data layer; The N data layers in the second card data package are re-synthesized according to the preset synthesis order to obtain the second image, and the sixth digest value of the second image is calculated. The first digest value corresponding to each data layer is verified based on the fifth digest value corresponding to each data layer, and the second digest value is verified based on the sixth digest value.
9. The method according to claim 8, characterized in that, The verification of the first digest value corresponding to each data layer based on the fifth digest value corresponding to each data layer, and the verification of the second digest value based on the sixth digest value, include: The first digest value corresponding to each of the N data layers in the second card data packet is compared with the fifth digest value corresponding to each data layer to obtain the first comparison result; The second summary value is compared with the sixth summary value to obtain a second comparison result; The step of producing a card based on the second card production data packet after the first digest value and the second digest value corresponding to each of the data layers have passed verification includes: If the first comparison result indicates that the first digest value corresponding to N data layers in the second card manufacturing data packet is consistent with the fifth digest value corresponding to each data layer, and the second comparison result indicates that the second digest value is consistent with the sixth digest value, then card manufacturing is performed based on the second card manufacturing data packet.
10. The method according to claim 8, characterized in that, The method further includes: The server receives a first chain digest value, which is obtained by the server chaining the first digest value of each data layer with the second digest value. The fifth digest value of each data layer is chained with the sixth digest value to generate a second chained digest value; The first chained digest value is compared with the second chained digest value to obtain a third comparison result; The step of producing a card based on the second card production data packet after the first digest value and the second digest value corresponding to each of the data layers have passed verification includes: If the first digest value and the second digest value corresponding to each of the data layers pass the verification respectively, and the third comparison result indicates that the first chain digest value and the second chain digest value are consistent, then the card is manufactured based on the second card manufacturing data packet.
11. A card-making data processing system, characterized in that, The system includes: A client is used to send a first card-making data packet to a server; wherein the first card-making data packet includes N data layers and a first digest value corresponding to each data layer, and a data layer includes a type of layer data, the type of layer data being generated by the client in response to an editing operation of the type performed by the user; The server is configured to synthesize each data layer according to a preset synthesis order to obtain a first image, and calculate a second digest value of the first image; package each data layer, the first digest value corresponding to each data layer, and the second digest value into a second card production data packet, and send the second card production data packet to the factory. On the factory side, the system verifies the first digest value and the second digest value corresponding to each data layer, and if the first digest value and the second digest value corresponding to each data layer pass the verification, the system produces a card based on the second card production data packet.
12. A card-making data processing device, characterized in that, The device is used on a server side, and the device includes: The receiving module is used to receive the first card-making data packet uploaded by the client; wherein the first card-making data packet includes N data layers and a first digest value corresponding to each data layer, and a data layer includes a type of layer data, which is generated by the client in response to the type of editing operation performed by the user; The compositing module is used to compose each of the data layers according to a preset compositing order to obtain a first image, and to calculate a second summary value of the first image; The sending module is used to package each data layer, the first digest value and the second digest value corresponding to each data layer into a second card production data packet, and send the second card production data packet to the factory end, so that the factory end can verify the first digest value and the second digest value corresponding to each data layer. If the first digest value and the second digest value corresponding to each data layer pass the verification, the card is produced based on the second card production data packet.
13. A card-making data processing device, characterized in that, The device is used in a factory setting, and the device includes: The receiving module is used to receive a second card-making data packet sent by the server. The second card-making data packet includes N data layers, a first digest value and a second digest value corresponding to each data layer. The N data layers and the first digest value corresponding to each data layer are data in the first card-making data packet uploaded by the client to the server. Each data layer includes a type of layer data, which is generated by the client in response to the type of editing operation performed by the user. The second digest value is the digest value of the first image calculated by the server after synthesizing the data layers according to a preset synthesis order to obtain the first image. The verification module is used to verify the first digest value and the second digest value corresponding to each of the data layers; The card-making module is used to make a card based on the second card-making data packet, provided that the first digest value and the second digest value corresponding to each of the data layers have passed the verification.
14. An electronic device, characterized in that, The electronic device includes a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the card data processing method as described in any one of claims 1-10.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the card data processing method as described in any one of claims 1-10.
16. A computer program product, characterized in that, When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device performs the card data processing method as described in any one of claims 1-10.
