CN117009683A - Codeword data processing method and device, electronic equipment and storage medium - Google Patents
Codeword data processing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN117009683A CN117009683A CN202211387107.7A CN202211387107A CN117009683A CN 117009683 A CN117009683 A CN 117009683A CN 202211387107 A CN202211387107 A CN 202211387107A CN 117009683 A CN117009683 A CN 117009683A
- Authority
- CN
- China
- Prior art keywords
- code
- queried
- codeword
- number segment
- segment
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000003860 storage Methods 0.000 title claims abstract description 58
- 238000003672 processing method Methods 0.000 title claims abstract description 21
- 238000012545 processing Methods 0.000 claims abstract description 74
- 238000000034 method Methods 0.000 claims abstract description 59
- 238000012795 verification Methods 0.000 claims abstract description 38
- 230000004044 response Effects 0.000 claims description 29
- 230000015654 memory Effects 0.000 claims description 24
- 230000008569 process Effects 0.000 claims description 21
- 230000005540 biological transmission Effects 0.000 claims description 20
- 238000004458 analytical method Methods 0.000 claims description 14
- 238000004590 computer program Methods 0.000 claims description 9
- 238000012546 transfer Methods 0.000 claims description 2
- 239000000523 sample Substances 0.000 claims 2
- 230000000873 masking effect Effects 0.000 claims 1
- 238000005516 engineering process Methods 0.000 abstract description 28
- 238000013473 artificial intelligence Methods 0.000 abstract description 10
- 238000007726 management method Methods 0.000 description 31
- 238000004422 calculation algorithm Methods 0.000 description 16
- 238000010586 diagram Methods 0.000 description 13
- 238000004891 communication Methods 0.000 description 9
- PCTMTFRHKVHKIS-BMFZQQSSSA-N (1s,3r,4e,6e,8e,10e,12e,14e,16e,18s,19r,20r,21s,25r,27r,30r,31r,33s,35r,37s,38r)-3-[(2r,3s,4s,5s,6r)-4-amino-3,5-dihydroxy-6-methyloxan-2-yl]oxy-19,25,27,30,31,33,35,37-octahydroxy-18,20,21-trimethyl-23-oxo-22,39-dioxabicyclo[33.3.1]nonatriaconta-4,6,8,10 Chemical compound C1C=C2C[C@@H](OS(O)(=O)=O)CC[C@]2(C)[C@@H]2[C@@H]1[C@@H]1CC[C@H]([C@H](C)CCCC(C)C)[C@@]1(C)CC2.O[C@H]1[C@@H](N)[C@H](O)[C@@H](C)O[C@H]1O[C@H]1/C=C/C=C/C=C/C=C/C=C/C=C/C=C/[C@H](C)[C@@H](O)[C@@H](C)[C@H](C)OC(=O)C[C@H](O)C[C@H](O)CC[C@@H](O)[C@H](O)C[C@H](O)C[C@](O)(C[C@H](O)[C@H]2C(O)=O)O[C@H]2C1 PCTMTFRHKVHKIS-BMFZQQSSSA-N 0.000 description 8
- 230000006870 function Effects 0.000 description 8
- 238000001514 detection method Methods 0.000 description 7
- 238000007405 data analysis Methods 0.000 description 5
- 238000013461 design Methods 0.000 description 5
- 238000007639 printing Methods 0.000 description 5
- 230000001172 regenerating effect Effects 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 238000004806 packaging method and process Methods 0.000 description 3
- 238000013500 data storage Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000013515 script Methods 0.000 description 2
- 244000025254 Cannabis sativa Species 0.000 description 1
- 235000012766 Cannabis sativa ssp. sativa var. sativa Nutrition 0.000 description 1
- 235000012765 Cannabis sativa ssp. sativa var. spontanea Nutrition 0.000 description 1
- 241000132456 Haplocarpha Species 0.000 description 1
- 230000032683 aging Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 235000009120 camo Nutrition 0.000 description 1
- 235000005607 chanvre indien Nutrition 0.000 description 1
- 238000010224 classification analysis Methods 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 239000011487 hemp Substances 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000003058 natural language processing Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
- 230000011664 signaling Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000001550 time effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
- G06F16/9554—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL] by using bar codes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
- G06F16/90335—Query processing
- G06F16/90344—Query processing by using string matching techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K19/00—Record carriers for use with machines and with at least a part designed to carry digital markings
- G06K19/06—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
- G06K19/06009—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
- G06K19/06037—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application provides a codeword data processing method, a codeword data processing device, electronic equipment and a storage medium; the method is applied to the fields of artificial intelligence and cloud technology, and comprises the following steps: generating a plurality of codewords based on the number of the code demands of the code object; transmitting a plurality of codewords to the code object device, wherein the plurality of codewords are used for associating the code object device with different articles; storing number segments corresponding to the plurality of codewords in a database, and deleting the generated plurality of codewords; receiving a decoding request sent by code receiving object equipment, wherein the decoding request carries a code word to be queried; checking the code word to be queried based on the number segment stored in the database to obtain a checking result; and responding to the verification result to represent that the code word to be queried is effective, storing record information corresponding to the decoding request into a data structure taking the code word to be queried as an index in a database, and sending the decoding result to code sending object equipment. The application can improve the efficiency of codeword data processing.
Description
Technical Field
The present application relates to one-object one-code technology, and in particular, to a codeword data processing method, apparatus, electronic device, and storage medium.
Background
The one-article one-code is based on a two-dimensional code technology, and each article is provided with a unique article identity card by means of a two-dimensional code technology service platform, and the two-dimensional code is taken as a carrier, so that one article one-code is realized, and the articles are convenient to manage. By controlling each two-dimensional code, comprehensive management requirements of anti-counterfeiting management and control, traceability detection, marketing and rewarding, article circulation, data analysis and the like of the articles can be realized.
One object and one code are allocated to each article with unique code words, and a certain article can be positioned after code scanning, so that comprehensive management is convenient to follow-up. However, the one-object one-code technology is widely applied, and mass object management demands lead to huge number of one-object one-code words, and difficulty in storing and managing the code words is increased linearly.
In the related art, there is a lack of schemes for efficiently storing and managing codewords.
Disclosure of Invention
The embodiment of the application provides a codeword data processing method, a codeword data processing device, electronic equipment, a computer readable storage medium and a computer program product, which can improve the storage and management efficiency of codewords.
The technical scheme of the embodiment of the application is realized as follows:
the embodiment of the application provides a codeword data processing method, which comprises the following steps:
Generating a plurality of codewords based on the number of the code demands of the code object;
transmitting the plurality of codewords to a code object device, wherein the plurality of codewords are used for associating the code object device with different articles;
storing the number segments corresponding to the plurality of codewords in a database, and deleting the generated plurality of codewords;
receiving a decoding request sent by the code sending object equipment, wherein the decoding request carries a code word to be queried;
checking the code word to be queried based on the number segment stored in the database to obtain a checking result;
and responding to the verification result to represent that the code word to be queried is effective, storing record information corresponding to the decoding request into a data structure taking the code word to be queried as an index in the database, and sending a decoding result to the code sending object equipment.
The embodiment of the application provides a codeword data processing device, which comprises:
the code word generating module is used for generating a plurality of code words based on the code transmission demand number of the code transmission object; transmitting the plurality of codewords to a code object device, wherein the plurality of codewords are used for associating the code object device with different articles;
The number segment management module stores number segments corresponding to the plurality of code words in a database and deletes the generated plurality of code words;
the code scanning access module is used for receiving a decoding request sent by the code sending object equipment, wherein the decoding request carries a code word to be queried;
the code word analysis module is used for carrying out verification processing on the code word to be queried based on the number segment stored in the database to obtain a verification result;
and the code word information storage module is used for responding to the verification result to represent that the code word to be queried is effective, storing record information corresponding to the decoding request into a data structure taking the code word to be queried as an index in the database, and sending a decoding result to the code sending object equipment.
An embodiment of the present application provides an electronic device, including:
a memory for storing executable instructions;
and the processor is used for realizing the method provided by the embodiment of the application when executing the executable instructions stored in the memory.
The embodiment of the application provides a computer readable storage medium which stores executable instructions for realizing the codeword data processing method provided by the embodiment of the application when being executed by a processor.
The embodiment of the application provides a computer program product, which comprises a computer program or a computer executable instruction, and the computer program or the computer executable instruction realizes the codeword data processing method provided by the embodiment of the application when being executed by a processor.
The embodiment of the application has the following beneficial effects:
generating a plurality of code words according to the code sending requirement of the code sending object, storing the number segments corresponding to the code words into a database, and deleting the generated code words. And when receiving the code word to be queried in the decoding request sent by the code sending object device, checking the code word to be queried based on the number segment stored in the database, if the code word is an effective code word, storing the information corresponding to the code word into the database, and sending the decoding result to the code sending object device. The method for storing all the code words is replaced by a method for storing the number segments, so that the storage resources of a computer are saved, the method for inquiring the full code words is replaced by a method for inquiring the number segments, the inquiring speed is improved, and the code word processing efficiency is further improved.
Drawings
FIG. 1 is a schematic diagram of a codeword data processing system architecture according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a codeword data processing server according to an embodiment of the present application;
FIGS. 3A-3E are schematic flow diagrams of methods provided by embodiments of the present application;
fig. 4 is a schematic diagram of a codeword generation background system according to an embodiment of the present application;
fig. 5 is a schematic diagram of a number segment generation flow provided in the present embodiment;
FIG. 6 is a schematic diagram of an original codeword size section according to the present embodiment;
fig. 7 is a schematic diagram of a code scanning background system provided in this embodiment.
Detailed Description
The present application will be further described in detail with reference to the accompanying drawings, for the purpose of making the objects, technical solutions and advantages of the present application more apparent, and the described embodiments should not be construed as limiting the present application, and all other embodiments obtained by those skilled in the art without making any inventive effort are within the scope of the present application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is to be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with one another without conflict.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the application only and is not intended to be limiting of the application.
It should be noted that, in the embodiment of the present application, related data such as user information is related, when the embodiment of the present application is applied to a specific product or technology, user permission or consent needs to be obtained, and the collection, use and processing of related data need to comply with related laws and regulations and standards of related countries and regions.
Before describing embodiments of the present application in further detail, the terms and terminology involved in the embodiments of the present application will be described, and the terms and terminology involved in the embodiments of the present application will be used in the following explanation.
1) One code: based on the two-dimensional code technology, each article is provided with a unique article identity card by depending on a two-dimensional code technology service platform, and one article is realized by taking the two-dimensional code as a carrier, so that the articles are convenient to manage. By controlling each two-dimensional code, comprehensive management requirements of anti-counterfeiting management and control, traceability detection, marketing and rewarding, article circulation, data analysis and the like of the articles can be realized. One-object one-code technology is widely applied, one-object one-code can be realized in various industries, for example, one-can one-code, one-fruit one-code and the like, unique code words are allocated to each article, and a certain article can be positioned after code scanning.
2) The optimal code is a full-link digital marketing solution which is based on 'one object and one code' and combines with a classification analysis model and platform capability unique to Tencent to help enterprises to directly connect consumers and terminal stores with people, goods and fields as cores and open on-line and off-line scenes.
3) The original codeword, which is a number assigned to a particular item, may also be referred to as a numeric code, a serial number, etc., e.g., 123456789.
4) Codeword: the character string composed of numbers and letters is formed by splicing the encrypted original code words with necessary fields, such as HTTPS:// MA.
5) Sweep rate: the ratio of the number of the code words scanned in all the allocated code words is, for example, 1000 ten thousand code words are allocated to the brand ABCD of the corporation, 1000 ten thousand code words are used for the production, circulation and sales of goods, and the scanned code words in each link are 50 ten thousand, and the scanning rate is 5%.
6) MongoDB: the distributed file storage-based database aims to provide an extensible high-performance data storage solution for WEB applications, and the optimal code adopts MongoDB as main storage service, so that the storage cost is reduced.
7) Code sending object: in the one-object one-code technology, the object of associating the code word with the object is the object of applying the code word, for example, a merchant associates the code word with the object information to realize one unique code of one object, and the object can be managed by the unique code of the object, such as marketing, tracing, and the like.
One object and one code are allocated to each article with unique code words, and a certain article can be positioned after the code is scanned, so that comprehensive management requirements of anti-counterfeiting management and control, tracing detection, marketing and prize exchanging, article circulation, data analysis and the like of the articles are realized. Because the one-object one-code technology is widely applied to various industries, massive object management demands appear, and the number of code words of one object one-code is huge.
For example, when one object is applied to a marketing and rewarding scene, a single enterprise can generate billions of code words one year, and in order to ensure the effectiveness of the code words, the generated code words are generally stored for more than 2 years, but in the marketing process, the scanning rate of the generated code words is usually about 5%, and even if the marketing effect is better, the scanning rate is also generally lower than 20%, so that a large number of useless code words are required to be stored and managed, and computer resources are greatly wasted. Under other application scenes such as anti-counterfeiting management and control, traceability detection, article circulation, data analysis and the like, the problem that massive useless code words are required to be stored and managed also exists.
The embodiments of the present application provide a codeword data processing method, apparatus, electronic device, computer readable storage medium and computer program product, which can solve the technical problems of huge codeword number of one object and one code and high difficulty in codeword storage and management, and the following describes an exemplary application of the electronic device provided by the embodiments of the present application. In the following, an exemplary application when the electronic device is implemented as a server will be described.
The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud computing service. The terminal may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a vehicle-mounted terminal, a smart television, etc. The terminal and the server may be directly or indirectly connected through wired or wireless communication, which is not limited in this embodiment of the present application.
Referring to fig. 1, fig. 1 is a schematic architecture diagram of a codeword data processing system 100 according to an embodiment of the present application, in order to implement an application for supporting one codeword data processing, a terminal 400 (a user terminal is shown in an example), a device 600 to be coded (a terminal may be a device to be coded or a server may be a device to be coded, which is shown in an example) is connected to a server 200 (a codeword data processing server is shown in an example) through a network 300, where the server 200 is connected to a database 500, and the network 300 may be a wide area network or a local area network, or a combination of the two.
In some examples, embodiments of the present application may be performed jointly by codeword data processing server 200, transcoding object device 600, user terminal 400, and database 500. The codeword data processing server 200 is configured to generate a codeword with one object and one code according to the number of code transmission requirements set forth by the code transmission object device 600, store the codeword to the database 500, send the generated codeword to the code transmission object device 600, receive codeword data by the code transmission object device 600, apply the codeword to different articles, and associate the articles with the codeword, so as to facilitate management of the articles by using one object and one code technology. When the user terminal 400 scans the graphic code, transmits a decoding request to the codeword data processing server 200, and the codeword data processing server 200 decodes and transmits a decoding result to the user terminal 400, the user terminal 400 displays the scanning result at the graphic interface 410.
In some examples, the code object apparatus 600 may be a server or a merchant terminal, and thus, embodiments of the present application may be performed by the codeword data processing server 200, together with the code object apparatus 600 and the database 500. The codeword data processing server 200 is configured to generate a codeword with one object and one code according to the number of code transmission requirements set forth by the code transmission object device 600, store the codeword to the database 500, send the generated codeword to the code transmission object device 600, receive codeword data by the code transmission object device 600, apply the codeword to different articles, and associate the articles with the codeword, so as to facilitate management of the articles by using one object and one code technology. When the code object apparatus 600 (i.e., merchant terminal) scans the graphic code, a decoding request is transmitted to the codeword data processing server 200, the codeword data processing server 200 decodes and displays the scan result to the code object apparatus 600 (i.e., merchant terminal).
In some embodiments, the server 200 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and artificial intelligence platforms. The terminal 400 may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc. The terminal and the server may be directly or indirectly connected through wired or wireless communication, which is not limited in the embodiment of the present application.
In some embodiments, the embodiments of the present application may also be implemented by cloud computing, where cloud computing (cloud computing) is a computing mode that distributes computing tasks over a resource pool formed by a large number of computers, so that various application systems can acquire computing power, storage space, and information services as needed. The network that provides the resources is referred to as the "cloud". Resources in the cloud are infinitely expandable in the sense of users, and can be acquired at any time, used as needed, expanded at any time and paid for use as needed.
As a basic capability provider of cloud computing, a cloud computing resource pool (cloud platform for short, generally referred to as IaaS (Infrastructure as a Service, infrastructure as a service) platform) is established, in which multiple types of virtual resources are deployed for external clients to select for use.
According to the logic function division, a PaaS (Platform as a Service ) layer can be deployed on an IaaS (Infrastructure as a Service ) layer, and a SaaS (Software as a Service, software as a service) layer can be deployed above the PaaS layer, or the SaaS can be directly deployed on the IaaS. PaaS is a platform on which software runs, such as a database, web container, etc. SaaS is a wide variety of business software such as web portals, sms mass senders, etc. Generally, saaS and PaaS are upper layers relative to IaaS.
In some embodiments, the number segment data, the code words and the related information may be implemented through cloud storage, where cloud storage (cloud storage) is a new concept that extends and develops in the concept of cloud computing, and a distributed cloud storage system (hereinafter referred to as a storage system for short) refers to a storage system that provides data storage and service access functions together by integrating a large number of storage devices (storage devices are also referred to as storage nodes) of different types in a network through application software or application interfaces through functions such as cluster application, grid technology, and distributed storage file systems.
At present, the storage method of the storage system is as follows: when creating logical volumes, each logical volume is allocated a physical storage space, which may be a disk composition of a certain storage device or of several storage devices. The client stores data on a certain logical volume, that is, the data is stored on a file system, the file system divides the data into a plurality of parts, each part is an object, the object not only contains the data but also contains additional information such as a data Identification (ID) and the like, the file system writes each object into a physical storage space of the logical volume, and the file system records storage position information of each object, so that when the client requests to access the data, the file system can enable the client to access the data according to the storage position information of each object.
The process of allocating physical storage space for the logical volume by the storage system specifically includes: physical storage space is divided into stripes in advance according to the set of capacity measures for objects stored on a logical volume (which measures tend to have a large margin with respect to the capacity of the object actually to be stored) and redundant array of independent disks (RAID, redundant Array of Independent Disk), and a logical volume can be understood as a stripe, whereby physical storage space is allocated for the logical volume.
By way of example, artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique, and application system that simulates, extends, and extends human intelligence using a digital computer or a machine controlled by a digital computer, perceives the environment, obtains knowledge, and uses the knowledge to obtain optimal results. In other words, artificial intelligence is an integrated technology of computer science that attempts to understand the essence of intelligence and to produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence, i.e. research on design principles and implementation methods of various intelligent machines, enables the machines to have functions of sensing, reasoning and decision.
The artificial intelligence technology is a comprehensive subject, and relates to the technology with wide fields, namely the technology with a hardware level and the technology with a software level. Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
In the codeword data processing method, the number of codes transmitted by different objects in future for a period of time can be automatically predicted by combining the number of codes transmitted by different objects in the past by means of artificial intelligence technology.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a codeword data processing server according to an embodiment of the present application, and codeword data processing server 200 shown in fig. 2 includes: at least one processor 410, a memory 450, and at least one network interface 420. The various components in codeword data processing server 200 are coupled together by bus system 440. It is understood that the bus system 440 is used to enable connected communication between these components. The bus system 440 includes a power bus, a control bus, and a status signal bus in addition to the data bus. But for clarity of illustration the various buses are labeled in fig. 2 as bus system 440.
The processor 410 may be an integrated circuit chip having signal processing capabilities such as a general purpose processor, such as a microprocessor or any conventional processor, or the like, a digital signal processor (DSP, digital Signal Processor), or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like.
Memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid state memory, hard drives, optical drives, and the like. Memory 450 optionally includes one or more storage devices physically remote from processor 410.
Memory 450 includes volatile memory or nonvolatile memory, and may also include both volatile and nonvolatile memory. The non-volatile memory may be read only memory (ROM, read Only Mem ory) and the volatile memory may be random access memory (RAM, random Access Memory). The memory 450 described in embodiments of the present application is intended to comprise any suitable type of memory.
In some embodiments, memory 450 is capable of storing data to support various operations, examples of which include programs, modules and data structures, or subsets or supersets thereof, as exemplified below.
An operating system 451 including system programs, e.g., framework layer, core library layer, driver layer, etc., for handling various basic system services and performing hardware-related tasks, for implementing various basic services and handling hardware-based tasks;
network communication module 452 for reaching other computing devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: bluetooth, wireless compatibility authentication (WiF i), and universal serial bus (USB, universal Serial Bus), etc.;
An input processing module 454 for detecting one or more user inputs or interactions from one of the one or more input devices 432 and translating the detected inputs or interactions.
In some embodiments, the apparatus provided in the embodiments of the present application may be implemented in software, and fig. 2 shows a codeword data processing apparatus 455 stored in a memory 450, which may be software in the form of a program and a plug-in, etc., including the following software modules: codeword generation module 4551, number segment management module 4552, sweep code access module 4553, codeword parsing module 4554, codeword information storage module 4555, which are logical, and thus may be arbitrarily combined or further split depending on the functions implemented. The functions of the respective modules will be described hereinafter.
The codeword data processing method provided by the embodiment of the present application will be described in connection with exemplary applications and implementations of codeword data processing system 100 provided by the embodiment of the present application.
Referring to fig. 3A, fig. 3A is a schematic flow chart of a codeword data processing method according to an embodiment of the present application, and steps shown in fig. 3A are illustrated.
In step 101, codeword data processing server 200 generates a plurality of codewords based on the number of transmission requirements of the transmission object.
In some embodiments, referring to fig. 3B, step 101 shown in fig. 3A may be implemented by the following steps 1011 to 1013, which are specifically described below.
In step 1011, the range of values of the digital code of the code object is determined.
In general, the value range is a continuous digital range, and the number of digital codes included in the value range is greater than the required number of digital codes of the code sending object. In some examples, the code word may be designed to be formed by splicing an information code with a digital code according to the usage scenario of the code word and the access situation of the brand. Firstly, determining the value range of a digital code of a customer brand according to the number of codes required by the brand, for example, in order to ensure that the digital code has a sufficient length, ensuring that the digital code can be adapted to various encryption algorithms, setting the lower limit of the value range as a set value, for example, 1000 ten thousand, in order to reduce the probability of the digital code being randomly guessed to hit, setting the upper limit of the value range as a plurality of times of the number of codes, for example, 50 times of the number of codes, so that the effective value range [ set value, a plurality of times of the number of codes ] of the brand can be determined, and the example can be [ 1000 ten thousand, 50 times of the number of codes ] so that the hit probability of a number segment allocated in the effective value range is lower than 2% when the number segment allocated by external random guessing is counted. Wherein "[ lambda ] represents a closed interval,") "represents an open interval.
The lower limit of the value range of the brand digital code is a set value, the support of the digital code to various encryption modes is ensured, the upper limit of the value range is multiple times of the number of the transmitted codes, the value range which is large enough is ensured, the probability of randomly guessing the generated number segments is further reduced, and the generation safety of the code words is improved.
In step 1012, at least one number segment is extracted from the range of values.
In some embodiments, referring to fig. 3C, step 1012 shown in fig. 3B may be implemented by the following steps 10121 to 10123, which are specifically described below.
In step 10121, a ratio of the number of codes required to the number of segments is determined, and an upward rounding value of the ratio is used as the number of segments.
In some examples, the number segment length is a preset value L, when the number segment length is too long, the guessable range is wider when the number of the single number segment is leaked, and when the number segment is too short, the number segment is too many to be easily managed, and the number segment length L can be determined according to specific requirements in the business practice process.
As an example, a ratio of the number of the code transmission requirements to the number segment length may be determined, and the ratio is rounded up to be the number of the number segments, where a calculation formula of the number segments is as follows:
wherein M represents number segment number, N represents number of code sending requirement, and L represents number segment length.
In step 10122, a random number equal to the number of number segments is selected from the range of values.
In some examples, a number of random numbers are selected within a range of brand values, where a difference between two random numbers of similar values is greater than a segment length, e.g., M random numbers [ S ] 1 ,S 2 ,…,S M Wherein any two similar random numbers, e.g. S x -S x-1 >L, so that mutually non-overlapping number segments can be generated based on random numbers.
In some examples, the number of segments is chosen to be a number of random numbers, e.g., M random numbers [ S ] within the brand value range 1 ,S 2 ,…,S M The corresponding number segments can be generated based on random numbers, but no overlap between the number segments can be guaranteed.
In step 10123, the following processing is performed for each random number: and taking each random number as a number segment starting point, taking the sum of the random numbers and the number segment length as a number segment ending point, and recording a value interval between the number segment starting point and the number segment ending point as a number segment.
In some examples, a number of random numbers are selected within a range of brand values, where a difference between two random numbers of similar values is greater than a segment length, e.g., M random numbers [ S ] 1 ,S 2 ,…,S M Wherein any two similar random numbers, e.g. S x -S x-1 >L, so that mutually non-overlapping number segments can be generated based on random numbers, e.g. [ S ] 1 ,S 1 +L)、【S 2 ,S 2 +L)、…、【S M ,S M +L)。
In some examples, the method is based on M random numbers [ S ] 1 ,S 2 ,…,S M Sum of the segment lengths L, M segments are generated, e.g. [ S ] 1 ,S 1 +L)、【S 2 ,S 2 +L)、…、【S M ,S M +L)。
In some examples, if the number of brand code requirements divided by the number segment length is not an integer, the number actually used by the last number segment will be less than L, i.e. [ S ] M ,S M +L) is assigned as the last number segment, but the actual usage part is [ S ] M ,S M +(N mod L)】。
In some examples, the number segments are less than the number of codes, and extracting multiple number segments in the range of values of the brand, e.g., [ 1000 ten thousand, 2000 ten thousand ], [ 5000 ten thousand, 6000 ten thousand), etc., may result in multiple number segments of the brand.
In some examples, the length of the number segment may also be greater than the number of codes, in the range of the brand, one number segment is extracted, for example, to generate 500 tens of thousands of code words, the range of the brand may be set to [ 1000 tens of thousands, 2.5 billion ], one number segment [ 1000 tens of thousands, 1800 tens of thousands) is extracted, the available number range of the number segment is greater than the number of codes of the brand, and the first 500 tens of thousands of numbers are selected to generate corresponding code words, namely [ 1000 tens of thousands, 1500 tens of thousands ], so that one number segment of the brand may be obtained.
Generating a random number in a brand value range, and determining a corresponding number segment according to the random number, wherein the length of the number segment can be set according to needs, and then, according to an actual service scene, the proper number segment length can be selected, so that the number can be ensured to have a smaller guessable range when the number of the number segment is leaked, and the number segment can be ensured to be managed easily. In addition, when generating random numbers, the difference between two adjacent random numbers can be set to be larger than the length of the number segments, so that the generated number segments are ensured not to overlap.
In some embodiments, before extracting the at least one number segment from the range of values, if the code object has associated with the at least one number segment, after extracting the at least one number segment from the range of values, matching the at least one number segment with the associated number segment of the code object, determining that the at least one number segment is a valid number segment in response to the at least one number segment not overlapping the associated number segment of the code object, determining that the at least one number segment is an invalid number segment in response to the at least one number segment at least partially overlapping the associated number segment of the code object, and confirming transfer to a process of selecting a random number equal to the number of number segments in the range of values.
In order to ensure that the code words generated by the brand are not repeated, therefore, it is required to ensure that the number segments generated by the brand at this time are not overlapped, and if the brand also has the assigned number segments, it is required to ensure that the number segments generated by the brand at this time are not overlapped with the assigned number segments of the brand, and the number segments meeting the above conditions can be determined as valid number segments of the brand.
In some examples, if the number segments generated by the brand are not overlapped, comparing the number segments generated by the brand with the assigned number segments of the brand in sequence, if the number segments generated by the brand are not overlapped with the assigned number segments, determining that the number segments generated by the brand are valid number segments of the brand, if the number segments generated by the brand are partially overlapped with the assigned number segments, determining that the number segments generated by the brand are invalid number segments, and executing the following steps: and regenerating the random number, further regenerating the corresponding number segment, judging whether the number segment generated at this time is overlapped with the allocated number segment, and circularly executing until the number segment generated at this time is not overlapped with the allocated number segment, and determining that the number segment generated at this time is a valid number segment of the brand.
In some examples, if it cannot be ensured that the number segments generated by the brand at this time are not overlapped, firstly, the number segments allocated by the brand are obtained, the number segments generated by the brand at this time and the number segments allocated by the brand are combined to obtain a brand full-quantity number segment, and the full-quantity number segments are sorted according to the size, for example, the number segments can be sorted from small to large, or the number segments can be sorted from large to small. And sequentially comparing whether the two adjacent number segments are overlapped or not for the ordered full number segments, if not overlapping all the adjacent number segments, determining that the number segment generated at this time is a valid number segment of a brand, and if overlapping all the adjacent number segments, determining that the number segment generated at this time is an invalid number segment, and executing the following steps: and regenerating the random number, further regenerating the corresponding number segment, combining the number segment generated at this time with the acquired allocated number segment to obtain a full number segment, judging whether the full number segments are overlapped or not, and circularly executing until the number segment generated at this time is not overlapped with the full number segment, so as to determine that the number segment generated at this time is a valid number segment of the brand.
In the process of generating the brand effective number segments, the difference value between the two similar random numbers is larger than the length of the number segments, so that the number segments generated by the brand can be ensured not to overlap, and only the number segments generated by the brand are compared with the number segments distributed by the brand, and the comparison of the brand full-quantity number segments is not needed, so that the comparison times are reduced, and the number segment generation efficiency is improved. In the process of generating the brand effective number segment, the current number segment is firstly generated through the brand, the brand full-quantity number segment is obtained by combining the number segment generated by the brand and the number segment distributed by the brand, the effective number segment is obtained through the full-quantity number segment comparison, the random number is not limited, the random number distribution is more flexible, and the program processing is simpler and more convenient.
In step 1013, the information codes of the code transmitting object are respectively spliced with a plurality of digital codes included in at least one number segment to obtain a plurality of corresponding code words.
In some embodiments, referring to fig. 3D, step 1013 shown in fig. 3B may be implemented by the following steps 10131 to 10132, which are specifically described below.
In step 10131, the plurality of digital codes included in the at least one number segment are encrypted to obtain a plurality of encrypted codes.
In some examples, to ensure security of brands when managing items using one object and one code, the digital codes may be encrypted, and valid digital codes may be sequentially obtained from the number segment, and encryption operation may be performed for each digital code to obtain a plurality of encrypted codes.
For example, the digital code may be encrypted using a symmetric encryption algorithm. In symmetric encryption algorithms, only one key is used, which is used for processing during both encryption and decryption. The digital code and the encryption key are processed together by a special encryption algorithm to obtain a complex encryption code. In the decryption process, the encryption code needs to be decrypted by using the key used for encryption and an inverse algorithm corresponding to the encryption algorithm to obtain the digital code. The symmetric encryption algorithm has small calculated amount, high encryption speed and high encryption efficiency.
For example, the digital code may be encrypted using an asymmetric encryption algorithm in which encryption and decryption processes are completed using only a matched pair of public and private keys. For example, a pair of matched public and private keys is obtained, and a digital code is encrypted by the public key to obtain a complex encrypted code. In the decryption process, a private key corresponding to the encrypted public key is adopted to decrypt the encrypted code to obtain the digital code. The security of the asymmetric encryption algorithm is high.
In step 10132, the information codes are respectively spliced with the plurality of encryption codes to obtain a plurality of corresponding codewords.
In some examples, the information code of the brand may be composed of a plurality of necessary information, the necessary information may be a network link associated with the code sending object, the corresponding website may be accessed through network link jump, the code sending object may be identified, a unique identification number may be allocated to each brand, the brand information may be quickly obtained through the brand identification number, and the digital code version may be used to facilitate codeword management. By splicing the information codes with the encryption codes, respectively, a plurality of brand code words can be obtained.
By way of example, according to the usage scenario of the code word and the access condition of the enterprise, the brand code word can be designed into a network link field, a code version field, a brand identification number field and a encryption code field, and according to the different fields of the code word application, various code word schemes can be designed according to the needs. According to different codeword designs, the digital codes and the corresponding information codes are spliced to obtain brand codewords suitable for various field applications, and the wide application of one code can be supported.
For example, in some application scenarios, for example, in implementation scenarios with low security requirements, information and digital codes may be directly spliced to obtain code words of brands. For example, a number segment is extracted, and all numbers in the number segment are spliced with the information code of the brand in sequence to generate a plurality of codewords. For example, one of the segments is [ 1000 ten thousand, 2000 ten thousand ], and all integer numbers greater than or equal to 1000 ten thousand and less than 2000 ten thousand can be determined to be digital codes. And splicing the brand information codes with the digital codes in sequence to obtain a plurality of corresponding code words.
In the process of generating the brand code word, the digital code word is encrypted, and then necessary fields are spliced to generate the corresponding brand code word, so that the brand code word has higher safety in the application process of one object and one code, multiple encryption modes can be supported, and in the actual business application process, a proper encryption method can be selected according to scene requirements. In the process of generating the code words of the brands, the information codes can be realized by various schemes, the flexibility of generating the code words is improved, the brands can customize various code words according to own requirements, and the code words are better served for the brand to use in a one-object one-code link.
In step 102, codeword data processing server 200 transmits a plurality of codewords to encoding target device 600, wherein the plurality of codewords are used for association of encoding target device 600 with different items.
In some embodiments, the plurality of codewords are encapsulated into one code packet file in response to the number of the plurality of codewords exceeding a codeword number threshold, and the plurality of codewords are encapsulated into the plurality of code packet files in response to the number of the plurality of codewords exceeding a codeword number threshold, wherein the number of codewords of each code packet file does not exceed the codeword number threshold, and the code packet file is transmitted to the code object device.
For example, the codeword data processing server may generate a corresponding number of codewords based on the number of the code demands of the code object, encapsulate the generated codewords into a code packet file, and send the code packet file to the code object device. The code sending object device may be a terminal of a merchant or a server of the merchant, and different code word number thresholds may be set according to the receiving capability of the code sending object device, where the code word number threshold may be set relatively higher when the code word number threshold is sent to the merchant server, and the code word number threshold may be set relatively lower when the code word number threshold is sent to the merchant terminal.
And encapsulating the code words according to the code word number threshold, encapsulating the code words into one code packet file when the code word number does not exceed the code word number threshold, and encapsulating the code words into a plurality of code packet files when the code word number exceeds the code word number threshold. And sending the packaged code packet file to the code sending object equipment.
According to different code sending object devices, different code word quantity threshold values are set, and then a proper quantity of code packet files, namely the code packet size, are generated, so that the code packet files are stable and efficient in the transmission process.
In step 103, the codeword data processing server 200 stores the number segments corresponding to the plurality of codewords into the database 500, and deletes the plurality of codewords that have been generated.
In some examples, the brand code word is written into the code packet file, packaged mail or other mode is sent to the code sending object device, and the brand code word information is deleted to complete the code generation flow. The trade company obtains the codeword information that the brand corresponds, goes to the printing mill and can convert codeword information into the graphic code, for example, two-dimensional code, bar code to print the graphic code, be convenient for the codeword and use in a plurality of fields such as anti-fake management and control of article, traceability detects, marketing and exchange prize, article circulation, data analysis.
In step 104, the code object apparatus 600 transmits a decoding request carrying the code word to be queried to the code word data processing server 200.
In some embodiments, the two-dimensional code obtained by printing in a factory collects relevant information of the commodity corresponding to the two-dimensional code at the logistics circulation loop, and when the final commodity is sold to a consumer, the consumer can perform functions of code scanning, participation, or tracing inquiry on the commodity. The code sending object device can be a user terminal or a merchant terminal or a server, and when the two-dimension code is scanned, the terminal or the server can initiate a decoding request to the hemp data processing server, wherein the decoding request carries information of the code word to be queried.
In some embodiments, the code sending object device sends a decoding request carrying the code word to be queried to the code word data processing server, and if the decoding request also carries the related information of the article associated with the code word to be parsed, the related information is stored in a data structure using the code word to be queried as an index field in the database.
And carrying out code scanning operation on the user terminal or the merchant electronic device, namely, initiating a decoding request, acquiring related information of the user terminal or the merchant electronic device, such as code scanning IP, equipment ID, user identity information and the like, in the code scanning process, storing the related information of the articles acquired by the code scanning into a data structure taking the code word to be queried as an index field in a database, and realizing the association of the code word and the article information. Facilitating the use of codewords in one-thing-one-code technology.
In step 105, the codeword data processing server 200 acquires the number segment stored in the database 500, and performs verification processing on the codeword to be queried based on the number segment, to obtain a verification result.
In some embodiments, referring to fig. 3E, step 105 shown in fig. 3A may be implemented by the following steps 10131 to 10132, which are specifically described below.
In step 1051, the encryption code to be queried of the codeword to be queried is parsed, and a parsing result is obtained.
In some examples, the codeword data processing server obtains information of a codeword to be queried, parses the obtained codeword to be queried according to a scheme of codeword design, and obtains a parsing result including: the code sending object identification to be inquired, the key identification and the encryption code word to be inquired.
In step 1052, a decryption key corresponding to the key identifier to be queried is obtained, and the encryption codeword to be queried is decrypted based on the decryption key, so as to obtain an original codeword to be queried.
In some examples, the encryption method may employ a symmetric encryption algorithm or an asymmetric encryption algorithm, and according to the encryption method, a corresponding decryption mode is selected.
For example, if a symmetric encryption algorithm is adopted, the encryption key and the decryption key are the same key, and the encryption key is obtained by processing the key and the digital code through a special algorithm, so that in the decryption process, the key in the encryption code word can be obtained, and the encryption code word is decrypted by using the key, so that the original code word to be queried is obtained.
For example, if an asymmetric encryption algorithm is adopted, the encrypted public key and the decrypted private key are matched one by one, so that in the decryption process, a decryption key corresponding to the key identifier to be queried can be obtained, and the encryption code is decrypted according to the decryption key to obtain the original codeword to be queried.
In step 1053, the associated number segment of the coded object identification is queried based on the original codeword to be queried.
In some examples, after obtaining the original codeword, the code object identifier in the codeword information may be obtained, where the code object identifier is generally set as brand information, that is, a unique number set for each brand of the merchant, and the database may be queried for the number segment information associated with the brand through the brand unique number.
In some embodiments, the associated number segment of the code object identification may be queried from a cache of the codeword data processing server, and if the associated number segment of the code object identification is not queried from the cache, the associated number segment of the code object identification is queried from a database independent of the server.
In step 1054, in response to querying the original codeword to be queried in the associated number field of the codeword identification, a verification result is generated that characterizes the validity of the codeword to be queried.
In some examples, after the original codeword is obtained, the digital code in the original codeword information may be obtained, and if the digital code falls within the range of the number segment associated with the brand, the representation of the digital code is valid, i.e., the digital code is valid for the codeword, and the two-dimensional code corresponding to the codeword is also valid.
In step 1055, in response to not querying the original codeword to be queried in the associated number segment identified by the signaling object, a verification result is generated that characterizes the invalidity of the original codeword to be queried.
In some examples, after the original codeword is obtained, the digital code in the original codeword information may be obtained, and if the digital code does not fall within any number segment range associated with the brand, it is characterized that the digital code is invalid, that is, the codeword corresponding to the digital code is invalid, that is, the two-dimensional code corresponding to the codeword is also invalid.
In some embodiments, when the check result indicates that the codeword to be queried is invalid, the codeword data processing server masks the response decoding request and performs at least one of the following alerting operations: and sending alarm information with invalid code words to be queried to the code sending object equipment, and generating an alarm log with invalid code words to be queried, wherein the alarm log comprises dates and decoding results.
When the verification result indicates that the code word to be queried is invalid, the code word data processing server gives out warning and prompt appropriately, so that the problems of the merchant or related personnel are conveniently checked or recorded, and the user experience is improved.
The code word data processing server receives the code scanning request, analyzes, decrypts, checks and the like the code words carried in the request according to the code word design scheme, so that a code analysis result can be finally obtained, and the efficiency and the safety in the code analysis process are improved.
In some embodiments, after the associated number segment identified by the code object is queried from the database, the associated number segment identified by the code object queried from the database is stored in the cache, the expiration time of the associated number segment in the cache is set, and if the expiration time is reached, the associated number segment in the cache is deleted.
After the associated number segments of the code sending object identification are queried from the database for the first time, the associated number segments of the code sending object identification queried from the database are stored in a cache, and in the time effect range, the code word data processing server can directly query the associated number segments of the code sending object identification in a local cache without querying the database, and the query speed of the associated number segments is improved through a cache mechanism of the server, so that computer resources are saved.
In some embodiments, the encryption code to be queried is parsed, and the parsing result obtained further includes version information of the codeword to be queried. Before inquiring the associated number segment of the code sending object identification based on the original code word to be inquired, comparing the analyzed code word structure of the code word to be inquired with the code word structure of the version stored in the database, responding to the consistency of the code word structure of the code word to be inquired and the code word structure of the version, determining that the code word to be inquired is the issued code word, and transferring to execute the processing of inquiring the associated number segment of the code sending object identification based on the original code word to be inquired.
For example, the codeword structure may be designed according to requirements, different versions of the codeword structure may be designed for different brands, and the codeword structure may be stored in a database, or may be cached to a codeword data processing server, and the cache expiration time is set.
For example, after the encryption code to be queried is decrypted to obtain the original codeword to be queried, the corresponding codeword structure in the cache may be queried according to the code version, the codeword structure of the original codeword may be compared with the queried codeword structure in the cache, if the codeword structure is consistent, the codeword to be queried is determined to be the published codeword, the execution is shifted to the execution based on the original codeword to be queried, if the codeword structure is inconsistent, the response decoding request is masked, and the alarm operation is executed.
For example, if the corresponding codeword structure cannot be found in the cache according to the code version, or the cached codeword structure exceeds the timeliness range, the corresponding codeword structure may be queried in the database according to the code version.
The code version is prestored in the code word processing server or the database, and before the code word validity is verified through the number segment, the code version can be verified, so that the verification step is reduced, whether the code word is valid or not can be determined earlier, and the efficiency of code word validity verification is improved.
In step 106, codeword data processing server 200, in response to the verification result, characterizes the validity of the codeword to be queried, and stores the record information corresponding to the decoding request in database 500.
For example, if the codeword data processing server receives the code scanning request, analyzes the encryption code to be queried carried in the code scanning request, decrypts and verifies the encryption code to be queried to obtain an effective codeword, and can store information corresponding to the effective codeword into a database, so that all code scanning records and relevant information of the commodity in a continuous period can be recorded conveniently.
In step 107, the codeword data processing server 200 transmits the decoding result to the encoding target apparatus 600.
In some embodiments, before the codeword data processing server sends the decoding result to the code object device, if the history information of the article, for example, the code scanner information, the code scanning address, the mobile phone number, the code scanning ip, the history scanning times, the code scanning time, the identification of the code scanning device, etc., is queried from the data field of the data structure, the decoding result will be generated based on the history information and the verification result. If the history information of the item is not queried from the data field of the data structure, generating a decoding result based on the verification result.
The decoding result is formed by combining the historical record information and the verification result, so that all information of the code word can be stored in the code word duration period, the decoding result can be generated for display, and for example, if the decoding result is a user terminal, information of commodities, winning conditions, prize exchange modes and the like can be displayed on a user terminal interface by scanning the two-dimensional code to participate in a marketing activity of a merchant. The decoding result can record all information in the commodity duration period, and the commodity code word can be applied to various fields.
In the following, an exemplary application of the embodiment of the present application in a practical application scenario will be described.
One-thing-one-code technology is widely applied, for example, in a one-thing-one-code marketing scene, the code scanning rate of the generated code is usually 5% -20%, the code generation amount of one-thing-one-code is very large, one-year of a single enterprise can reach one billion number of code words, and in order to ensure the effectiveness of the code words, the code words are generally required to be stored for more than 2 years, so that the storage of massive useless code words is caused, and the computer resources are wasted.
The scheme aims at the characteristic that the number of code words of one object and one code is very large, and combines various scenes such as one object and one code generation, verification, circulation, information acquisition, identification, marketing and the like, and provides a code word data processing method. After the method is used, when the number segments are distributed, once a code packet file is generated for a user and sent to the user, each specific code word in the number segments can be stored in the background, only the corresponding number segments are stored to save the storage space, and only a single code word and related information are needed to be stored in the background until the generated encrypted one-object one-code word is scanned by the user.
For example, according to the requirement of the client brand on the number of codewords, generating one-object one-code codeword, generally, performing necessary encryption, splicing and other processes on the digital code to obtain a plurality of codewords corresponding to the client brand, packaging the codewords into a code package file, sending the code package file to the client, and printing the code package file to a factory by the client. The two-dimensional code printing method has the advantages that a plurality of code words corresponding to brands are converted into two-dimensional codes in a printing factory, the two-dimensional codes can be printed inside brand commodity packages, the two-dimensional codes are used for marketing commodities, the two-dimensional codes can be printed on outer packages, information of a plurality of links such as production, logistics and sales of the collected commodities is obtained through the two-dimensional codes, the commodities are sold and sold to consumers, the consumers can conduct code scanning to participate in marketing activities, and merchants can trace the sources of the commodities.
The codeword generation and management is mainly implemented through a codeword generation background system, referring to fig. 4, fig. 4 is a schematic diagram of the codeword generation background system provided by the embodiment of the present application, where in fig. 4, the codeword generation background system mainly includes: number segment management service and code generation service. The number segment management service is mainly responsible for generating number segments, managing number segment information and providing number segment information inquiry capability. The code generation service is mainly responsible for reading the number segments generated by the number segment management service, encrypting and splicing the number segments one by one to generate code words, packaging the code word information into code packet files, and providing the code packet files for other systems for use. For example, a member communication marketing system, a store communication system, a genuine product communication anti-counterfeiting tracing system and the like.
When a brand is assigned with a number segment, a codeword structure is designed according to a usage scenario of a codeword generally: the URL field + code version field + brand information field + encrypted original codeword field, the codeword may be composed of numbers and letters. An enterprise who puts forward a code demand may have at least one brand, and therefore, in the method of codeword data processing, both the codeword and the number segment are assigned to the brand, so that the uniqueness of the brand information of the enterprise can be ensured, for example, an ABCD is assigned to a certain brand of commodity of a certain enterprise as the brand information, and the ABCD is used as the unique identifier of the brand in all systems of the optimal code. Therefore, when assigning number segments to brands, the situation that the number segments assigned in the same brand cannot be repeated, the number segments cannot overlap, and the like is required, but the number segments under different brands are not limited, and similarly, the management of the number segments of a certain brand in a background system database is also in the form.
For example, numbers are used for assigning number segments, for example, in the range of 1 to 1000 tens of thousands of numbers, numbers [ 12345, 22344 ] are assigned as one number segment, and then the numbers greater than or equal to 12345 and less than 22344 are all valid original codewords (digital codes) assigned by this number segment.
First, a value range of a code is determined for a customer brand needing the code, a lower limit of 1000 ten thousand is set, an upper limit is set according to the code transmission amount of the next two years, 50 times of the code transmission amount is generally selected as the upper limit of the value range, for example, assuming that 10 hundred million code words are needed for a certain brand commodity in one year, the upper limit is generally set to 500 hundred million. The design can lead the number segments distributed in the effective space to have the overall ratio less than 2 percent, and the hit probability of the external random guessing the number of the distributed effective number segments is not more than 2 percent. For example, assume that the original codeword assigned to brand ABCD has a range of values of [ 1000 ten thousand, 500 hundred million ].
Second, after determining the range of values of the original codewords assigned by brand ABCD, the codeword generation backend system may begin to generate corresponding codewords for the brand. The first step of generating the code word is to allocate an original code word number segment through a number segment management service, see fig. 5, fig. 5 is a schematic diagram of a number segment generation flow provided in this embodiment, firstly, obtain a random number in a value range of an original code word of a brand, generate the original code word number segment according to the random number, determine an effective original code word after overlapping detection, store number segment information corresponding to the effective original code word into a database, and encrypt and splice the effective original code word to obtain a one-code word of the brand.
By way of example, a longest value L of a continuous original codeword number segment is set, and in the practical process, when a number segment is found to be too long, the guessable range is wider, and when a single number segment is revealed, a number segment is too short, the number segment is too many and is not easy to manage, and through practice, it is known that L is set to be a more reasonable value of 1 ten thousand. Therefore, a number segment [ n, n+l ] may be allocated from the range of values of brand ABCD [ 1000 ten thousand, 500 hundred million ], an example may be [ n, n+10000), where n represents the original codeword of the lower limit of the number segment.
For example, assuming that the brand needs to generate a number of N codewords, calculating the number of independent continuous number segments to be allocated according to the number of codewords N and the number segment length L, wherein the calculation method is to obtain integer bits of N/L, if the quotient of N divided by L is an integer M, then M number segments are allocated, if N cannot be divided by L, and N is rounded to obtain M, then 1 number segments need to be allocated on the basis of M number segments, namely the number of number segments is m+1, and note that the number of original codewords actually used by the last number segment is smaller than L, namely the actually used part is [ S ] M ,S M ++ (N mod L) but still according to [ S ] when there is overlap between the allocation and judgment segments M ,S M +L) processAnd (5) managing. If N is smaller than L, the result of the calculation is 1, and therefore, in this case, it is necessary to assign a number segment.
For example, referring to fig. 6, fig. 6 is a schematic diagram of original codeword number segments provided in this embodiment, as shown in fig. 6, assuming that M number segments need to be allocated, then M random numbers are generated in the brand value range [ 1000 ten thousand, 500 hundred million ], and assuming that the random numbers are [ S ] 1 ,S 2 ,…,S M The random numbers are then converted into M number segments [ S ] as number segment starting positions 1 ,S 1 +L)、【S 2 ,S 2 +L)、…、【S M ,S M +l). For example, 31234 codes need to be generated, and the maximum length of the number segment is set to 10000, then 4 numbers are randomly generated, for example: 11112, 333334, 333434, 11111111. Then the number segments are [ 11112, 21112) ], [ 333334, 343334 ], [ 333434, 343434 ], [ 11111111, 11112345 ].
Because each brand is required to generate a unique codeword, the corresponding original codeword cannot be repeated, i.e., the original codeword number segments cannot overlap each other and all assigned number segments under the current brand, and once overlap occurs, the random number needs to be regenerated, and the number segments are regenerated until there is no overlap between the number segments. Therefore, there is a need for a method of segment overlap detection that yields valid original codeword segments that do not overlap.
For example, to ensure that all assigned segments are non-duplicate, the original codeword size segment generated needs to be compared with all segments under the current brand to determine if the segments are duplicate, assuming that the current brand is assigned 100 billion (10 10 ) And the number segment length is 1 ten thousand (10) 4 ) Then there is currently 10 6 Number segment of 10 6 The number segments of orders of magnitude are compared repeatedly, and a processing algorithm using n log (n) can be better processed. Thus, the overlap detection uses a processing algorithm of n×log (n). Firstly, acquiring data of all assigned number segments under a current brand, combining the assigned number segments under the brand with the number segments generated at the time to obtain a full number segment of the brand, and then combining the full numberAnd (3) sequencing all the number segments from small to large, sequentially comparing whether two adjacent number segments are overlapped, if so, determining the number segment generated at this time as an invalid number segment, and if not, determining the number segment generated at this time as a valid number segment.
For example, the 4 number segments [ 11112, 21112), [ 333334, 343334), [ 333434, 343434), [ 11111111, 11112345 ], and [ 333334, 343334) generated by the above method overlap, and after the overlap is detected, the 4 number segments are determined as invalid number segments, and the number segment generation part is re-executed until all the obtained number segments do not overlap, that is, the valid number segments are determined.
And (3) starting code generation processing of single code words of brands for the valid number segments obtained in the last step, wherein the code generation processing method is that the original code words in the number segments are encrypted one by one to obtain encrypted original code words, and then the original code word fields are spliced with necessary fields to obtain code words. Wherein the necessary fields include: URL field, code version field, brand information field. And writing all the generated code words into code package files, when the number of the code words is large, splitting the files, packaging the code package files into a plurality of code package files, and sending the code package files to a client for subsequent use, so that the code generation flow is completed. In a database of the code word generation background system, the generated code words do not need to be stored continuously, only the number segments corresponding to the code words need to be stored, and storage resources are saved.
The user code scanning information management is realized by a code scanning background system based on a number segment, referring to fig. 7, fig. 7 is a schematic diagram of the code scanning background system provided in this embodiment, and as shown in fig. 7, the code scanning background system includes a code scanning access service, a code analysis service and a single code information storage. For example, the user scans the code to initiate a code analysis request, and the code scanning access service may receive the code analysis request of the user, perform parameter verification processing, for example, check the codeword structure, if the codeword structure conforms to the issued codeword structure, characterize that verification is passed, and send the two-dimensional code as a request parameter to the code analysis service.
After receiving the request, the code analysis service analyzes brand information corresponding to the two-dimensional code, reads encryption information (namely an encrypted original code word field) recorded in the two-dimensional code, reads a corresponding encryption and decryption key from a key storage of a background, decrypts the encryption information by using the key, obtains an original code word after decryption is successful, inquires an effective number segment range of the brand, and determines that the corresponding two-dimensional code is an effective code word of the brand if the original code word falls into the effective number segment range of the current brand.
For example, after the code parsing service receives the codeword to be processed, first, it may determine whether the codeword is valid according to the structure of the codeword, for example, obtain a brand information field in the codeword, and if the brand information is correct, characterize that the codeword is valid. Then, for valid codewords, the relevant information can be parsed according to the structure of the codewords. For example, the received codeword is HTTPS:// MA. RUN/M/ABCD/C123456789, the parsed URL field is HTTPS:// MA. RUN, the code version field is M, the brand information field is ABCD, the key ID is C, and the encrypted original codeword field is 123456789.
And reading the corresponding key of the corresponding brand from the key storage for decryption according to the read key ID. Because the key quantity is smaller, the key data can be cached in a local cache or a redis cache, so that the frequent reading of the database is avoided, and the computer resource is wasted.
And decrypting the encrypted original code word by using the secret key to obtain the original code word. And reading the allocated number segments of the corresponding brands from the number segment management service of the code generation service background system, and caching the number segments after the effective number segments are read for the first time, so that the number segments are prevented from being read from the number segment management service after the code words to be processed are received each time. For example, when verifying whether the original codeword 11111 is valid, the number segment management service is queried, it is determined that [ 10000, 20000 ] is a valid number segment, the original codeword is determined to be a valid codeword, and the number segment [ 10000, 20000 ] is cached to the code resolution service, and an expiration time is added, and in the aging range, the number segment query can be performed through the code resolution service without going to the number segment management service query. When the set expiration time arrives, the corresponding number segment information is read again, so that the situation that the code analysis service does not sense after the number segment information is updated in a code generation service background system is avoided.
And inquiring in the valid number section of the brand by using the original code word, judging whether the original code word falls into the allocated valid number section, if so, indicating that the original code word is a valid code, and if not, indicating that the original code word is invalid, and rejecting a decoding request by a code analysis service according to the condition.
And then, inquiring a mongoDB database by taking the two-dimensional code as a main key, acquiring scanning code information corresponding to the two-dimensional code, and if data are inquired, indicating that the code is scanned, and if no relevant record exists, indicating that the code is not scanned. And after integrating the related information of the code scanning of the current code, storing or updating the related information of the code scanning of the current code into a mongoDB database by taking the two-dimensional code as a primary key, and returning the related information such as effective information of the code and the code scanning times and the like to the user for scanning the code access service.
For example, after the verification result determines that the two-dimensional code is valid, the codeword corresponding to the two-dimensional code may be used, the relevant information of the codeword is read in a single codeword information storage (MongoDB), if the relevant information is not read, which indicates that the two-dimensional code has not been scanned yet, and the codeword and the relevant information of the scan code are stored in the single codeword information storage. If the two-dimensional code is read, the code word related information of the current scanning code is combined with the queried code word information, and the combined code word related information is updated into a data structure stored by the code word. The code scanning information corresponding to the two-dimensional code can be returned to the upper layer service, including information such as whether the code is an effective code or not and what time the code is scanned, so that the upper layer service can conveniently realize corresponding business processing.
By means of the codeword data processing method, the codeword can be stored not immediately when the brand codeword is generated, but by storing the brand number segment corresponding to the codeword. After the code word is decoded during code scanning, an original code word is obtained, and the validity of the code word can be determined according to whether the original code word falls into a stored brand number section. For the effective codes determined by the code scanning, the code word related information acquired by the code scanning can be stored. The storage space is greatly saved, and the code scanning processing efficiency is improved. And the competitiveness of the whole system is improved.
Continuing with the description below of an exemplary architecture of codeword data processing apparatus 455 implemented as a software module provided by an embodiment of the present application, in some embodiments, as shown in fig. 2, the software module stored in codeword data processing apparatus 455 of memory 450 may include: a codeword generating module 4551, configured to generate a plurality of codewords based on the number of the transmission requirements of the transmission object; transmitting a plurality of codewords to the code object device, wherein the plurality of codewords are used for associating the code object device with different articles; the number segment management module 4552 is configured to store number segments corresponding to a plurality of codewords in a database, and delete the generated plurality of codewords; the code scanning access module 4553 is configured to receive a decoding request sent by a code receiving object device, where the decoding request carries a codeword to be queried; the codeword parsing module 4554 is configured to perform verification processing on a codeword to be queried based on a number segment stored in a database, so as to obtain a verification result; and the codeword information storage module 4555 is configured to, in response to the verification result, characterize that the codeword to be queried is valid, store record information corresponding to the decoding request into a data structure in which the codeword to be queried is used as an index in the database, and send the decoding result to the device to be coded.
In some embodiments, the codeword generating module 4551 is further configured to determine a value range of the digital code of the code object, where a length of the value range is greater than a code number of the code object; extracting at least one number segment from the value range; and respectively splicing the information codes of the code sending object with a plurality of digital codes included in at least one number segment to obtain a plurality of corresponding code words.
In some embodiments, the codeword generating module 4551 is further configured to determine a ratio of the number of requirements for transmitting the code to the length of the number segment, and take an upward rounded value of the ratio as the number of the number segment, where the length of the number segment is a preset value; selecting a number of random numbers of the number segment in the value range; the following processing is performed for each random number: and taking each random number as a number segment starting point, taking the sum of the random numbers and the number segment length as a number segment ending point, and recording a value interval between the number segment starting point and the number segment ending point as a number segment.
In some embodiments, the codeword generation module 4551 is further configured to match at least one number segment with an associated number segment of the codeword; determining that the at least one number segment is a valid number segment in response to the at least one number segment not overlapping the associated number segment of the code object; and responding to at least partial overlapping of at least one number segment and the associated number segment of the code sending object, determining that the at least one number segment is an invalid number segment, and confirming that the processing of selecting the number of the number segments and the random numbers in the value range is carried out.
In some embodiments, the codeword generating module 4551 is further configured to encrypt a plurality of digital codes included in at least one number segment to obtain a plurality of encrypted codes; the information codes are spliced with a plurality of encryption codes respectively to obtain a plurality of corresponding code words; wherein the information code includes at least one of: links associated with the code object; identification of a code sending object; version of the digital code.
In some embodiments, the codeword generation module 4551 is further configured to encapsulate the plurality of codewords into a codeword package file in response to the number of the plurality of codewords not exceeding the codeword number threshold; responsive to the number of the plurality of codewords exceeding a codeword number threshold, encapsulating the plurality of codewords into a plurality of code packet files, wherein the number of codewords of each code packet file does not exceed the codeword number threshold; and sending the code packet file to the code sending object equipment.
In some embodiments, the codeword parsing module 4554 is further configured to parse an encrypted code to be queried of a codeword to be queried to obtain a parsed result, where the result includes an object identifier of the encrypted code to be queried, a key identifier, and the encrypted code to be queried; obtaining a decryption key corresponding to the key identifier to be queried, and decrypting the encrypted codeword to be queried based on the decryption key to obtain an original codeword to be queried; inquiring the associated number section of the code sending object identification based on the original code word to be inquired; generating a decoding result representing that the code word to be queried is effective in response to the query of the original code word to be queried in the associated number section of the code object identifier; and generating a verification result representing that the original codeword to be queried is invalid in response to the original codeword to be queried not being queried in the associated number segment of the code sending object identification.
In some embodiments, the codeword parsing module 4554 is further configured to characterize that the codeword to be queried is invalid in response to the verification result, mask the response decoding request, and perform at least one of the following alarm operations: and sending alarm information with invalid code words to be queried to the code sending object equipment, and generating an alarm log with invalid code words to be queried.
In some embodiments, the number segment management module 4552 is further configured to query the cache for the associated number segment identified by the code object; responding to the associated number segments of the code object identification which are not queried from the cache, and querying the associated number segments of the code object identification from the database; after querying the database for the associated number segment identified by the coded object, the method further comprises: storing the associated number segments of the code object identifications inquired from the database into a cache, and setting the expiration time of the associated number segments in the cache; in response to reaching the expiration time, the associated number segment in the cache is deleted.
In some embodiments, the codeword parsing module 4554 is further configured to parse a result further including a version of the codeword to be queried; before querying the associated number segment of the coded object identification based on the original codeword to be queried, the method further comprises: comparing the analyzed codeword structure of the codeword to be queried with the codeword structure of the version; and responding to the consistency of the codeword structure of the codeword to be queried and the codeword structure of the version, determining the codeword to be queried as the issued codeword, and transferring to execute the processing of querying the associated number segment of the code object identification based on the original codeword to be queried.
In some embodiments, codeword parsing module 4554 is further configured to generate a decoding result based on the history information and the verification result in response to querying the history information of the item from the data field of the data structure; in response to not querying the history information of the item from the data fields of the data structure, a decoding result is generated based on the verification result.
Embodiments of the present application provide a computer program product comprising a computer program or computer-executable instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer executable instructions from the computer readable storage medium, and the processor executes the computer executable instructions, so that the computer device executes the codeword data processing method according to the embodiment of the present application.
Embodiments of the present application provide a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, cause the processor to perform a codeword data processing method provided by embodiments of the present application, for example, the codeword data processing methods shown in fig. 3A to 3E.
In some embodiments, the computer readable storage medium may be FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; but may be a variety of devices including one or any combination of the above memories.
In some embodiments, the executable instructions may be in the form of programs, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and they may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
As an example, the executable instructions may, but need not, correspond to files in a file system, may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a hypertext markup language (HTML, hyper Text Markup Language) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code).
As an example, executable instructions may be deployed to be executed on one computing device or on multiple computing devices located at one site or, alternatively, distributed across multiple sites and interconnected by a communication network.
In summary, the embodiment of the application replaces the original mode of storing all codewords by the mode of storing the number segments, saves the storage resources of a computer, and improves the query speed and further improves the codeword processing efficiency by replacing the mode of querying the number segments by the mode of querying the full-quantity codewords.
The foregoing is merely exemplary embodiments of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims (15)
1. A method of codeword data processing, the method comprising:
generating a plurality of codewords based on the number of the code demands of the code object;
transmitting the plurality of codewords to a code object device, wherein the plurality of codewords are used for associating the code object device with different articles;
storing the number segments corresponding to the plurality of codewords in a database, and deleting the generated plurality of codewords;
Receiving a decoding request sent by the code sending object equipment, wherein the decoding request carries a code word to be queried;
checking the code word to be queried based on the number segment stored in the database to obtain a checking result;
and responding to the verification result to represent that the code word to be queried is effective, storing record information corresponding to the decoding request into a data structure taking the code word to be queried as an index in the database, and sending a decoding result to the code sending object equipment.
2. The method of claim 1, wherein the generating a plurality of codewords based on the number of transcoding needs of the transcoding object comprises:
determining a value range of the digital codes of the code sending objects, wherein the length of the value range is larger than the code sending quantity of the code sending objects;
extracting at least one number segment from the value range;
and respectively splicing the information codes of the code sending object with a plurality of digital codes included in the at least one number segment to obtain a plurality of corresponding code words.
3. The method of claim 2, wherein if the number of the at least one number segment is plural, the extracting the at least one number segment from the range of values comprises:
Determining the ratio of the number of the code sending demands to the length of the number segments, and taking the upward rounding value of the ratio as the number of the number segments, wherein the length of the number segments is a preset value;
selecting random numbers with the same quantity as the number segments in the value range;
the following processing is performed for each of the random numbers: and taking each random number as a number segment starting point, taking the sum of the random numbers and the number segment length as a number segment ending point, and recording a value interval between the number segment starting point and the number segment ending point as a number segment.
4. A method according to claim 3, wherein before said extracting at least one segment from said range of values, if said coded object has associated with it at least one segment, said method further comprises, after said extracting at least one segment from said range of values:
matching the at least one number segment with the associated number segment of the code sending object;
determining that the at least one number segment is a valid number segment in response to the at least one number segment not overlapping an associated number segment of the code object;
and responding to the at least one number segment and the associated number segment of the code sending object to be at least partially overlapped, determining that the at least one number segment is an invalid number segment, and confirming to transfer to the process of selecting the random numbers with the same number as the number of the number segments in the value range.
5. The method of claim 2, wherein the splicing the information code of the code sending object with the plurality of digital codes included in the at least one number segment to obtain a plurality of corresponding codewords includes:
encrypting a plurality of digital codes included in the at least one number segment to obtain a plurality of encryption codes;
splicing the information codes with the encrypted codes respectively to obtain a plurality of corresponding code words;
wherein the information code includes at least one of: and a link associated with the code sending object, an identifier of the code sending object and a version of the digital code.
6. The method according to any one of claims 1 to 5, wherein the transmitting the plurality of codewords to the encoding target device comprises:
encapsulating the plurality of codewords into a code packet file in response to the number of the plurality of codewords not exceeding a codeword number threshold;
encapsulating the plurality of codewords into a plurality of code packet files in response to the number of the plurality of codewords exceeding the codeword number threshold, wherein the number of codewords of each code packet file does not exceed the codeword number threshold;
And sending the code packet file to the code sending object equipment.
7. The method according to any one of claims 1 to 5, wherein the performing a verification process on the codeword to be queried based on the number segment stored in the database to obtain a verification result includes:
analyzing the encryption code to be queried of the code word to be queried to obtain an analysis result, wherein the analysis result comprises a code object identifier to be queried, a key identifier and the encryption code word to be queried;
obtaining a decryption key corresponding to the key identifier to be queried, and decrypting the encrypted codeword to be queried based on the decryption key to obtain an original codeword to be queried;
inquiring the associated number segment of the code sending object identification based on the original code word to be inquired;
generating a verification result representing that the code word to be queried is effective in response to the original code word to be queried being queried in the associated number segment of the code object identification;
and generating a verification result representing that the original codeword to be queried is invalid in response to the original codeword to be queried not being queried in the associated number segment of the code sending object identification.
8. The method according to any one of claims 1 to 5, further comprising:
In response to the verification result indicating that the codeword to be queried is invalid, masking the response to the decoding request, and performing at least one of the following alarm operations: and sending the alarm information with invalid code words to be queried to the code sending object equipment, and generating an alarm log with invalid code words to be queried.
9. The method of claim 7, wherein the step of determining the position of the probe is performed,
the querying the associated number segment of the code sending object identification based on the original code word to be queried comprises the following steps:
inquiring the associated number segment of the code sending object identifier from the cache;
responding to the fact that the associated number segment of the code sending object identification is not queried from the cache, and querying the associated number segment of the code sending object identification from a database;
after said querying the associated number segment identified by the coded object from the database, the method further comprises:
storing the associated number segments of the code sending object identification inquired from the database into the cache, and setting the expiration time of the associated number segments in the cache;
and deleting the associated number segment in the cache in response to reaching the expiration time.
10. The method of claim 7, wherein the step of determining the position of the probe is performed,
The analysis result also comprises the version of the codeword to be queried;
before the querying the associated number segment identified by the coding object based on the original codeword to be queried, the method further includes:
comparing the analyzed codeword structure of the codeword to be queried with the codeword structure of the version;
and responding to the code word structure of the code word to be queried and the code word structure of the version to be consistent, determining the code word to be queried as the issued code word, and transferring to execute the processing of querying the associated number segment of the code object identification based on the original code word to be queried.
11. The method according to any one of claims 1 to 5, wherein before said transmitting the decoding result to the encoding object device, the method further comprises:
generating the decoding result based on the history information and the verification result in response to querying the history information of the item from the data fields of the data structure;
and generating the decoding result based on the verification result in response to no inquiry of the historical record information of the article from the data structure.
12. A codeword data processing apparatus, characterized in that the codeword data processing apparatus comprises:
The code word generating module is used for generating a plurality of code words based on the code transmission demand number of the code transmission object; transmitting the plurality of codewords to a code object device, wherein the plurality of codewords are used for associating the code object device with different articles;
the number segment management module is used for storing number segments corresponding to the plurality of code words in a database and deleting the generated plurality of code words;
the code scanning access module is used for receiving a decoding request sent by the code sending object equipment, wherein the decoding request carries a code word to be queried;
the code word analysis module is used for carrying out verification processing on the code word to be queried based on the number segment stored in the database to obtain a verification result;
and the code word information storage module is used for responding to the verification result to represent that the code word to be queried is effective, storing record information corresponding to the decoding request into a data structure taking the code word to be queried as an index in the database, and sending a decoding result to the code sending object equipment.
13. An electronic device, the electronic device comprising:
a memory for storing executable instructions;
a processor for implementing the codeword data processing method of any of claims 1 to 11 when executing executable instructions stored in said memory.
14. A computer readable storage medium storing computer executable instructions which when executed by a processor implement the codeword data processing method of any of claims 1 to 11.
15. A computer program product comprising a computer program or computer executable instructions which, when executed by a processor, implement the codeword data processing method of any of claims 1 to 11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211387107.7A CN117009683A (en) | 2022-11-07 | 2022-11-07 | Codeword data processing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211387107.7A CN117009683A (en) | 2022-11-07 | 2022-11-07 | Codeword data processing method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117009683A true CN117009683A (en) | 2023-11-07 |
Family
ID=88560709
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211387107.7A Pending CN117009683A (en) | 2022-11-07 | 2022-11-07 | Codeword data processing method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117009683A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118446717A (en) * | 2024-07-05 | 2024-08-06 | 四川丝路易购科技有限公司 | Cross-border supply chain commodity tracing method and system |
-
2022
- 2022-11-07 CN CN202211387107.7A patent/CN117009683A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118446717A (en) * | 2024-07-05 | 2024-08-06 | 四川丝路易购科技有限公司 | Cross-border supply chain commodity tracing method and system |
CN118446717B (en) * | 2024-07-05 | 2024-09-03 | 四川丝路易购科技有限公司 | Cross-border supply chain commodity tracing method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110322269B (en) | Internet marketing method | |
US9836612B2 (en) | Protecting data | |
CN108537314A (en) | Product marketing system and method based on Quick Response Code | |
CN107852412A (en) | For phishing and the system and method for brand protection | |
CN104796257A (en) | Flexible data authentication | |
CN110662184A (en) | Information pushing method and device, computer equipment and storage medium | |
CN103152337A (en) | Method for transmitting two-dimensional code information in secure dynamic manner | |
US20070168556A1 (en) | Electronic data delivery method | |
CN105723373A (en) | Method for encoding an access to a computer resource | |
CN103023657A (en) | Security verification system based on distributed network transaction | |
CN110162722A (en) | Products Show method, server and storage medium based on two dimensional code | |
CN108282484B (en) | Password acquisition method and device, computer equipment and storage medium | |
CN108737079B (en) | Distributed quantum key management system and method | |
CN117009683A (en) | Codeword data processing method and device, electronic equipment and storage medium | |
CN114337988A (en) | Media data decryption method and device, computer equipment and storage medium | |
CN117574425A (en) | Data desensitization method, system, storage medium and device for database | |
CN110851794A (en) | Media file uplink method and device, storage medium and electronic device | |
US11128605B2 (en) | Distributed encryption of mainframe data | |
CN117609372A (en) | DAPPS distribution system of block chain | |
CN115860768A (en) | Tracing method and device based on block chain and electronic equipment thereof | |
CN109412754A (en) | A kind of data storage, distribution and access method encoding cloud | |
CN115622703A (en) | Static code sending and checking method, equipment and storage medium | |
CN114399007A (en) | Information feedback method and device, computer equipment and storage medium | |
CN108537559B (en) | Anti-counterfeiting method and system free of remote service | |
CN112632480A (en) | Product license updating method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication |