Product code generation method and device, electronic device and storage medium
By optimizing coding models and data processing through artificial intelligence technology, the problem of low coding data security in traditional military product management has been solved, product coding with high fitting strength and encryption strength has been achieved, and the security of coding data has been improved.
Patent Information
- Application Number
- CN202410841468.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-06-27
AI Technical Summary
In traditional military product management, manual encoding methods result in low security of encoded data, which is easy to be reverse-decoded and cannot effectively protect product information.
Adopting artificial intelligence technology, by acquiring training product feature data and using preset original encoding models and discriminant models to encode and discriminate data, the encoding model is optimized to improve fitting and encryption capabilities, and the target encoding model is generated. It also combines feature extraction, data perturbation and permission configuration to generate highly secure product coding data.
It improves the security and encryption strength of product coding data, prevents reverse decoding, and enhances the protection capability of product information.
Smart Images

Figure CN118709204B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information technology, and in particular to a method and device for generating a product code, an electronic device, and a storage medium. Background Art
[0002] Military product management involves encoding products during the production process and storing the encoded codes in a database. Traditionally, this approach requires manual product encoding to encrypt the products. However, manual encoding offers low security and can be easily reverse-decoded to reveal product information. Therefore, improving the security of product coding data has become a pressing issue. Summary of the Invention
[0003] The main purpose of the embodiments of the present application is to propose a product code generation method and device, electronic device and storage medium, aiming to improve the security of product code data.
[0004] To achieve the above objectives, a first aspect of an embodiment of the present application provides a method for generating a product code, the method comprising:
[0005] Obtain training product feature data;
[0006] Encoding the training product feature data using a preset original encoding model to obtain training encoded data;
[0007] Performing data discrimination on the training coded data using a preset original discrimination model to obtain coding discrimination data; wherein the coding discrimination data is data for judging the fitting strength and encryption strength of the training coded data to the training product feature data;
[0008] Optimizing parameters of the original coding model according to the coding discrimination data to obtain a target coding model;
[0009] Obtain target product feature data;
[0010] The target product characteristic data is encoded using the target encoding model to obtain target encoding data.
[0011] In some embodiments, after optimizing the parameters of the original coding model according to the coding discrimination data to obtain a target coding model, the method further includes:
[0012] Performing data encoding on the training product feature data using the target encoding model to obtain updated encoded data;
[0013] Parameters of the original discriminant model are optimized according to the updated coding data and the training product feature data to obtain a target discriminant model.
[0014] In some embodiments, the target coding model includes a data perturbation sub-model and a data coding sub-model, and encoding the target product feature data using the target coding model to obtain target coded data includes:
[0015] Performing data perturbation on the target product feature data through the data perturbation sub-model to obtain target perturbation data;
[0016] The target disturbance data is encoded using the data encoding sub-model to obtain the target encoded data.
[0017] In some embodiments, obtaining target product characteristic data includes:
[0018] Acquire target product data and acquire target product categories of the target product data;
[0019] Filtering a target feature extraction model from preset feature extraction models according to the target product category;
[0020] Feature extraction is performed on the target product data according to the target feature extraction model to obtain the target product feature data.
[0021] In some embodiments, extracting features from the target product data according to the target feature extraction model to obtain the target product feature data includes:
[0022] Performing data dimensionality reduction on the target product data using the target feature extraction model to obtain target dimensionality reduction data;
[0023] The target feature extraction model is used to extract features from the target dimensionality reduction data to obtain the target product feature data.
[0024] In some embodiments, after encoding the target product characteristic data using the target encoding model to obtain target encoding data, the method further includes:
[0025] Acquire timestamp data; wherein the timestamp data indicates the time when the target product characteristic data is encoded;
[0026] Performing digital signature encryption based on the timestamp data and the target coded data to obtain encrypted coded data;
[0027] Performing permission configuration on the encrypted coded data to obtain access control coded data.
[0028] In some embodiments, performing permission configuration on the encrypted coded data to obtain access control coded data includes:
[0029] Obtaining the encryption level of the encrypted data;
[0030] Filtering target access rights from preset access rights based on the encryption level;
[0031] The encrypted coded data is permission-configured according to the target access authority to obtain the access control coded data.
[0032] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a device for generating a product code, the device comprising:
[0033] A first acquisition module is used to acquire training product feature data;
[0034] A first encoding module is used to encode the training product feature data using a preset original encoding model to obtain training encoded data;
[0035] a discrimination module, configured to perform data discrimination on the training coded data using a preset original discrimination model to obtain coded discrimination data; wherein the coded discrimination data is data for judging the fitting strength and encryption strength of the training coded data with respect to the training product feature data;
[0036] an optimization module, configured to optimize parameters of the original coding model according to the coding discrimination data to obtain a target coding model;
[0037] The second acquisition module is used to obtain target product feature data;
[0038] The second encoding module is used to encode the target product characteristic data through the target encoding model to obtain target encoding data.
[0039] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the method described in the first aspect when executing the computer program.
[0040] To achieve the above-mentioned purpose, the fourth aspect of the embodiments of the present application proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method described in the first aspect.
[0041] The present application proposes a product code generation method and device, electronic device, and storage medium, which obtain training product feature data and encode the training product feature data through a preset original encoding model to obtain training code data, then perform data discrimination on the training code data through a preset original discrimination model to obtain coding discrimination data, and optimize the parameters of the original coding model based on the coding discrimination data, thereby improving the fitting and encryption capabilities of the original coding model for the training product feature data, and obtaining a target coding model that can securely encode the product feature data; further, target product feature data is obtained, and data encoding is performed on the target product feature data through the target encoding model, thereby obtaining target coding data with high fitting strength and encryption strength for the target product feature data, that is, the present application improves the security of product coding. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 This is a flowchart of a method for generating a product code according to an embodiment of the present application;
[0043] Figure 2 is a flowchart of a method for generating a product code provided in another embodiment of the present application;
[0044] Figure 3 yes Figure 1 Flowchart of step S105 in FIG.
[0045] Figure 4 yes Figure 3 Flowchart of step S303 in FIG.
[0046] Figure 5 yes Figure 1 Flowchart of step S106 in FIG.
[0047] Figure 6 is a flowchart of a method for generating a product code provided in another embodiment of the present application;
[0048] Figure 7 yes Figure 6 Flowchart of step S603 in FIG.
[0049] Figure 8 Schematic diagram of the structure of the product code generation device provided in an embodiment of the present application;
[0050] Figure 9 Schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application;
[0051] Figure 10 This is a schematic diagram of the model optimization process provided in the embodiment of the present application. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0053] It should be noted that although the device schematics illustrate functional module divisions and the flowcharts illustrate logical sequences, in certain circumstances, the steps shown or described may be performed in a sequence that differs from the module divisions in the device or the sequence in the flowcharts. The terms "first," "second," and so on, in the specification, claims, and drawings, are used to distinguish similar items and are not necessarily used to describe a specific sequence or precedence.
[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0055] First, let’s analyze some of the terms used in this application:
[0056] An Encoding Model (EM) generates a code that is both adaptable to the target data and capable of encryption. By encoding the input data, the EM captures the key characteristics of the data and generates a code that adapts to the target data while maintaining its encryption.
[0057] Discriminative Model (DM): It is a model used to distinguish the data generated by the coding model from the real data, and to improve the performance of the coding model by continuously improving the ability to identify generated data and real data.
[0058] Military product management involves encoding products during the production process and storing the encoded codes in a database. Traditionally, this approach requires manual product encoding to encrypt the products. However, manual encoding offers low security and can be easily reverse-decoded to reveal product information. Therefore, improving the security of product coding data has become a pressing issue.
[0059] Based on this, the embodiments of the present application provide a product code generation method and device, an electronic device, and a storage medium, aiming to improve the security of product code data.
[0060] The embodiments of the present application provide a method and device for generating a product code, an electronic device, and a storage medium, which are specifically described through the following embodiments. First, the method for generating a product code in the embodiments of the present application is described.
[0061] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results.
[0062] Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0063] The product code generation method provided in the embodiment of the present application relates to the field of information technology. The product code generation method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or can be configured as a server cluster or a distributed system composed of multiple physical servers, or can be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the product code generation method, etc., but is not limited to the above forms.
[0064] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.
[0065] Figure 1This is an optional flowchart of the product code generation method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S106.
[0066] Step S101, obtaining training product feature data;
[0067] Step S102, encoding the training product feature data using a preset original encoding model to obtain training encoded data;
[0068] Step S103, performing data discrimination on the training coding data using a preset original discrimination model to obtain coding discrimination data; wherein the coding discrimination data is data for judging the fitting strength and encryption strength of the training coding data to the training product feature data;
[0069] Step S104, optimizing the parameters of the original coding model according to the coding discrimination data to obtain a target coding model;
[0070] Step S105, obtaining target product feature data;
[0071] Step S106: Encode the target product characteristic data using the target encoding model to obtain target encoding data.
[0072] In steps S101 to S106 shown in the embodiment of the present application, training product feature data is obtained and data-encoded on the training product feature data through a preset original coding model to obtain training coded data, and then data discrimination is performed on the training coded data through a preset original discrimination model to obtain coded discrimination data. The parameters of the original coding model are optimized according to the coded discrimination data, thereby improving the fitting ability and encryption ability of the original coding model for the training product feature data, and obtaining a target coding model that can securely encode the product feature data; further, target product feature data is obtained, and data encoding is performed on the target product feature data through the target coding model, thereby obtaining target coded data with high fitting strength and encryption strength for the target product feature data, that is, the present application improves the security of product coding.
[0073] In step S101 of some embodiments, the training product feature data is used to represent feature information of military products, and is data obtained after feature extraction of military products, including but not limited to military products such as code products, document products, and structure products.
[0074] In step S102 of some embodiments, the original coding model is a model used to encode the feature data, which can convert the feature data into a string of codes, the form of the code includes but is not limited to a character string and a binary bit string, the training coding data is a string of codes, which is used to fit and encrypt the training product feature data, and the training coding data contains the feature information of the training product feature data in an encrypted form, so that the feature information is saved and recorded and cannot be deciphered.
[0075] In one embodiment, the original encoding model is a variational autoencoder (VAE). The VAE consists of an encoder and a decoder. The encoder in the VAE encodes the training product feature data to obtain training encoded data.
[0076] In one embodiment, the original encoding model is an encoder included in Generative Adversarial Networks (GANs). The training encoding data is obtained by inputting the training product feature data into the generator in GANs.
[0077] In step S103 of some embodiments, the original discriminant model is a discriminant model for discriminating training coded data, and the coded discriminant data generated by the original discriminant model is used to discriminate the fitting strength and encryption strength of the coded data. The form of the discrimination result includes but is not limited to binary classification and probability data. The discrimination result is used to indicate whether the coded data input to the original discriminant model is true coded data or false coded data.
[0078] In step S104 of some embodiments, the parameters of the original coding model are optimized using the coding discrimination data, specifically including calculating the loss value based on the coding discrimination data and the training coding data, and optimizing the parameters of the original coding model based on the loss value calculation to obtain the target coding model.
[0079] See also Figure 2 In some embodiments, after step S104, the following steps may be included but not limited to steps S201 to S202:
[0080] Step S201, encoding the training product feature data using a target encoding model to obtain updated encoded data;
[0081] Step S202 , optimizing the parameters of the original discriminant model according to the updated coding data and the training product feature data to obtain a target discriminant model.
[0082] In steps S201 to S202 shown in the embodiment of the present application, the training product feature data is encoded through the target encoding model to obtain updated encoding data, and the parameters of the original discriminant model are optimized based on the updated encoding data and the training product feature data to obtain the target discriminant model, thereby improving the discrimination ability of the target discriminant model. After the discrimination ability of the target discriminant model is improved, the encoding ability of the target encoding model is further optimized, and the security of the encoding data generated by the target encoding model is improved, that is, the security of the product encoding data is improved.
[0083] In step S201 of some embodiments, the principle of data encoding the training product feature data through the target encoding model is consistent with the principle of data encoding the training product feature data through the original encoding model, and will not be repeated here.
[0084] In some embodiments, step S202 optimizes the parameters of the original discriminant model based on the updated encoded data and the training product feature data. Specifically, this includes inputting the updated encoded data into the original discriminant model to obtain updated discriminant data, and calculating a loss value based on the updated discriminant data and the training product feature data to obtain a target loss value. Finally, the original discriminant model is updated using the target loss value to obtain a target discriminant model.
[0085] It should be noted that the mutual training of the target encoding model and the target discrimination model is a cyclic process. When the preset cycle end condition is reached, the final encoding model and discrimination model are used as the target encoding model and target discrimination model.
[0086] See also Figure 3 In some embodiments, step S105 may include but is not limited to steps S301 to S303:
[0087] Step S301, obtaining target product data and obtaining the target product category of the target product data;
[0088] Step S302, selecting a target feature extraction model from preset feature extraction models according to the target product category;
[0089] Step S303: extract features from the target product data according to the target feature extraction model to obtain target product feature data.
[0090] In steps S301 to S303 shown in the embodiment of the present application, the target product category of the target product data is obtained, and a target feature extraction model is screened out from a preset feature extraction model according to the target product category. Finally, feature extraction is performed on the target product data according to the target feature extraction model to obtain target product feature data. Feature extraction is performed using the target feature extraction model corresponding to the target product data, thereby improving the accuracy of feature extraction of the target feature extraction model.
[0091] In step S301 of some embodiments, the target product data is various final products and intermediate products in the production process of a military enterprise, including but not limited to code design documents, code documents, drawings, and videos. The target product data product categories include but are not limited to videos, pictures, and documents.
[0092] In step S302 of some embodiments, the preset feature extraction model is a feature extraction model of multiple categories, which is used to extract features from data of different categories, and the corresponding target feature extraction model is screened according to the target product category.
[0093] In one embodiment, the target product category is a document category, and a document feature extraction model, ie, a target feature extraction model, is selected from preset feature extraction models.
[0094] In one embodiment, the target product category is a code category, and a code feature extraction model, ie, a target feature extraction model, is selected from preset feature extraction models.
[0095] See also Figure 4 In some embodiments, step S303 may include but is not limited to steps S401 to S402:
[0096] Step S401, performing data dimensionality reduction on target product data using a target feature extraction model to obtain target dimensionality reduction data;
[0097] Step S402: extract features from the target dimensionality reduction data using a target feature extraction model to obtain target product feature data.
[0098] In steps S401 to S402 shown in the embodiment of the present application, the target product data is subjected to data dimensionality reduction through the target feature extraction model to obtain target dimensionality reduction data, and the target dimensionality reduction data is subjected to feature extraction through the target feature extraction model to obtain target product feature data, thereby extracting the main feature information in the target product data to obtain target product feature data, providing a data basis for the subsequent target encoder to perform data encoding to obtain target encoded data, and improving the fitting ability of the target encoded data to the target product data.
[0099] In step S401 of some embodiments, data dimensionality reduction is used to reduce the amount of target product data, retain the main features of the target product data, and reduce the data dimension. Data dimensionality reduction reduces storage costs and reduces the amount of feature information data that the target encoder needs to process.
[0100] In one embodiment, the data dimension reduction is principal component analysis (PCA), and PCA data dimension reduction is performed on the target product data through a target feature extraction model to obtain target dimension reduction data.
[0101] In one embodiment, the data dimensionality reduction is Linear Discriminant Analysis (LDA), and the target feature extraction model performs LDA data dimensionality reduction on the target product data to obtain target dimensionality reduction data.
[0102] In step S402 of some embodiments, feature extraction is used to extract feature information from the target product data, remove redundant information from the target product data, and extract main information from the target product data, providing a data basis for the subsequent target coding model.
[0103] In one embodiment, feature extraction uses Random Forest (RF) to extract feature information from target dimensionality reduction information, and then uses the target feature extraction model to extract feature information from target dimensionality reduction information using the Random Forest method to obtain target product feature data.
[0104] In one embodiment, the feature extraction is singular value decomposition, which uses a target feature extraction model to extract feature information from target dimensionality reduction information using singular value decomposition to obtain target product feature data.
[0105] See also Figure 5 In some embodiments, the target coding model includes a data perturbation sub-model and a data coding sub-model. Step S106 may include but is not limited to steps S501 to S502:
[0106] Step S501, performing data perturbation on target product feature data through a data perturbation sub-model to obtain target perturbation data;
[0107] Step S502 : encoding the target disturbance data using the data encoding sub-model to obtain target encoded data.
[0108] In the embodiment of the present application, steps S501 to S502 are performed to perturb the target product feature data through the data perturbation sub-model to improve the security of the target product data, and the target perturbation data is encoded through the data encoding sub-model to obtain secure target encoded data.
[0109] In step S501 of some embodiments, the data perturbation sub-model is used to add noise to the target product characteristic data to improve the security of the target product characteristic data. By adding noise to the target product characteristic data through the data perturbation sub-model, the target perturbation data is generated, which is difficult to distinguish, thereby improving the security of the target coded data.
[0110] In step S502 of some embodiments, the target disturbance data is encoded using a data encoding sub-model to generate target encoded data that is compatible with the target product data and has encryption properties, thereby improving the security of the encoded data with respect to the product data.
[0111] See also Figure 6 In some embodiments, after step S106, the following steps include but are not limited to steps S601 to S603:
[0112] Step S601, obtaining timestamp data; wherein the timestamp data indicates the time when the target product characteristic data is encoded;
[0113] Step S602: Perform digital signature encryption based on the timestamp data and the target coded data to obtain encrypted coded data;
[0114] Step S603: Perform permission configuration on the encrypted coded data to obtain access control coded data.
[0115] In steps S601 to S603 shown in the embodiment of the present application, timestamp data and target coded data are obtained for digital signature encryption, so that the encrypted coded data has uniqueness and traceability, and the encrypted coded data is given permission configuration to obtain access control coded data, so that the access control coded data has access control permissions, thereby improving the security of the target coded data.
[0116] In step S601 of some embodiments, the timestamp is the time when the target product characteristic data is encoded. The format of the timestamp includes but is not limited to date and time format, Unix timestamp and ISO8601 format.
[0117] In step S602 of some embodiments, the timestamp data and the target coded data are first packaged to obtain packaged data, and the packaged data is encrypted using a preset private key to obtain encrypted coded data, thereby making the encrypted coded data traceable and unique.
[0118] See also Figure 7 In some embodiments, step S603 may include but is not limited to steps S701 to S703:
[0119] Step S701, obtaining the encryption level of the encrypted data;
[0120] Step S702, filtering target access rights from preset access rights based on the encryption level;
[0121] Step S703: performing permission configuration on the encrypted coded data according to the target access permission to obtain access control coded data.
[0122] Steps S701 to S703 shown in the embodiment of the present application obtain the encryption level of the encrypted coded data, and filter out the target access rights from the preset access rights based on the encryption level. Finally, the encrypted coded data is permission-configured according to the target access rights to obtain access control coded data, so that users with access rights can access the encrypted coded data, thereby further improving security.
[0123] In step S701 of some embodiments, the encryption level of the encrypted coded data is the encryption level of the target product data. The encryption level of the encrypted coded data is obtained by acquiring the encryption level of the target product data.
[0124] In step S702 of some embodiments, the preset access rights represent access rights corresponding to different encryption levels, and the target access rights are filtered out from the preset access rights by the encryption level to determine the access rights of the encrypted data.
[0125] In step S703 of some embodiments, the encrypted coded data is permission-configured according to the target access rights, so that users with access rights can access the encrypted coded data, thereby obtaining access control coded data.
[0126] See also Figure 10In one embodiment, training product feature data is input into an original coding model to obtain training coding data, and the training coding data is input into the original coding model for data discrimination to obtain coding discrimination data. The original coding model is then parameterized based on the coding discrimination data to obtain a target coding model. The training product feature data is then encoded using the target coding model to obtain updated coding data. The original discrimination model is then parameterized based on the updated coding data and the training product feature data to obtain a target discrimination model. Iterative optimization of the original coding model and the original discrimination model is performed to obtain a target coding model and a target discrimination model. This improves the encoding capability of the target coding model, generates target coding data that is both adaptive to the target product features and secure, and improves the security of data encoding for the target product.
[0127] See also Figure 8 The present application also provides a product code generation device that can implement the above-mentioned product code generation method. The device includes:
[0128] The first acquisition module 801 is used to acquire training product feature data;
[0129] The first encoding module 802 is used to encode the training product feature data using a preset original encoding model to obtain training encoded data;
[0130] The discrimination module 803 is used to perform data discrimination on the training coding data using a preset original discrimination model to obtain coding discrimination data; wherein the coding discrimination data is data for judging the fitting strength and encryption strength of the training coding data to the training product feature data;
[0131] An optimization module 804 is configured to optimize parameters of the original coding model according to the coding discrimination data to obtain a target coding model;
[0132] The second acquisition module 805 is used to obtain target product feature data;
[0133] The second encoding module 806 is used to encode the target product feature data using a target encoding model to obtain target encoded data.
[0134] The specific implementation of the product code generation device is basically the same as the specific embodiment of the above-mentioned product code generation method, and will not be repeated here.
[0135] The present application also provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-mentioned product code generation method. The electronic device can be any smart terminal including a tablet computer, an in-vehicle computer, or the like.
[0136] See also Figure 9 , Figure 9 The hardware structure of an electronic device according to another embodiment is shown. The electronic device includes:
[0137] The processor 901 may be implemented using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.
[0138] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called by the processor 901 to execute the product code generation method of the embodiments of this application.
[0139] Input / output interface 903, used to implement information input and output;
[0140] Communication interface 904, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, Wi-Fi, Bluetooth, etc.);
[0141] Bus 905 , which transmits information between various components of the device (e.g., processor 901 , memory 902 , input / output interface 903 , and communication interface 904 );
[0142] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0143] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned product code generation method is implemented.
[0144] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0145] The product code generation method, product code generation device, electronic device and storage medium provided in the embodiments of the present application obtain training product feature data and encode the training product feature data through a preset original encoding model to obtain training encoding data, then perform data discrimination on the training encoding data through a preset original discrimination model to obtain encoding discrimination data, and optimize the parameters of the original encoding model according to the encoding discrimination data, thereby improving the fitting ability and encryption ability of the original encoding model for the training product feature data, and obtaining a target encoding model that can securely encode the product feature data; further, target product feature data is obtained, and data encoding is performed on the target product feature data through the target encoding model, thereby obtaining target encoding data with high fitting strength and encryption strength for the target product feature data, that is, the present application improves the security of product coding.
[0146] The embodiments described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0147] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0148] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0149] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.
[0150] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0151] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0152] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0153] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0154] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0155] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store programs.
[0156] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention should be within the scope of the present invention.
Claims
1. A method for generating a product code, characterized in that: The method comprises: Obtain training product feature data; Encoding the training product feature data using a preset original encoding model to obtain training encoded data; Performing data discrimination on the training coded data using a preset original discrimination model to obtain coding discrimination data; wherein the coding discrimination data is data for judging the fitting strength and encryption strength of the training coded data to the training product feature data; Optimizing parameters of the original coding model according to the coding discrimination data to obtain a target coding model; Performing data encoding on the training product feature data using the target encoding model to obtain updated encoded data; Optimizing the parameters of the original discriminant model according to the updated coding data and the training product feature data to obtain a target discriminant model; Based on the target discriminant model and the target encoding model, continue to perform alternating optimization training of the encoding model and the discriminant model until a preset training end condition is met; wherein the target encoding model includes a data perturbation sub-model and a data encoding sub-model; Acquire target product data and acquire target product categories of the target product data; Filtering a target feature extraction model from preset feature extraction models according to the target product category; Performing feature extraction on the target product data according to the target feature extraction model to obtain target product feature data; Performing data perturbation on the target product feature data through the data perturbation sub-model to obtain target perturbation data; The target disturbance data is encoded using the data encoding sub-model to obtain target encoded data.
2. The method according to claim 1, characterized in that The step of extracting features from the target product data according to the target feature extraction model to obtain the target product feature data includes: Performing data dimensionality reduction on the target product data using the target feature extraction model to obtain target dimensionality reduction data; The target feature extraction model is used to extract features from the target dimensionality reduction data to obtain the target product feature data.
3. The method according to claim 1, characterized in that After encoding the target product characteristic data using the target coding model to obtain target coded data, the method further includes: Acquire timestamp data; wherein the timestamp data indicates the time when the target product characteristic data is encoded; Performing digital signature encryption based on the timestamp data and the target coded data to obtain encrypted coded data; Performing permission configuration on the encrypted coded data to obtain access control coded data.
4. The method according to claim 3, characterized in that The step of performing permission configuration on the encrypted coded data to obtain access control coded data includes: Obtaining the encryption level of the encrypted data; Filtering target access rights from preset access rights based on the encryption level; The encrypted coded data is permission-configured according to the target access authority to obtain the access control coded data.
5. A product code generating device, characterized in that: The device comprises: A first acquisition module is used to acquire training product feature data; A first encoding module is used to encode the training product feature data using a preset original encoding model to obtain training encoded data; a discrimination module, configured to perform data discrimination on the training coded data using a preset original discrimination model to obtain coded discrimination data; wherein the coded discrimination data is data for judging the fitting strength and encryption strength of the training coded data with respect to the training product feature data; an optimization module, configured to optimize parameters of the original coding model according to the coding discrimination data to obtain a target coding model; Performing data encoding on the training product feature data using the target encoding model to obtain updated encoded data; Optimizing the parameters of the original discriminant model according to the updated coding data and the training product feature data to obtain a target discriminant model; Based on the target discriminant model and the target encoding model, continue to perform alternating optimization training of the encoding model and the discriminant model until a preset training end condition is met; wherein the target encoding model includes a data perturbation sub-model and a data encoding sub-model; A second acquisition module is used to acquire target product data and acquire a target product category of the target product data; Filtering a target feature extraction model from preset feature extraction models according to the target product category; Performing feature extraction on the target product data according to the target feature extraction model to obtain target product feature data; a second encoding module, performing data perturbation on the target product feature data through the data perturbation sub-model to obtain target perturbation data; The target disturbance data is encoded using the data encoding sub-model to obtain target encoded data.
6. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the product code generation method according to any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the product code generation method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Text classification model training method and device, text classification method and device and storage medium
CN112131366A
Commodity feature processing method, electronic equipment and computer storage medium
CN115952313A