Anti-counterfeiting service number generation method and system
By processing the business category code and identification code, and combining verification timestamps to generate anti-counterfeiting and tampering of traditional business numbers, the problem of traditional business numbers being easily forged and tampered is solved, and the anti-counterfeiting and uniqueness of business numbers is realized.
Patent Information
- Application Number
- CN202510596752.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-09-05
AI Technical Summary
The traditional business number generation method lacks effective anti-counterfeiting measures, which are easily forged and tampered with, affecting business security and management.
By processing the business category code and identification code, combined with the verified timestamp, the business number main body is generated, and decomposition, numerical conversion, calculation of weight factors, rounding operations, and remaining operations are performed, and the anti-counterfeiting business number is finally generated.
The generated business number has anti-counterfeiting function and is difficult to be forged and tampered with, ensuring uniqueness and time continuity, and improving the security and credibility of the business number.
Smart Images

Figure CN120597337A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of encryption technology, and in particular to a method and system for generating an anti-counterfeiting business number. Background Art
[0002] In industries such as insurance, the business mainly focuses on providing specific services and rarely involves physical services. Therefore, the security of information generated by the business will directly affect the survival of the company.
[0003] Due to the unique nature of their business, business numbers are widely used across numerous company scenarios, such as insurance application numbers, policy numbers, approval numbers, report numbers, case filing numbers, and case closure numbers. However, traditional business number generation methods often lack effective anti-counterfeiting measures, making them susceptible to forgery and tampering, posing numerous risks to business security and management. Therefore, a new anti-counterfeit business number generation algorithm is needed to improve the security and credibility of business numbers. Summary of the Invention
[0004] The present invention proposes a method and system for generating an anti-counterfeiting business number to solve the problems of inconvenient data collection and slow prediction time in the prior art.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is:
[0006] The method for generating an anti-counterfeiting business number includes: processing a business category code and a business identification code, and combining them with a verified timestamp to obtain a business number body; decomposing the business number body, converting numerical values, calculating weight factors, calculating total values, performing rounding operations, performing remainder operations, and obtaining an anti-counterfeiting code to generate an anti-counterfeiting business number.
[0007] Furthermore, the processing of the service category code and the service identification code includes: obtaining the service category code and the service identification code, and performing correctness verification and format correction; merging the service category and the service identification to obtain a service identification code; wherein the service category code is used to distinguish different types of services, and the service identification code is a specific identification symbol for a specific service.
[0008] Furthermore, the service category code and / or the service identification code are obtained through the service number generation system; correspondingly, the verified timestamp includes: obtaining the service timestamp generated when the service changes based on the system clock of the service number generation system, and the service change includes receiving the service category code and / or the service identification code; verifying the service timestamp based on historical timestamp data.
[0009] Furthermore, the business timestamp is verified based on the historical timestamp data, including: storing the timestamp of each record to obtain the historical timestamp data; if the current timestamp is earlier than the latest timestamp in the historical timestamp data, judging that the current timestamp is abnormal, and resetting the system clock to increase the system time; if the current timestamp is equal to the latest timestamp in the historical timestamp data, judging that multiple business changes have occurred in a very short time, and re-acquiring the current timestamp after waiting for 1 millisecond until it is greater than the latest timestamp; if the current timestamp is later than the latest timestamp in the historical timestamp data, the verification is passed.
[0010] Furthermore, obtaining the service number body includes: combining the service identification code and the service timestamp to obtain the service number body.
[0011] Furthermore, the method further includes: recording the timestamp of the business number body obtained into the cache of the business number generation system as the historical timestamp data.
[0012] Furthermore, the business number body is decomposed, numerically converted, weight factors are calculated, total values are calculated, rounding operations are performed, remainder operations are performed, and an anti-counterfeiting code is obtained to generate an anti-counterfeiting business number, including: decomposing the business number body: decomposing the business number body according to each bit and splitting it into single characters or numbers; the numerical conversion: converting each decomposed number or character into a corresponding numerical value according to a pre-set code table; calculating weight factors: calculating the weight factors of each decomposed bit according to a specific algorithm; calculating total values: multiplying the results of the numerical conversion by the weight factors to obtain corresponding products, and summing the products to obtain the total value; the rounding operation: dividing the total value by a first preset value and rounding the result; the remainder operation: dividing the result of the rounding operation by a second preset value and taking the remainder of the result; obtaining the anti-counterfeiting code: searching for the corresponding anti-counterfeiting code based on the result of the remainder operation; generating an anti-counterfeiting business number: adding the anti-counterfeiting code to the business number body to obtain the anti-counterfeiting business number.
[0013] Furthermore, the weight factor is calculated based on the bit position and / or business type; the first preset value is equal to the second preset value; and the anti-counterfeiting code is added to the end of the business number body to obtain the anti-counterfeiting business number.
[0014] The anti-counterfeiting business number generation system includes: a first module for processing a business category code and a business identification code, and combining them with a verified timestamp to obtain a business number body; a second module for decomposing the business number body, converting numerical values, calculating weight factors, calculating total values, performing rounding operations, performing remainder operations, and obtaining an anti-counterfeiting code to generate an anti-counterfeiting business number.
[0015] Due to the adoption of the above technical solution, the present invention has the following beneficial effects:
[0016] 1. The present invention obtains the service number body by processing the service category code and the service identification code and combining them with the verified timestamp, so that the subsequent anti-counterfeiting processing can be based on the specific service and time and has a certain degree of traceability; the service number body is decomposed, numerically converted, weight factors are calculated, total values are calculated, rounding operations are performed, remainder operations are performed and anti-counterfeiting codes are obtained to generate anti-counterfeiting service numbers, generate service numbers with anti-counterfeiting functions, and effectively prevent the service numbers from being forged and tampered with. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 This is a flow chart of the anti-counterfeiting business number generation method proposed by the present invention. DETAILED DESCRIPTION
[0018] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0019] like Figure 1 The anti-counterfeiting service number generation method shown includes: processing the service category code and the service identification code, and combining them with the verified timestamp to obtain the service number body; decomposing the service number body, converting the numerical value, calculating the weight factor, calculating the total value, rounding the integer, taking the remainder operation and obtaining the anti-counterfeiting code, and generating the anti-counterfeiting service number.
[0020] The processing of the service category code and the service identification code includes: obtaining the service category code and the service identification code, and performing correctness verification and format correction; combining the service category and the service identification to obtain a service identification code; wherein the service category code is used to distinguish different types of services, and the service identification code is a specific identification symbol for a specific service.
[0021] The service category code and / or the service identification code are obtained through the service number generation system; correspondingly, the verified timestamp includes: based on the system clock of the service number generation system, obtaining the service timestamp generated when the service changes, the service change includes receiving the service category code and / or the service identification code; based on historical timestamp data, verifying the service timestamp.
[0022] The business timestamp is verified based on the historical timestamp data, including: storing the timestamp of each record to obtain the historical timestamp data; if the current timestamp is earlier than the latest timestamp in the historical timestamp data, judging that the current timestamp is abnormal, and resetting the system clock to increase the system time; if the current timestamp is equal to the latest timestamp in the historical timestamp data, judging that multiple business changes have occurred in a very short time, and re-obtaining the current timestamp after waiting for 1 millisecond until it is greater than the latest timestamp; if the current timestamp is later than the latest timestamp in the historical timestamp data, the verification is passed.
[0023] The obtaining of the service number body includes: combining the service identification code and the service timestamp to obtain the service number body.
[0024] The method further includes: recording the timestamp of the business number body obtained into the cache of the business number generation system as the historical timestamp data.
[0025] The decomposition of the business number body, numerical conversion, calculation of weight factors, calculation of total value, rounding operation, remainder operation and acquisition of anti-counterfeiting code to generate an anti-counterfeiting business number include: decomposing the business number body: decomposing the business number body according to each bit and splitting it into single characters or numbers; numerical conversion: converting each decomposed number or character into a corresponding numerical value according to a preset code table; calculating weight factors: calculating the weight factors of each decomposed bit according to a specific algorithm; calculating total value: multiplying the results of the numerical conversion by the weight factors to obtain corresponding products, and summing the products to obtain the total value; rounding operation: dividing the total value by a first preset value and rounding the result; remainder operation: dividing the result of the rounding operation by a second preset value and taking the remainder of the result; obtaining the anti-counterfeiting code: searching for the corresponding anti-counterfeiting code based on the result of the remainder operation; generating the anti-counterfeiting business number: adding the anti-counterfeiting code to the business number body to obtain the anti-counterfeiting business number.
[0026] The weight factor is calculated based on the bit position and / or business type; the first preset value is equal to the second preset value; the anti-counterfeiting code is added to the end of the business number body to obtain the anti-counterfeiting business number.
[0027] The anti-counterfeiting business number generation system includes: a first module for processing a business category code and a business identification code, and combining them with a verified timestamp to obtain a business number body; a second module for decomposing the business number body, converting numerical values, calculating weight factors, calculating total values, performing rounding operations, performing remainder operations, and obtaining an anti-counterfeiting code to generate an anti-counterfeiting business number.
[0028] like Figure 1The flowchart of the anti-counterfeiting business number generation method shown is:
[0029] Step S1: Receive input information
[0030] When the anti-counterfeiting service number generation system begins operation, it first receives two key pieces of information: service category and service identifier. Service category distinguishes different types of services, while service identifier is a unique identifier for a specific service. For example, in an insurance system, the service category might be "insurance" or "underwriting," and the service identifier is the product code.
[0031] Step S2: Processing business categories
[0032] Check the length of the received service category. If it is less than 2 digits, replace it with 0s on the left to fix the length to 2 digits. For example, if the service category is "1", it will become "01" after processing. This is done to ensure the format consistency of the service category in subsequent processing.
[0033] Step S3: Processing business identification
[0034] The service ID is processed similarly. Check the length of the service ID. If it is less than 5 digits, replace it with 0s on the left to make it 5 digits long. For example, if the service ID is "123", it will be processed to "00123" to standardize the service ID format.
[0035] Step S4: Generate a service identification code
[0036] The processed service category and service identifier are combined to form a service identification code. For example, the service category "01" and the service identifier "00123" are combined to form the service identification code "0100123", which uniquely identifies a specific service under a specific service type.
[0037] Step S5: Get the current timestamp
[0038] Get the current timestamp information from the system clock. The timestamp accurately records the time when the business number was generated, which is used to add uniqueness to the time dimension of the business number.
[0039] Step S6: Read cache timestamp
[0040] The timestamp recorded when the business number was last generated is read from the system cache. This cached timestamp is used to compare with the current timestamp to determine the order of time and whether the system time is normal.
[0041] Step S7: Timestamp comparison and processing
[0042] Case 1: The current timestamp is less than the last recorded value: This indicates that the system time may have been manually set back or an anomaly has occurred. In this case, reset the system time to the last recorded value plus 1 millisecond to ensure time continuity and increments, and avoid confusion in business number generation caused by time anomalies.
[0043] Case 2: The current timestamp is equal to the last recorded value: This indicates that the business number was generated multiple times in a very short period of time, and the timestamp has not changed. To ensure that each business number has a unique timestamp, the system waits 1 millisecond and then re-acquires the timestamp until a new timestamp is obtained that is greater than the last recorded value.
[0044] Case 3: The current timestamp is greater than the last recorded value**: This is normal and you can proceed directly to the next step.
[0045] Step S8: Generate business number body
[0046] The service identification code obtained in step 4 and the timestamp processed in step 7 are combined to form the service number body.
[0047] Step S9: Record the current timestamp
[0048] The currently used timestamp is recorded in the system cache to provide a reference for timestamp comparison when generating a business number next time.
[0049] Step S10: Decompose the business number body
[0050] Decompose the business number body into individual characters or numbers for subsequent processing.
[0051] Step S11: Numerical conversion
[0052] Each decomposed digit or character is converted to its corresponding value according to a pre-set code table. The code table defines the mapping relationship between different characters or numbers and specific values, and the conversion is achieved by looking up the table.
[0053] Step S12: Calculate weight factor
[0054] For each decomposed bit, a weight factor is calculated based on a specific algorithm. The weight factor may be calculated based on factors such as the bit position and service type, and bits in different positions may have different weights.
[0055] Step S13: Calculate the total value
[0056] Each digit of the value converted in step S11 is multiplied by the corresponding weight factor calculated in step S12, and then all the products are summed to obtain a total value.
[0057] Step S14: rounding operation
[0058] The total value obtained in step S13 is divided by a pre-configured value, and the integer portion of the result is taken. The configured value can be adjusted according to business needs and system settings.
[0059] Step S15: Remainder operation
[0060] The integer result obtained in step S14 is divided again by another pre-configured value (which may also be the same as the configured value in step S14), and the remainder of the result is obtained.
[0061] Step S16: Obtaining the anti-counterfeiting code
[0062] According to the remainder obtained in step S15, the corresponding anti-counterfeiting code is searched from another pre-set code table. The code table defines the mapping relationship between remainders and anti-counterfeiting codes, and the unique anti-counterfeiting code is located through the remainder.
[0063] Step S17: Generate final business number
[0064] The security code obtained in step S16 is appended to the end of the service number body generated in step S8 to form the final service number. This service number combines service identification information, time information, and security information, making it unique and anti-counterfeit. It can be used for service identification and other related operations in the service number generation system, thus completing the service number generation process.
[0065] The beneficial effects of this program include:
[0066] Strong anti-counterfeiting ability: Through complex calculation process and code table mapping, the generated business number is difficult to be forged and cracked, effectively improving the security of the business number.
[0067] Uniqueness guarantee: Combining the business identification code and the time stamp after time dialback processing, ensure that the generated business number is unique across different businesses and at different times.
[0068] Time callback response: It can effectively handle time callback issues, avoid duplication of business numbers due to time callback, and ensure the normal operation of the business number generation system.
[0069] The above description is a detailed description of the preferred embodiments of the present invention, but the embodiments are not intended to limit the scope of the patent application of the present invention. Any equivalent changes or modifications completed under the technical spirit suggested by the present invention should fall within the patent scope covered by the present invention.
Claims
1. A method for generating an anti-counterfeiting service number, characterized in that: include: Process the business category code and business identification code, and combine them with the verified timestamp to obtain the business number body; The business number body is decomposed, converted into numerical values, a weight factor is calculated, a total value is calculated, rounding operations are performed, remainder operations are performed, and an anti-counterfeiting code is obtained to generate an anti-counterfeiting business number.
2. The method for generating an anti-counterfeiting service number according to claim 1, wherein: The processing service category code and service identification code include: Obtaining the service category code and the service identification code, and performing correctness verification and format correction; Combining the service category and the service identifier to obtain a service identification code; The service category code is used to distinguish different types of services, and the service identification code is a specific identification symbol for a specific service.
3. The method for generating an anti-counterfeiting service number according to claim 2, characterized in that: Obtaining the service category code and / or the service identification code through a service number generation system; Correspondingly, the verified timestamp includes: obtaining, based on a system clock of the service number generating system, a service timestamp generated when a service changes, wherein the service change includes receiving the service category code and / or the service identification code; The business timestamp is verified based on historical timestamp data.
4. The method for generating an anti-counterfeiting service number according to claim 3, characterized in that: The verifying the business timestamp based on the historical timestamp data includes: Storing the timestamp of each record to obtain the historical timestamp data; If the current timestamp is earlier than the latest timestamp in the historical timestamp data, the current timestamp is determined to be abnormal, and the system clock is reset to increase the system time; If the current timestamp is equal to the latest timestamp in the historical timestamp data, it is determined that multiple business changes have occurred in a very short period of time, and the current timestamp is re-obtained after waiting for 1 millisecond until it is greater than the latest timestamp; If the current timestamp is later than the latest timestamp in the historical timestamp data, the verification passes.
5. The method for generating an anti-counterfeiting service number according to claim 4, characterized in that: The obtaining of the service number body includes: combining the service identification code and the service timestamp to obtain the service number body.
6. The method for generating an anti-counterfeiting service number according to claim 5, characterized in that: Also includes: The timestamp of the business number body is recorded in the cache of the business number generation system as the historical timestamp data.
7. The method for generating an anti-counterfeiting service number according to claim 6, characterized in that: The steps of decomposing the business number body, converting numerical values, calculating weight factors, calculating total values, performing rounding operations, performing remainder operations, and obtaining an anti-counterfeiting code to generate an anti-counterfeiting business number include: Decomposing the business number body: decomposing the business number body according to each digit, and splitting it into individual characters or numbers; The numerical value conversion: converting each decomposed digit or character into a corresponding numerical value according to a pre-set code table; Calculating the weight factor: for each decomposed bit, calculating its weight factor according to a specific algorithm; Calculating the total value: multiplying the results of the numerical conversion by the weight factors to obtain corresponding products, and summing the products to obtain the total value; The rounding operation: dividing the total value by a first preset value and rounding the result; The remainder operation: dividing the result of the rounding operation by a second preset value, and taking the remainder of the result; Obtaining the security code: searching for the corresponding security code based on the result of the remainder operation; The anti-counterfeiting service number is generated by adding the anti-counterfeiting code to the service number body to obtain the anti-counterfeiting service number.
8. The method for generating an anti-counterfeiting service number according to claim 7, characterized in that: The weighting factor is calculated based on the position of the bit and / or the traffic type; The first preset value is equal to the second preset value; The anti-counterfeiting code is added to the end of the business number body to obtain the anti-counterfeiting business number. 9.Anti-counterfeiting business number generation system, characterized by: include: The first module is used to process the service category code and service identification code, and combine them with the verified timestamp to obtain the service number body; The second module is used to decompose the business number body, convert numerical values, calculate weight factors, calculate total values, perform rounding operations, perform remainder operations, and obtain anti-counterfeiting codes to generate anti-counterfeiting business numbers.