CN116737741B - Platform merchant balance data real-time updating processing method - Google Patents

Platform merchant balance data real-time updating processing method Download PDF

Info

Publication number
CN116737741B
CN116737741B CN202311006490.1A CN202311006490A CN116737741B CN 116737741 B CN116737741 B CN 116737741B CN 202311006490 A CN202311006490 A CN 202311006490A CN 116737741 B CN116737741 B CN 116737741B
Authority
CN
China
Prior art keywords
frequency
characters
character
data
sequence
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.)
Active
Application number
CN202311006490.1A
Other languages
Chinese (zh)
Other versions
CN116737741A (en
Inventor
王桂东
邵蓥力
曾令忠
王张云
熊晟翌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Zhuhun Technology Co ltd
Original Assignee
Chengdu Zhuhun Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Chengdu Zhuhun Technology Co ltd filed Critical Chengdu Zhuhun Technology Co ltd
Priority to CN202311006490.1A priority Critical patent/CN116737741B/en
Publication of CN116737741A publication Critical patent/CN116737741A/en
Application granted granted Critical
Publication of CN116737741B publication Critical patent/CN116737741B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/126Character encoding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/237Lexical tools
    • G06F40/242Dictionaries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Accounting & Taxation (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Bioethics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention relates to the technical field of data processing for businesses, in particular to a platform merchant balance data real-time updating processing method, which comprises the following steps: analyzing and encoding the acquired platform merchant preset data to obtain first encoded data, combining a dictionary and a combination relation between characters in the first encoded data to obtain sequence stability of the characters, encoding the first encoded data again to obtain second encoded data, obtaining frequency stability of the characters according to the sequence stability, an encoded value of the characters in the second encoded data and frequency, and encrypting platform merchant balance data according to the frequency stability to obtain ciphertext data. According to the invention, the platform merchant balance data is analyzed to obtain a plurality of key character sets, the platform merchant balance data is subjected to multi-level encryption, the data security is greatly improved, the encryption and decryption time of the data is reduced through rapid analysis and encryption, and the high instantaneity of data update is realized.

Description

Platform merchant balance data real-time updating processing method
Technical Field
The invention relates to the technical field of data processing for businesses, in particular to a platform merchant balance data real-time updating processing method.
Background
Because the data volume of the balance data of the platform merchant is large, the data is required to be primarily transmitted to the server in the real-time updating process, and when the balance data of the platform merchant is directly transmitted, the efficiency and the safety are low; the balance data of the platform merchant always has more repeated data, so that the data needs to be encoded and encrypted in order to ensure the data security and the real-time property during updating;
in the existing method, when the balance data of the platform merchant is encrypted, the data is generally scrambled by confusion by using an MTF coding algorithm, and then encrypted. However, the scrambling effect generated by different initial lists is different, while the random initial list scrambling effect is poor, so that the encryption effect is not ideal, and the data security is low.
The invention provides a real-time updating processing method for platform merchant balance data, which is characterized in that a plurality of key character sets are obtained by analyzing the platform merchant balance data, and the platform merchant balance data is subjected to multi-level encryption, so that the data security is greatly improved; in addition, compared with other commonly used encryption algorithms, such as a hash encryption algorithm, when processing a large amount of data, a longer calculation time is needed, the encryption method is more efficient, and encryption and decryption time is reduced, so that better instantaneity is achieved.
Disclosure of Invention
The invention provides a real-time updating processing method for balance data of a platform merchant, which aims to solve the problem of poor encryption effect of the balance data of the existing platform merchant.
The invention relates to a platform merchant balance data real-time updating processing method which adopts the following technical scheme:
the invention provides a platform merchant balance data real-time updating processing method, which comprises the following steps:
collecting platform merchant balance data;
obtaining the frequency of various characters in the balance data of the platform commercial tenant, and obtaining a dictionary corresponding to the characters according to the frequency; encoding the balance data of the platform commercial tenant to obtain first encoded data, and obtaining the sequence stability of various characters according to the first encoded data and the dictionary;
encoding the first encoded data to obtain second encoded data, and obtaining the representative encoding difference of the characters according to the frequency maximum value of the corresponding encoding value of each character in the second encoded data; obtaining the coding distance of any two characters according to the difference between the size sequences representing the coding differences; obtaining a first frequency character set according to the frequency of various characters in the balance data of the platform merchant, and obtaining a plurality of second frequency character sets according to the size of the sequence stability and the first frequency character set; obtaining the representative frequency of the second frequency character group according to the frequency of the characters in the second frequency character group, obtaining the representative frequency difference according to the difference between the representative frequency before any second frequency character group and other second frequency character groups, and obtaining the frequency distance between any two characters according to the difference between the orders of the representative frequency differences; obtaining the frequency stability of the character according to the difference between the coding distance and the frequency distance; according to the frequency stability, a key character set is obtained, and the balance data of the platform merchant is encrypted by using the key character set to obtain ciphertext data;
and combining the ciphertext data to realize real-time safe updating of the balance data of the platform merchant.
Further, the step of obtaining the dictionary corresponding to the characters according to the frequency comprises the following specific steps:
counting the types of the characters contained in the platform merchant balance data and the frequencies of the characters of each type in the platform merchant balance data, sorting the characters of each type according to the sequence from small frequency to large frequency, and taking the sequence corresponding to the sorted characters as a dictionary.
Further, the encoding of the platform merchant balance data to obtain first encoded data, and obtaining the sequence stability of various characters according to the first encoded data and the dictionary, includes the following specific steps:
firstly, encoding platform merchant balance data by using a BWT encoding algorithm, and recording the encoded data as first encoded data;
then, the combination formed by one character and other characters in the dictionary is marked as a first combination; the combination formed by any type of characters and other types of characters in the first coded data is recorded as a second combination, and a plurality of second combinations correspond to one character; recording the number of a plurality of second combinations corresponding to any character in the first coded data as the number of the second combinations of the characters;
secondly, the frequency of occurrence of each category of characters in the first coded data is obtained and is recorded as the frequency of the characters; acquiring sequence numbers of all characters in the dictionary, and recording absolute values of differences of sequence numbers between any character and other characters in the dictionary as character distances, wherein two characters in a first combination correspond to one character distance, and one first combination corresponds to one character distance;
the size relation of the character distance between any two first combinations is recorded as a character distance condition; the character distance size relation between any two second combinations in the first coded data is recorded as a character distance relation; acquiring character distance relations between any two second combinations in all second combinations corresponding to any characters in the first coded data, and recording the number corresponding to the second combinations as the condition number of the characters corresponding to the second combinations when the character distance conditions between the two first combinations corresponding to the second combinations in the dictionary are the same;
finally, the specific calculation method for the sequence stability of various characters comprises the following steps:
wherein,represent the firstSequence stability of class characters;represent the firstFrequency of class characters;represent the firstClass character in BWT codingThe conditional number of individual characters;represent the firstA second combined number of class characters.
Further, the step of encoding the first encoded data to obtain second encoded data, and obtaining the representative encoded difference of the characters according to the frequency maximum value of the corresponding encoded value of each type of character in the second encoded data, includes the following specific steps:
firstly, taking a sequence formed by the sequence of each character in a dictionary as an initial list of an MTF coding algorithm, coding first coded data by utilizing the initial list and combining the MTF coding algorithm, and recording the coded data as second coded data;
then, the frequencies of all the code values corresponding to the second code data of all the characters are obtained and recorded as code frequencies; when the coding frequency is maximum, the corresponding coding value is marked as a representative coding of the character;
finally, obtaining absolute values of differences representing codes between any type of characters and all other characters, and recording the absolute values as first differences, wherein the any type of characters correspond to a plurality of first differences; and marking the sum of all the first differences corresponding to any character as the representative coding difference of the character, wherein any character corresponds to one representative coding difference.
Further, the method for obtaining the coding distance of any two characters according to the difference between the size sequences representing the coding differences comprises the following specific steps:
and sorting the characters of all categories according to the order from small to large according to the size of the representative coding difference, marking the sequence obtained by sorting as a character coding sequence, and marking the absolute value of the difference value of the serial numbers of any two characters in the character coding sequence as the coding distance between the two characters.
Further, the method includes the specific steps of obtaining a first frequency character set according to frequencies of various characters in the balance data of the platform merchant, and obtaining a plurality of second frequency character sets according to the magnitude of sequence stability and the first frequency character set, wherein the specific steps are as follows:
firstly, acquiring a corresponding frequency distribution histogram according to the frequency of each type of characters in the balance data of a platform merchant, dividing the characters with similar frequencies into a group by using an OTSU threshold segmentation algorithm, and marking the group as a first frequency character group to acquire a plurality of first frequency character groups;
and then, deleting the characters with the sequence stability smaller than the sequence stability threshold value in the first frequency character group according to the experience preset sequence stability threshold value to obtain a plurality of second frequency character groups.
Further, the step of obtaining the representative frequency of the second frequency character set according to the frequency of the characters in the second frequency character set, obtaining the representative frequency difference according to the difference between the representative frequency of any second frequency character set and the representative frequency before other second frequency character sets, and obtaining the frequency distance of any two characters according to the difference between the magnitude sequence of the representative frequency difference comprises the following specific steps:
firstly, recording average frequencies of all characters contained in any second frequency character set in balance data of a platform merchant as representative frequencies of the second frequency character set, and obtaining representative frequencies corresponding to a plurality of second frequency character sets;
then, obtaining absolute values of differences between any one second frequency character set and representative frequencies of all other second frequency character sets, and marking the absolute values as second differences, wherein one second frequency character set corresponds to a plurality of second differences; the sum of all second differences corresponding to any second frequency character set is recorded as the representative frequency difference of the second frequency character set;
secondly, according to the magnitude of the representative frequency difference of the second frequency character sets, sequencing all the second frequency character sets according to the sequence from small to large, and marking the obtained sequence as a character set sequence;
and finally, recording the absolute value of the difference value of the serial numbers of the second frequency character group corresponding to any two characters in the character group sequence as the frequency distance between the two characters.
Further, the frequency stability is obtained by the following steps:
firstly, obtaining the maximum value of the frequency distance and the maximum value of the coding distance, and carrying out normalization processing on the frequency distance and the coding distance between all characters by using a linear normalization method to obtain normalized frequency distance and coding distance which are respectively recorded as normalized frequency distance and normalized coding distance;
finally, the specific calculation method of the frequency stability of the character comprises the following steps:
wherein,representing the first of a sequence of character setsFrequency stability of individual characters;representing the number of characters contained in the character set sequence:representing the first of a sequence of character setsThe first characterNormalized frequency distance of individual characters;representing the first of a sequence of character setsThe first characterNormalized encoding distance of individual characters;representing the super-parameters;an exponential function based on a natural constant is represented.
Further, the method for obtaining the key character set according to the frequency stability, and encrypting the balance data of the platform merchant by using the key character set to obtain ciphertext data comprises the following specific steps:
firstly, obtaining frequency stability of all characters in a character group sequence, presetting a frequency stability threshold according to experience, obtaining characters with frequency stability smaller than the frequency stability threshold in the character group sequence, and recording the characters as key characters;
then, key characters in each second frequency character group in the character group sequence are reserved, other characters with frequency stability larger than a frequency stability threshold value are removed, and the second frequency character groups with the characters removed are recorded as key character groups; the minimum frequency stability of characters in any key character group is recorded as the representative frequency stability of the key character group, the key character groups are ordered according to the order of the representative frequency stability from big to small, and the sequence after the key character groups are ordered is recorded as a key character group sequence;
finally, encrypting the balance data of the platform merchant by combining the first key character group with the Virginia password according to the sequence of the key character group in the key character group sequence to obtain a primary ciphertext; and then, encrypting the primary ciphertext by combining a second key character group in the key character group sequence with the Virginia password to obtain a secondary ciphertext, carrying out iterative encryption by using the advanced line, and recording the last ciphertext as ciphertext data of the balance data of the platform merchant.
Furthermore, the method for realizing the real-time safe updating of the balance data of the platform merchant by combining the ciphertext data comprises the following specific steps:
and taking all key character groups in the key character group sequence as keys, utilizing a 5G communication network, adopting an HTTPS transmission protocol, utilizing an asynchronous communication or message queue technology to transmit ciphertext data in real time, sending the ciphertext data to a server, and utilizing the keys to perform data decryption and updating operation at the server.
The technical scheme of the invention has the beneficial effects that: the sequence stability of the characters is obtained through the calculation of the BWT coding result, the characters with larger sequence stability are used as the characters in the secret key, and the dependence of the secret key on plaintext data is increased, so that under the condition of unknown plaintext, an attacker is difficult to infer the secret key; characters with larger instability are calculated in characters with larger sequence stability through MTF coding results and are used as characters in a secret key, so that the difference between ciphertext and plaintext is increased, and encryption security is improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart showing steps of a method for updating balance data of a platform merchant in real time.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following is a detailed description of specific implementation, structure, characteristics and effects of the method for updating and processing the balance data of the platform merchant according to the invention in real time with reference to the accompanying drawings and the preferred embodiment. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
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 invention belongs.
The invention provides a specific scheme of a platform merchant balance data real-time updating processing method, which is specifically described below with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of a method for updating balance data of a platform merchant in real time according to an embodiment of the invention is shown, and the method includes the following steps:
and S001, collecting platform merchant balance data.
And acquiring data through an API interface to obtain platform merchant balance data, wherein the platform merchant balance data comprises merchant codes, merchant names and balances.
And step S002, counting the frequency of characters in the balance data of the platform commercial tenant, obtaining a corresponding dictionary, and encoding the balance data of the platform commercial tenant to obtain encoded data, thereby further obtaining the sequence stability of the characters.
The BWT coding algorithm performs permutation coding on characters in the data according to the character sequence in the dictionary, and characters with similar distances in the dictionary are similar after coding, but cannot be completely coded according to the character sequence in the dictionary, and the coding result is only close to the character sequence in the dictionary as much as possible, so that after coding by using the BWT algorithm, the relative positions of the characters are not easy to change, and the stability of the characters is stronger.
In addition, in the data encryption process, the more stable the character meeting the character sequence in the dictionary is, the more stable character is used as a key to encrypt the data, so that the dependency relationship between the key and the plaintext data can be enhanced, and the key can be better protected only by increasing the difference between the ciphertext and the plaintext in the subsequent encryption process;
in this embodiment, the stability is referred to as endian stability.
The specific acquisition method of the character sequence stability is as follows:
firstly, counting the types of characters contained in platform merchant balance data and the frequencies of the characters of each type in the platform merchant balance data, sequencing the characters of each type according to the sequence from small to large, and taking the sequence corresponding to the sequenced characters as a dictionary;
any one character in the dictionary is present in the first encoded data.
Then, carrying out coding processing on the platform merchant balance data by using a BWT coding algorithm, and recording the coded data as first coded data; combining the characters of different classes in pairs without considering the combination sequence;
for example: the character a and the character b are arranged, and the corresponding character combination ab and ba are the same combination;
the combination formed by one character and other characters in the dictionary is marked as a first combination; the combination formed by any type of characters and other types of characters in the first coded data is recorded as a second combination, and a plurality of second combinations correspond to one character; the number of a plurality of second combinations corresponding to any character in the first coded data is recorded as the number of the second combinations of the characters
Secondly, the frequency of occurrence of each category of characters in the first coded data is obtained and is recorded as the frequency of the characters; acquiring sequence numbers of all characters in the dictionary, and recording absolute values of sequence number difference values between any character and other characters in the dictionary as character distances, wherein two characters in the first combination correspond to one character distance, namely one first combination corresponds to one character distance;
the size relation of the character distance between any two first combinations is recorded as a character distance condition; the character distance size relation between any two second combinations in the first coded data is recorded as a character distance relation; acquiring character distance relations between any two second combinations in all second combinations corresponding to any characters in the first coded data, and recording the corresponding number of the second combinations as the conditional number of the characters corresponding to the second combinations when the character distance conditions between the two first combinations corresponding to the dictionary are the same
Finally, according to the condition number and the second combination number of each character in the first coded data, the sequence stability of each character in the first coded data is obtained, and the specific calculation method is as follows:
wherein,represent the firstSequence stability of class characters;represent the firstFrequency of class characters;represent the firstClass character in BWT codingThe conditional number of individual characters;represent the firstA second combined number of class characters;
the sequence stability of the characters is reflected in the sequence change degree of the balance data of the platform merchant in the BWT coding process, the sequence stability value of the characters is larger, the sequence change degree of the characters is smaller, namely the stability of the characters is stronger.
It should be noted that, the BWT coding algorithm is the prior art, and in this embodiment, the description is not repeated.
To this end, the order stability of each type of character in the first encoded data is obtained.
And step S003, performing MTF coding processing on the first coded data to obtain second coded data, obtaining frequency stability of the characters according to the second coded data, obtaining a key according to the frequency stability, and encrypting balance data of the platform commercial tenant.
The MTF coding algorithm moves the character with the higher frequency of occurrence to the front of the coded list in the coded data, while the corresponding code value is smaller, and each character is replaced by its position index in the already coded character string in the MTF coding process.
If the frequency between adjacent characters is similar in the balance data of the platform commercial tenant, the adjacent probability of the corresponding character in the second coded data after MTF coding is larger; in addition, the frequency of characters in the balance data of the platform merchant is similar, but the distance in sequence in the second coded data is larger, so that the adjacent probability in the second coded data is smaller; the frequency coding condition of the character in the MTF coding process is called frequency stability;
in addition, the characters with larger sequence stability of the characters are used as the characters in the secret key, so that the dependency relationship between the plaintext and the secret key can be enhanced, and meanwhile, the characters with larger frequency stability are combined to be used as the secret key, so that the difference between the ciphertext and the plaintext can be increased, and the safety of encrypted data is improved.
It should be noted that, the MTF coding algorithm is in the prior art, and is not described in detail in this example.
And (1) processing the first coded data by using an MTF coding algorithm to obtain second coded data, and further obtaining the coding distance of the character.
First, a sequence formed according to the sequence of each character in a dictionary is used as an initial list of an MTF coding algorithm, the initial list is combined with the MTF coding algorithm to code first coded data, and the coded data is recorded as second coded data.
It should be noted that, the second encoded data is a sequence formed by a plurality of digits, each digit is used as an index to correspond to a character in the first encoded data, and the digits in the second encoded data are recorded as the encoded values of the corresponding characters, so that any type of character in the first encoded data corresponds to a plurality of encoded values.
Then, the frequencies of all the code values corresponding to the second code data of all the characters are obtained and recorded as code frequencies; when the coding frequency is maximum, the corresponding coding value is marked as a representative coding of the character;
secondly, obtaining absolute values of differences representing codes between any type of characters and all other characters, and recording the absolute values as first differences, wherein the any type of characters correspond to a plurality of first differences; the sum of all the first differences corresponding to any character is recorded as a representative coding difference of the character, and any character corresponds to one representative coding difference;
and finally, sorting the characters of all categories according to the order from small to large according to the size of the representative coding difference, marking the sequence obtained by sorting as a character coding sequence, and marking the absolute value of the difference value of the serial numbers of any two characters in the character coding sequence as the coding distance between the two characters.
The MTF coding algorithm can utilize statistical information of each symbol in the coded data to endow the frequently-occurring symbol with a smaller coding value, so that the frequency of characters with similar values of the coding value in the obtained second coded data is generally similar in the data before coding, characters meeting the sequence stability and the frequency stability are utilized as keys to encrypt the balance data of the platform commercial tenant, the difference between the encrypted data and the commercial tenant data is larger, and the encryption security is improved.
And (2) dividing various characters into a plurality of character groups, and obtaining a second character group according to the sequence stability of the characters.
Firstly, acquiring a corresponding frequency distribution histogram according to the frequency of each type of characters in the balance data of a platform merchant, dividing the characters with similar frequencies into a group by using an OTSU threshold segmentation algorithm, and marking the group as a first frequency character group to acquire a plurality of first frequency character groups;
and then, deleting the characters with the sequence stability smaller than 0.7 in the first frequency character group according to the rule of thumb preset sequence stability threshold value of 0.7 to obtain a second frequency character group, and obtaining a plurality of second frequency character groups.
The frequency distribution histogram is formed by frequencies corresponding to each type of characters, the horizontal axis is each type of characters in the balance data of the platform merchant, and the vertical axis is the frequency corresponding to each type of characters.
After the characters with higher sequence stability are obtained, the characters with smaller frequency stability are obtained from the characters to be used as keys, and balance data of platform merchants are encrypted, so that the keys can be better protected, the difference between an encryption result and a plaintext is increased, and the safety of encrypted data is ensured.
And (3) obtaining the frequency distance and the coding distance of the characters according to the second character group, and obtaining the frequency stability of the characters according to the frequency distance and the coding distance.
Firstly, recording average frequencies of all characters contained in any second frequency character set in balance data of a platform merchant as representative frequencies of the second frequency character set, and obtaining representative frequencies corresponding to a plurality of second frequency character sets;
then, obtaining absolute values of differences between any one second frequency character set and representative frequencies of all other second frequency character sets, and marking the absolute values as second differences, wherein one second frequency character set corresponds to a plurality of second differences; the sum of all second differences corresponding to any second frequency character set is recorded as the representative frequency difference of the second frequency character set;
secondly, according to the magnitude of the representative frequency difference of the second frequency character sets, sequencing all the second frequency character sets according to the sequence from small to large, and marking the obtained sequence as a character set sequence;
recording the absolute value of the difference value of the serial numbers of the second frequency character group corresponding to any two characters in the character group sequence as the frequency distance between the two characters;
it should be noted that, when two characters are in the same second frequency character set, the corresponding frequency distance is 0.
In addition, since the dimensions of the frequency distance and the code distance are not uniform, the frequency distance and the code distance between all characters are normalized by using a linear normalization method according to the maximum value of the frequency distance and the maximum value of the code distance, so that the normalized frequency distance and code distance are respectively recorded as a normalized frequency distance and a normalized code distance.
Finally, according to the normalized frequency distance and the normalized coding distance, the frequency stability of any character is obtained, and the specific calculation method is as follows:
wherein,representing the first of a sequence of character setsFrequency stability of individual characters;representing the number of characters contained in the character set sequence:representing the first of a sequence of character setsThe first characterNormalized frequency distance of individual characters;representing the first of a sequence of character setsThe first characterNormalized encoding distance of individual characters;representing the super-parameters;an exponential function based on a natural constant;
it should be noted that the super parameterThe value is usually 0.01 empirically in order to avoid a denominator of 0.
And (4) marking partial characters in the character group sequence as key characters according to the size of the frequency stability, and encrypting the balance data of the platform commercial tenant according to a plurality of key character groups formed by the key characters to obtain ciphertext data.
Firstly, obtaining the frequency stability of all characters in a character group sequence, presetting a frequency stability threshold value to be 0.5 according to experience, obtaining all characters with the frequency stability smaller than the frequency stability threshold value in the character group sequence, and marking the characters as key characters;
then, key characters in each second frequency character group in the character group sequence are reserved, other characters with frequency stability larger than a frequency stability threshold value are removed, and the second frequency character groups with the characters removed are recorded as key character groups; the minimum frequency stability of characters in any key character group is recorded as the representative frequency stability of the key character group, the key character groups are ordered according to the order of the representative frequency stability from big to small, and the sequence after the key character groups are ordered is recorded as a key character group sequence;
finally, encrypting the balance data of the platform merchant by combining the first key character group with the Virginia password according to the sequence of the key character group in the key character group sequence to obtain a primary ciphertext; and then, encrypting the primary ciphertext by combining a second key character group in the key character group sequence with the Virginia password to obtain a secondary ciphertext, carrying out iterative encryption by using the advanced line, and recording the last ciphertext as ciphertext data of the balance data of the platform merchant.
And S004, transmitting the ciphertext data to realize real-time safe updating of the balance data of the platform merchant.
Firstly, taking each key character group in a key character group sequence as a key, utilizing a 5G communication network to transmit ciphertext data in real time, and sending the ciphertext data to a server side;
then, an HTTPS transmission protocol is adopted in the sending process to ensure confidentiality and integrity of data in the transmission process, ciphertext is transmitted to a server, and the identity of the server is verified through a digital certificate; meanwhile, in the ciphertext data transmission process, the identity of the platform and the merchant is ensured to be verified by utilizing a digital signature identity verification mechanism, unauthorized access is prevented, and the validity of a request source is verified;
finally, the ciphertext data is transmitted to the server by using an asynchronous communication or message queue technology, data decryption and updating operations are carried out at the server end, and in addition, subdivision management is carried out on the data access authority by an Access Control List (ACL) or role-based access control (RBAC) method, so that only people with corresponding authorities can check or modify merchant balance data.
Therefore, real-time safe updating of the balance data of the platform merchant is realized, and the safety and the integrity of the balance data of the platform merchant in the transmission process are ensured.
The following examples were usedThe model is only used for representing that the result output by the negative correlation and the constraint model is inIn the section, other models with the same purpose can be replaced in the specific implementation, and the embodiment only usesModel is taken as an exampleIs described without specific limitation, whereinRefers to the input of the model.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.

Claims (9)

1. A real-time updating processing method for platform merchant balance data is characterized by comprising the following steps:
collecting platform merchant balance data;
obtaining the frequency of various characters in the balance data of the platform commercial tenant, and obtaining a dictionary corresponding to the characters according to the frequency; encoding the balance data of the platform commercial tenant to obtain first encoded data, and obtaining the sequence stability of various characters according to the first encoded data and the dictionary;
encoding the first encoded data to obtain second encoded data, and obtaining the representative encoding difference of the characters according to the frequency maximum value of the corresponding encoding value of each character in the second encoded data; obtaining the coding distance of any two characters according to the difference between the size sequences representing the coding differences; obtaining a first frequency character set according to the frequency of various characters in the balance data of the platform merchant, and obtaining a plurality of second frequency character sets according to the size of the sequence stability and the first frequency character set; obtaining the representative frequency of the second frequency character set according to the frequency of the characters in the second frequency character set, obtaining the representative frequency difference according to the difference between the representative frequency before any second frequency character set and other second frequency character sets, and obtaining the frequency distance between any two characters according to the difference between the magnitude sequence of the representative frequency difference; obtaining the frequency stability of the character according to the difference between the coding distance and the frequency distance; according to the frequency stability, a key character set is obtained, and the balance data of the platform merchant is encrypted by using the key character set to obtain ciphertext data; when the coding frequency is maximum, the corresponding coding value is marked as a representative coding of the character; recording the average frequency of all characters contained in any second frequency character set in the balance data of the platform merchant as the representative frequency of the second frequency character set;
realizing real-time safe updating of the balance data of the platform merchant by combining the ciphertext data;
the method comprises the following specific steps of:
firstly, encoding platform merchant balance data by using a BWT encoding algorithm, and recording the encoded data as first encoded data;
then, the combination formed by one character and other characters in the dictionary is marked as a first combination; the combination formed by any type of characters and other types of characters in the first coded data is recorded as a second combination, and a plurality of second combinations correspond to one character; recording the number of a plurality of second combinations corresponding to any character in the first coded data as the number of the second combinations of the characters;
secondly, the frequency of occurrence of each category of characters in the first coded data is obtained and is recorded as the frequency of the characters; acquiring sequence numbers of all characters in the dictionary, and recording absolute values of differences of sequence numbers between any character and other characters in the dictionary as character distances, wherein two characters in a first combination correspond to one character distance, and one first combination corresponds to one character distance;
the size relation of the character distance between any two first combinations is recorded as a character distance condition; the character distance size relation between any two second combinations in the first coded data is recorded as a character distance relation; acquiring character distance relations between any two second combinations in all second combinations corresponding to any characters in the first coded data, and recording the number corresponding to the second combinations as the condition number of the characters corresponding to the second combinations when the character distance conditions between the two first combinations corresponding to the second combinations in the dictionary are the same;
finally, the specific calculation method for the sequence stability of various characters comprises the following steps:
wherein,indicate->Sequence stability of class characters; />Indicate->Frequency of class characters; />Indicate->Class character +.>The conditional number of individual characters; />Indicate->A second combined number of class characters.
2. The method for updating and processing the balance data of the platform merchant according to claim 1, wherein the step of obtaining the dictionary corresponding to the characters according to the frequency comprises the following specific steps:
counting the types of the characters contained in the platform merchant balance data and the frequencies of the characters of each type in the platform merchant balance data, sorting the characters of each type according to the sequence from small frequency to large frequency, and taking the sequence corresponding to the sorted characters as a dictionary.
3. The method for updating the balance data of the platform merchant according to claim 1, wherein the steps of encoding the first encoded data to obtain the second encoded data, and obtaining the representative encoded difference of the characters according to the frequency maximum value of the corresponding encoded value of each type of character in the second encoded data, comprise the following specific steps:
firstly, taking a sequence formed by the sequence of each character in a dictionary as an initial list of an MTF coding algorithm, coding first coded data by utilizing the initial list and combining the MTF coding algorithm, and recording the coded data as second coded data;
then, the frequencies of all the code values corresponding to the second code data of all the characters are obtained and recorded as code frequencies; when the coding frequency is maximum, the corresponding coding value is marked as a representative coding of the character;
finally, obtaining absolute values of differences representing codes between any type of characters and all other characters, and recording the absolute values as first differences, wherein the any type of characters correspond to a plurality of first differences; and marking the sum of all the first differences corresponding to any character as the representative coding difference of the character, wherein any character corresponds to one representative coding difference.
4. The method for updating and processing the balance data of the platform merchant according to claim 1, wherein the method for obtaining the coding distance of any two characters according to the difference between the sequence of the representative coding differences comprises the following specific steps:
and sorting the characters of all categories according to the order from small to large according to the size of the representative coding difference, marking the sequence obtained by sorting as a character coding sequence, and marking the absolute value of the difference value of the serial numbers of any two characters in the character coding sequence as the coding distance between the two characters.
5. The method for updating and processing the balance data of the platform merchant according to claim 1, wherein the steps of obtaining the first frequency character set according to the frequencies of the characters in the balance data of the platform merchant and obtaining a plurality of second frequency character sets according to the order stability and the first frequency character set comprise the following specific steps:
firstly, acquiring a corresponding frequency distribution histogram according to the frequency of each type of characters in the balance data of a platform merchant, dividing the characters with similar frequencies into a group by using an OTSU threshold segmentation algorithm, and marking the group as a first frequency character group to acquire a plurality of first frequency character groups;
and then, deleting the characters with the sequence stability smaller than the sequence stability threshold value in the first frequency character group according to the experience preset sequence stability threshold value to obtain a plurality of second frequency character groups.
6. The method for updating the balance data of the platform merchant according to claim 1, wherein the steps of obtaining the representative frequency of the second frequency character set according to the frequency of the characters in the second frequency character set, obtaining the representative frequency difference according to the difference between the representative frequency of any second frequency character set and the representative frequency before other second frequency character sets, and obtaining the frequency distance of any two characters according to the difference between the order of magnitude of the representative frequency difference are as follows:
firstly, recording average frequencies of all characters contained in any second frequency character set in balance data of a platform merchant as representative frequencies of the second frequency character set, and obtaining representative frequencies corresponding to a plurality of second frequency character sets;
then, obtaining absolute values of differences between any one second frequency character set and representative frequencies of all other second frequency character sets, and marking the absolute values as second differences, wherein one second frequency character set corresponds to a plurality of second differences; the sum of all second differences corresponding to any second frequency character set is recorded as the representative frequency difference of the second frequency character set;
secondly, according to the magnitude of the representative frequency difference of the second frequency character sets, sequencing all the second frequency character sets according to the sequence from small to large, and marking the obtained sequence as a character set sequence;
and finally, recording the absolute value of the difference value of the serial numbers of the second frequency character group corresponding to any two characters in the character group sequence as the frequency distance between the two characters.
7. The method for updating and processing the balance data of the platform merchant according to claim 1, wherein the frequency stability is obtained by the following steps:
firstly, obtaining the maximum value of the frequency distance and the maximum value of the coding distance, and carrying out normalization processing on the frequency distance and the coding distance between all characters by using a linear normalization method to obtain normalized frequency distance and coding distance which are respectively recorded as normalized frequency distance and normalized coding distance; wherein the maximum value comprises a maximum value and a minimum value;
finally, the specific calculation method of the frequency stability of the character comprises the following steps:
wherein,representing the +.>Frequency stability of individual characters; />Representing the number of characters contained in the character set sequence: />Representing the +.>The first character and->Normalized frequency distance of individual characters; />Representing the +.>The first character and->Normalized encoding distance of individual characters; />Representing the super-parameters; />An exponential function based on a natural constant is represented.
8. The method for updating the balance data of the platform merchant in real time according to claim 1, wherein the step of obtaining the key character set according to the frequency stability, encrypting the balance data of the platform merchant by using the key character set to obtain ciphertext data comprises the following specific steps:
firstly, obtaining frequency stability of all characters in a character group sequence, presetting a frequency stability threshold according to experience, obtaining characters with frequency stability smaller than the frequency stability threshold in the character group sequence, and recording the characters as key characters;
then, key characters in each second frequency character group in the character group sequence are reserved, other characters with frequency stability larger than a frequency stability threshold value are removed, and the second frequency character groups with the characters removed are recorded as key character groups; the minimum frequency stability of characters in any key character group is recorded as the representative frequency stability of the key character group, the key character groups are ordered according to the order of the representative frequency stability from big to small, and the sequence after the key character groups are ordered is recorded as a key character group sequence;
finally, encrypting the balance data of the platform merchant by combining the first key character group with the Virginia password according to the sequence of the key character group in the key character group sequence to obtain a primary ciphertext; and then, encrypting the primary ciphertext by combining a second key character group in the key character group sequence with the Virginia password to obtain a secondary ciphertext, carrying out iterative encryption by using the advanced line, and recording the last ciphertext as ciphertext data of the balance data of the platform merchant.
9. The method for real-time updating the balance data of the platform merchant according to claim 1, wherein the method for realizing the real-time safe updating of the balance data of the platform merchant by combining the ciphertext data comprises the following specific steps:
and taking all key character groups in the key character group sequence as keys, utilizing a 5G communication network, adopting an HTTPS transmission protocol, utilizing an asynchronous communication or message queue technology to transmit ciphertext data in real time, sending the ciphertext data to a server, and utilizing the keys to perform data decryption and updating operation at the server.
CN202311006490.1A 2023-08-11 2023-08-11 Platform merchant balance data real-time updating processing method Active CN116737741B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311006490.1A CN116737741B (en) 2023-08-11 2023-08-11 Platform merchant balance data real-time updating processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311006490.1A CN116737741B (en) 2023-08-11 2023-08-11 Platform merchant balance data real-time updating processing method

Publications (2)

Publication Number Publication Date
CN116737741A CN116737741A (en) 2023-09-12
CN116737741B true CN116737741B (en) 2023-11-07

Family

ID=87917168

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311006490.1A Active CN116737741B (en) 2023-08-11 2023-08-11 Platform merchant balance data real-time updating processing method

Country Status (1)

Country Link
CN (1) CN116737741B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100087437A (en) * 2009-01-28 2010-08-05 한국과학기술원 Method, apparatus and computer-readable recording medium for operating compression and encryption of data
CN112564716A (en) * 2020-08-05 2021-03-26 新疆大学 PC-SCMA system joint decoding method based on pruning iteration
CN116015312A (en) * 2023-03-28 2023-04-25 山东奔虎智能科技有限公司 Gas alarm system data storage method based on Internet of things platform
CN116192971A (en) * 2023-04-24 2023-05-30 江阴市华明电力发展集团有限公司 Intelligent cloud energy operation and maintenance service platform data management method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5895545B2 (en) * 2012-01-17 2016-03-30 富士通株式会社 Program, compressed file generation method, compression code expansion method, information processing apparatus, and recording medium
FR3003422B1 (en) * 2013-03-15 2016-12-09 Send Only Oked Documents (Sood) METHOD FOR TATOTING THE TEXTUAL PART OF A DOCUMENT
DE102017130591B4 (en) * 2016-12-20 2022-05-25 Hyperstone Gmbh Method and device for error correction coding based on data compression

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100087437A (en) * 2009-01-28 2010-08-05 한국과학기술원 Method, apparatus and computer-readable recording medium for operating compression and encryption of data
CN112564716A (en) * 2020-08-05 2021-03-26 新疆大学 PC-SCMA system joint decoding method based on pruning iteration
CN116015312A (en) * 2023-03-28 2023-04-25 山东奔虎智能科技有限公司 Gas alarm system data storage method based on Internet of things platform
CN116192971A (en) * 2023-04-24 2023-05-30 江阴市华明电力发展集团有限公司 Intelligent cloud energy operation and maintenance service platform data management method

Also Published As

Publication number Publication date
CN116737741A (en) 2023-09-12

Similar Documents

Publication Publication Date Title
Quantin et al. Automatic record hash coding and linkage for epidemiological follow-up data confidentiality
CN105471575A (en) Information encryption, decryption method and device
US20220130282A1 (en) Method, apparatus, and computer-readable medium for format preserving encryption of a numerical value
CN113255007B (en) Safe hidden three-factor query method
CN116582263B (en) Security protection system for enterprise digital management platform
CN115426101B (en) Data transmission method of cloud intercommunication platform
CN110210270A (en) Two-dimensional barcode information safety encryption and system and image in 2 D code analytic method and system
CN115865431A (en) Network security sharing method for private data
CN115296862A (en) Network data secure transmission method based on data coding
CN115150201A (en) Remote encryption transmission method for cloud computing data
Sari et al. Cryptography Triple Data Encryption Standard (3DES) for Digital Image Security
CN108696508A (en) System and method based on CN39 code authentication resident identification card numbers
CN116737741B (en) Platform merchant balance data real-time updating processing method
US20020136400A1 (en) R-conversion encryption method and system
CN117195274A (en) Format file anti-fake method and system
CN116861485A (en) Student information privacy protection method based on deep learning fusion
KR101045222B1 (en) Method of encrypting and synthesizing personal information into order information and contents information, apparatus, server and recording media
CN114422230B (en) Information transmission system based on data encryption
CN106357662B (en) A kind of data ciphering method based on MAC Address
Abiega-L’Eglisse et al. A new fuzzy vault based biometric system robust to brute-force attack
Qader et al. A new algorithm for implementing message authentication and integrity in software implementations
CN111769943A (en) Data security protection method based on particlization
Libed et al. Enhancing MD5 Collision Susceptibility
CN116707803B (en) Private data crushing method based on data encryption
CN117955736B (en) Network large-scale data security storage method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant