CN112434231A - Data processing method and device and electronic equipment - Google Patents

Data processing method and device and electronic equipment Download PDF

Info

Publication number
CN112434231A
CN112434231A CN202011224438.XA CN202011224438A CN112434231A CN 112434231 A CN112434231 A CN 112434231A CN 202011224438 A CN202011224438 A CN 202011224438A CN 112434231 A CN112434231 A CN 112434231A
Authority
CN
China
Prior art keywords
mapping
sub
mapping relation
character string
string
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.)
Granted
Application number
CN202011224438.XA
Other languages
Chinese (zh)
Other versions
CN112434231B (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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202011224438.XA priority Critical patent/CN112434231B/en
Publication of CN112434231A publication Critical patent/CN112434231A/en
Application granted granted Critical
Publication of CN112434231B publication Critical patent/CN112434231B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention provides a data processing method, a data processing device and electronic equipment, wherein the method comprises the following steps: according to the attribute characteristics, acquiring a sub-character string combination in the character string, wherein the sub-character string combination comprises: a first sub-string combination conforming to the first attribute characteristic and/or a second sub-string combination conforming to the second attribute characteristic; acquiring a first mapping relation and/or a second mapping relation; according to the first mapping relation, carrying out mapping replacement on the first sub-character string combination, and/or according to a second mapping relation, carrying out mapping replacement on the second sub-character string combination to form a target character string; and sending the target character string. By the scheme, data security can be improved, and data transmission quantity can be reduced.

Description

Data processing method and device and electronic equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data processing method and apparatus, and an electronic device.
Background
At present, in order to facilitate development and debugging of a request parameter on an interface address and a Uniform Resource Locator (URL) for plaintext transmission, some people who know network knowledge can directly see the request parameter, so that the request parameter may be cracked, and operations such as interface simulation, injection attack and the like are performed. Meanwhile, a large and complicated interface needs a large number of parameters, when the interface in a GET mode of requesting the specified resource for data is completely spliced on the URL, the link is too long to trigger the truncation of some intermediate links, and the POST method of submitting the data to be processed to the specified resource is put into the body of the main body, so that the truncation can be avoided, but the data volume is not changed as a whole.
At present, the encryption problem is mainly solved by using a hypertext Transfer Protocol over Secure Socket Layer (HTTPS), although an encryption processing method of a Secure Socket Layer (SSL) or a Secure Transport Layer (TLS) is provided, man-in-the-middle attack can be avoided to a certain extent, but if a client actively trusts a certificate issued by an agent, a request URL of a plaintext can be seen on the agent. While the credit chain system of SSL certificates is not secure. Man-in-the-middle attacks are equally feasible, especially if the root Certificate of the Certificate Authority (CA) can be controlled. Furthermore, HTTPS requires additional computational resource consumption because of the need for encryption and decryption.
In addition, the conventional common compression algorithms for data compression include: the Huffman, the list compression method (Lempel Ziv Welch, LZW), the general algorithm LZ77 of sequential data compression and the like have different limits, the Huffman needs a list to realize, the cost is high, the compression effect is not certain when the arrangement conditions of the compressed objects are different in other algorithms, and the URL of the HTTPS protocol is not utilized to compress the URL.
Therefore, in the prior art, the data encryption method such as the interface address causes low security and loss of computing resources.
Disclosure of Invention
Embodiments of the present invention provide a data processing method, an apparatus, and an electronic device, so as to improve data security to a certain extent and reduce data transmission amount. The specific technical scheme is as follows:
in a first aspect of the present invention, there is provided a data processing method applied to a terminal, including:
according to the attribute characteristics, acquiring a sub-character string combination in the character string, wherein the sub-character string combination comprises: a first sub-string combination conforming to the first attribute characteristic and/or a second sub-string combination conforming to the second attribute characteristic;
acquiring a first mapping relation and/or a second mapping relation;
according to the first mapping relation, carrying out mapping replacement on the first sub-character string combination, and/or according to a second mapping relation, carrying out mapping replacement on the second sub-character string combination to form a target character string;
and sending the target character string.
In a second aspect of the present invention, there is also provided a data processing method applied to a first server, including:
acquiring historical data of the uniform resource locator URL at intervals of a second preset duration;
generating a first mapping relation and/or a second mapping relation according to the historical data;
and sending the first mapping relation and/or the second mapping relation to a terminal.
In a third aspect of the present invention, there is further provided a data processing method applied to a second server, including:
receiving a target character string sent by a terminal;
acquiring a first mapping relation and/or a second mapping relation;
and decompressing the target character string according to the first mapping relation and/or the second mapping relation to obtain a sub-character string combination of at least one attribute characteristic.
In a fourth aspect of the present invention, there is also provided a data processing apparatus, applied to a terminal, including:
a first obtaining module, configured to obtain, according to the attribute feature, a sub-string combination in the string, where the sub-string combination includes: a first sub-string combination conforming to the first attribute characteristic and/or a second sub-string combination conforming to the second attribute characteristic;
the second obtaining module is used for obtaining the first mapping relation and/or the second mapping relation;
the first replacing module is used for carrying out mapping replacement on the first sub-character string combination according to the first mapping relation and/or carrying out mapping replacement on the second sub-character string combination according to the second mapping relation to form a target character string;
and the first sending module is used for sending the target character string.
In a fifth aspect of the present invention, there is also provided a data processing apparatus applied to a first server, including:
the third acquisition module is used for acquiring the historical data of the uniform resource locator URL every second preset time interval;
the first generation module is used for generating a first mapping relation and/or a second mapping relation according to the historical data;
and the second sending module is used for sending the first mapping relation and/or the second mapping relation to the terminal.
In a sixth aspect of the present invention, there is also provided a data processing apparatus applied to a second server, including:
the first receiving module is used for receiving a target character string sent by a terminal;
the fourth obtaining module is used for obtaining the first mapping relation and/or the second mapping relation;
and the processing module is used for decompressing the target character string according to the first mapping relation and/or the second mapping relation to obtain a sub-character string combination with at least one attribute characteristic.
In a seventh aspect of the embodiments of the present invention, there is further provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the data processing method when executing the program stored in the memory.
In an eighth aspect implemented by the present invention, there is also provided a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to execute any of the data processing methods described above.
In a ninth aspect implemented by the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the data processing methods described above.
According to the data processing method provided by the embodiment of the invention, the terminal acquires the sub-character string combination in the character string according to the attribute characteristics and acquires the first mapping relation and/or the second mapping relation, the terminal can map and replace the first sub-character string combination according to the first mapping relation, and/or the terminal can map and replace the second sub-character string combination according to the second mapping relation so as to form the target character string, and the purpose is to compress the first sub-character string combination and/or the second sub-character string combination according to the corresponding mapping relation, so that not only can the data security be improved, but also the transmission of the data volume can be reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
FIG. 1 is a flowchart illustrating steps of a data processing method according to an embodiment of the present invention;
FIG. 2 is a second flowchart illustrating steps of a data processing method according to an embodiment of the present invention;
FIG. 3 is a third flowchart illustrating steps of a data processing method according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a data processing method according to an embodiment of the present invention;
FIG. 5 is a block diagram of a data processing apparatus according to an embodiment of the present invention;
FIG. 6 is a second block diagram of a data processing apparatus according to an embodiment of the present invention;
FIG. 7 is a third block diagram of a data processing apparatus according to an embodiment of the present invention;
fig. 8 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a data processing method applied to a terminal, including:
step 101, obtaining a sub-string combination in a string according to attribute characteristics, wherein the sub-string combination comprises: a first sub-string combination conforming to the first attribute characteristic and/or a second sub-string combination conforming to the second attribute characteristic.
Specifically, in step 101, the character string may include: a substring that conforms to the first attribute characteristic, and/or a substring that conforms to the second attribute characteristic, and so on. The terminal may obtain, according to the first attribute feature, a first sub-string combination of sub-strings in the string that meet the first attribute feature, the terminal may also obtain, according to the second attribute feature, a second sub-string combination of sub-strings in the string that meet the second attribute feature, and so on.
The character string can be a URL interface address, the first attribute feature can be the attribute feature of the parameter key, and the first sub-character string is combined into a combined key of a plurality of parameter keys; the second attribute feature may be an attribute feature of a parameter value, and the second sub-string is combined into a combined value of a plurality of parameter values, where the string, the first attribute feature, and the second attribute feature are not specifically limited herein.
Optionally, if the character string is a URL interface address, all the parameter keys may be sorted according to the first order to obtain a first sub-character string combination (i.e., keys); sequencing all the parameter values to obtain a second sub-character string combination (namely values); then, all the sorted parameter keys and all the sorted parameter values can be classified and combined, after combination, all the parameter keys are in one combination, and all the parameter values are in one combination.
Since the parameter keys are finite and fixed, the arrangement of all the keys is only a finite number of ways or a unique way, and only one first mapping relationship may be used for replacement, which is not specifically limited herein.
It should be noted that the first order may be the order of keys according to the size of the first character, or if the size order of the first characters is the same, the prefix with a shorter prefix may be arranged in the front. The above first order manner is only an example, and the specific manner of the first order may be set as required, and is not specifically limited herein.
Specifically, the sub-string combinations in the string obtained according to the attribute characteristics include a first sub-string combination and a second sub-string combination; if the character string can be a URL interface address, there are 95 displayable characters, there are 14 unsafe characters, 7 reserved characters, and 74 characters available in the rule of HTTP URL, so the first mapping relation and/or the second mapping relation can use 74-ary. The character string of the interface URL has a fixed format of key1 value1& key2 value2& key3 value3, and after the sorted keys are obtained, the value corresponding to each key may be sorted correspondingly. For example: if the keys after sorting are as follows in sequence: key1, key3, and key2, the values after sorting are in turn: value1, value3, value2, i.e. after sorting: key1 value1& key3 value3& key2 value 2.
Step 102, obtaining a first mapping relation and/or a second mapping relation.
Specifically, in step 102, the terminal obtains a first mapping relation related to a first sub-string combination, and/or the terminal obtains a second mapping relation related to a second sub-string combination. The first mapping relation can carry version identifiers corresponding to the first mapping relation, and each first mapping relation has different version identifiers, so that the corresponding first mapping relation can be quickly known through the version identifiers under the condition that the first mapping relation is updated subsequently or the first mapping relation has a plurality of versions, and the correctness and the safety of the terminal for acquiring the first mapping relation are improved. The second mapping relationship may carry version identifiers corresponding to the first mapping relationship, and each second mapping relationship has a different version identifier, so that the corresponding second mapping relationship is quickly known through the version identifiers under the condition that the second mapping relationship is subsequently updated or the second mapping relationships are multiple, and the correctness and the safety of the terminal for obtaining the second mapping relationship are improved.
And 103, carrying out mapping replacement on the first sub-character string combination according to the first mapping relation, and/or carrying out mapping replacement on the second sub-character string combination according to the second mapping relation to form a target character string.
Specifically, in step 103, when the terminal acquires the first mapping relationship, the terminal may map and replace the first sub-string combination according to the first mapping relationship to form the target string. And the terminal can map and replace the second sub-character string combination according to the second mapping relation under the condition of acquiring the second mapping relation so as to form the target character string. The terminal can map and replace the first sub-string combination according to the first mapping relation under the condition of obtaining the first mapping relation and the second mapping relation, and map and replace the second sub-string combination according to the second mapping relation to form a target string, so that the compression effect can be achieved, HTTPS can not be used any more, and the data compression can reduce the transmission of data quantity, save cost and improve efficiency.
And 104, transmitting the target character string.
In step 104, in the case that the terminal forms the target character string, the terminal transmits the target character string to the second server so that the second server can decompress the target character string.
In the above embodiment of the present invention, the terminal obtains the sub-string combination in the string according to the attribute characteristics, and obtains the first mapping relationship and/or the second mapping relationship, and the terminal may map and replace the first sub-string combination according to the first mapping relationship, and/or the terminal may map and replace the second sub-string combination according to the second mapping relationship, so as to form the target string, and the purpose is to compress the first sub-string combination and/or the second sub-string combination according to the corresponding mapping relationship, which not only can improve data security, but also can reduce transmission of data amount.
Optionally, the step of obtaining the first mapping relationship and/or the second mapping relationship in step 102 may specifically include:
sending request information for acquiring a first mapping relation and/or a second mapping relation to a first server every a first preset time interval;
and receiving the first mapping relation and/or the second mapping relation sent by the first server.
Specifically, the terminal sends request information to the first server every first preset time interval, and requests the first server to acquire the first mapping relationship and/or the second mapping relationship, that is, the terminal requests the first server to send the first mapping relationship related to the first sub-string combination and/or the second mapping relationship related to the second sub-string combination, so that the terminal can use the first mapping relationship and/or the second mapping relationship for mapping and replacing to form the target string. After receiving the request information, the first server sends a first mapping relation and/or a second mapping relation required by the terminal to the terminal according to the request information, and receives the first mapping relation and/or the second mapping relation sent by the first server.
It should be noted that the first preset time period is a preset period time for the terminal to update the first mapping relationship and/or the second mapping relationship, and may be set as needed.
Optionally, in the step 103 of performing mapping replacement on the first sub-string combination according to the first mapping relationship, the priority of mapping replacement is positively correlated with the length of the sub-string in the first sub-string combination in the first mapping relationship.
Specifically, in the process of performing mapping replacement on the first sub-character string combination according to the first mapping relationship, the terminal may perform mapping replacement on the longest sub-character string in the first sub-character string combination, perform mapping replacement on the longest sub-character string in the first sub-character string combination that is not subjected to mapping replacement, and so on until all sub-character strings in the first sub-character string combination are mapped and replaced according to the first mapping relationship. In other words, the longer the length of the substring in the first substring combination, the higher the priority of the mapping replacement, and the efficiency of the mapping replacement can be maximized, thereby maximizing the compression efficiency.
Optionally, in the step 103 of performing mapping replacement on the second sub-string combination according to the second mapping relationship, the priority of mapping replacement is positively correlated with the length of the sub-string in the second sub-string combination in the second mapping relationship.
Specifically, in the process of performing mapping replacement on the second sub-character string combination according to the second mapping relationship, the terminal may perform mapping replacement on the longest sub-character string in the second sub-character string combination, perform mapping replacement on the longest sub-character string in the second sub-character string combination that is not subjected to mapping replacement, and so on until all sub-character strings in the second sub-character string combination are mapped and replaced according to the second mapping relationship. In other words, the longer the length of the substring in the second substring combination, the higher the priority of the mapping replacement, and the efficiency of the mapping replacement can be maximized, thereby maximizing the compression efficiency.
Optionally, in the step 103, mapping and replacing the first sub-string combination according to the first mapping relationship to form the target string, which may specifically include:
and carrying out mapping replacement on the first sub-character string combination according to the first mapping relation, and adding a first identifier between adjacent sub-character strings after the mapping replacement to form a target character string.
Specifically, the terminal may perform mapping replacement on each sub-character string in the first sub-character string combination according to the first mapping relationship, and may add the first identifier between every two adjacent sub-character strings after the mapping replacement, so as to form a target character string after the mapping replacement, so as to avoid identification collision of different sub-character strings in the sub-character string combination after the mapping replacement.
Optionally, in step 103, mapping and replacing the second sub-string combination according to a second mapping relationship to form a target string, which may specifically include:
and carrying out mapping replacement on the second sub-character string combination according to the second mapping relation, and adding a second identifier between adjacent sub-character strings after the mapping replacement to form a target character string.
Specifically, the terminal may perform mapping replacement on each sub-character string in the second sub-character string combination according to the second mapping relationship, and in order to avoid recognition collision of different sub-character strings in the mapped sub-character string combination, a second identifier may be added between every two adjacent sub-character strings after the mapping replacement, so as to form a target character string after the mapping replacement.
Further, if an original value before mapping of a sub-string in the first sub-string combination does not exist in the first mapping relationship, a third identifier may be added to the original value as a value after mapping replacement. If the original value before mapping the sub-string in the second sub-string combination does not exist in the second mapping relationship, a fourth identifier may be added on the basis of the original value as a value after mapping replacement.
Optionally, a signature may be added to the target character string to obtain a target character string including the signature, that is, an additional agreed identifier is signed by using an information Digest Algorithm (MD 5), so that the server may verify the signature, decompress the target character string after the verification is successful to obtain an original value after decompression, that is, obtain a sub-character string combination of at least one attribute characteristic, and prevent an error in a decoding process of a simulated link of another person.
The above scheme is explained in detail by a specific embodiment as follows:
firstly, the character string is a URL interface address, all the parameter keys can be sequenced according to a first sequence, and a first sub-character string combination (namely keys) is obtained; sequencing all the parameter values to obtain a second sub-character string combination (namely values); all the sorted parameter keys and all the sorted parameter values can then be classified and combined, all the parameter keys after combination are one combination, all the parameter values are one combination, and the two combinations can be separated by a fifth identifier (such as ═ c).
For example: the character string is: http: change 1.0.1& device 1100110& os iphone, i.e. key1 is change and value1 is 1.0.1; key2 is device, value2 is 1100110; key3 is os and value3 is iphone. If the first order is: keys are sorted according to the size sequence of the first character, or if the size sequence of the first character is the same and the prefix is shorter and can be arranged in the front, the sorted character string is: http:// xxx. community & os & version 1100110& iphone & 1.0.1. Wherein the first substring combination is: device & os & version, said second substring being combined as: 1100110& iphone & 1.0.1.
And then, the terminal sends request information for acquiring the first mapping relation and the second mapping relation to the first server every interval of a first preset duration, and then receives the first mapping relation and the second mapping relation sent by the first server. And obtaining a value corresponding to each key in the first sub-string combination according to the first mapping relation, and obtaining a value corresponding to each value in the second sub-string combination according to the second mapping relation.
For example: the table for the first mapping relationship for keys is shown in table 1 below:
TABLE 1 first mapping relation Table
Substring of key Value corresponding to key
device&os 1
os&version 2
device&os&version 3
Wherein, the value corresponding to the sub-string device & os is 1, the value corresponding to the sub-string os & version is 2, and the value corresponding to the sub-string device & os & version is 3; since the first sub-string combination is device & os & version, the first sub-string combination device & os & version may be replaced with 3, i.e., the value after the mapping replacement is 3.
The table for the second mapping of value is shown in table 2 below:
TABLE 2 second mapping relation Table
Substring of value Value corresponding to value
iphone 0
1.0.1 1
ad 2
110 3
&iphone 4
&1.0.1 5
110& 6
iphone&1.0.1 7
&iphone&1.0.1 8
Wherein the value corresponding to the substring iphone is 0, the value corresponding to the substring 1.0.1 is 1, and the value corresponding to the substring ad is 2; the value corresponding to the substring 110 is 3, the value corresponding to the substring & iphone is 4, the value corresponding to the substring &1.0.1 is 5, the value corresponding to the substring 110& corresponds is 6, the value corresponding to the substring iphone &1.0.1 is 7, and the value corresponding to the substring & iphone &1.0.1 is 8. Firstly, the longest substring is matched, namely, mapping substitution is carried out on the iphone &1.0.1, the corresponding value after the mapping substitution is 8, the mapping substitution can be separated by "═ and the target string after the mapping substitution is http:// xxx.com3 ═ 1100110 ═ 8. And then mapping and replacing the remaining substrings, wherein the longest character in the remaining substrings is 110, and the longest character in the remaining substrings is 110, 0, and 110 after segmentation, wherein the value corresponding to 110 after replacement is 3, and 0 has no corresponding value in the second mapping relation table, a fourth identifier (e.g., "═") may be added to the left side of 0, and the obtained mapping value is: the value of 3-0-3-8.
If the mapping value obtained according to the first mapping relation is 3, the mapping value obtained according to the second mapping relation is: if 3 is equal to 0 and 3 is equal to 8, the target character string after the mapping replacement is: http:// xxx.com3 ═ 0 ═ 3 ═ 8.
It should be noted that the execution sequence is only an example, and is not limited specifically, and the keys and the values may be separated first, then the keys are sorted according to the first sequence, and then the values are sorted according to the sorted keys.
In summary, the terminal sends request information for acquiring the first mapping relationship and/or the second mapping relationship to the server, and after receiving the first mapping relationship and/or the second mapping relationship sent by the server, performs mapping replacement on the first sub-string combination according to the first mapping relationship, and/or performs mapping replacement on the second sub-string combination according to the second mapping relationship to form a target string, which not only can improve interface security, but also can reduce transmission of data amount; and then, the signature can be added to the target character string, and the target character string containing the signature can be obtained, so that the encryption is carried out on the basis of mapping and replacing the character string, and the interface safety is further improved.
As shown in fig. 2, an embodiment of the present invention further provides a data processing method applied to a first server, including:
step 201, acquiring historical data of the uniform resource locator URL every second preset time interval.
Specifically, in step 201, the first server acquires the history data of the URL every second preset time interval, where the history data is the data transmission history of the terminal.
It should be noted that the second preset time period is a preset cycle time for the first server to update the history data of the URL, and may be set as needed.
Step 202, generating a first mapping relation and/or a second mapping relation according to the historical data.
Specifically, in step 202, the first server generates a first mapping relationship regarding the first sub-string combination and/or a second mapping relationship regarding the second sub-string combination according to the history data.
Step 203, sending the first mapping relation and/or the second mapping relation to a terminal.
The first server sends the generated first mapping relation and/or second mapping relation to the terminal, so that the terminal can perform mapping replacement on the sub-character string combination according to the first mapping relation and/or second mapping relation to form the target character string.
In the above embodiment of the present invention, the first server may generate the first mapping relationship and/or the second mapping relationship according to the historical data, and send the first mapping relationship and/or the second mapping relationship to the terminal, so that the terminal may perform mapping replacement on the sub-character string combination according to the first mapping relationship and/or the second mapping relationship to form the target character string, which may improve the efficiency of mapping replacement, and the target character string formed after mapping replacement may reduce transmission of data amount.
Optionally, in the step 202, generating a first mapping relationship and/or a second mapping relationship according to the historical data may specifically include:
counting the hit rate of the substrings in the historical data, and acquiring the substrings with the hit rate meeting preset conditions;
generating a first mapping relation according to the substrings of which the hit rate meets a preset condition and meets the first attribute characteristic; and/or
And generating a second mapping relation according to the substrings of which the hit rate meets the preset condition and meets the second attribute characteristic.
Specifically, the first server counts the hit rate or word frequency of each substring in the historical data, and generates a first mapping relation according to the substrings meeting the first attribute characteristics in all the substrings meeting the preset conditions; and similarly, generating a second mapping relation according to the substrings meeting the second attribute characteristics in all the substrings meeting the preset conditions.
The character string can be a URL interface address, the first attribute feature can be the attribute feature of the parameter key, and the first sub-character string is combined into a combined key of a plurality of parameter keys; the second attribute feature may be an attribute feature of a parameter value, and the second sub-string is combined into a combined value of a plurality of parameter values, where the string, the first attribute feature, and the second attribute feature are not specifically limited herein.
Optionally, if the character string is a URL interface address, since the parameter keys are limited and fixed, the arrangement of all the keys is only limited in several ways or only one way, and only one first mapping relationship may be used for replacement, which is not specifically limited herein.
Optionally, after the first server obtains the value in the historical data, because the value has a lot of personalized data, which cannot be completely mapped, but is not a plain text mapping, and because the service also has a lot of specific high-frequency words, such as device models, version numbers, regions, and the like, the first server may first perform word segmentation from length 3 to the full length of the value (because the mapped value is at least one bit of identifier plus a connector, that is, the length is 2, there is no compression effect after the original length is 2 is mapped), that is, perform sub-string segmentation from length 3 to the full length, perform statistics on the historical data after the segmentation, and perform statistics on the hit rate of the segmented value, that is, perform statistics on the hit rate of each sub-string after the segmentation; and adding the value substring with the hit rate meeting the preset condition into the second mapping relation.
The preset condition may be all value substrings whose hit rate reaches a threshold, and the threshold may be set according to a service requirement, which is not specifically limited herein.
It should be noted that, different from the compression of a general substring, since a service relationship value has a certain high-frequency word, if the high-frequency word is placed on the same side and connected to other high-frequency words, a longer high-frequency word can be formed than a fixed connection, so that the compression effect is better, and the high-frequency word is mapped to form a second mapping relationship.
Optionally, the sending the first mapping relationship and/or the second mapping relationship to the terminal includes:
receiving request information for acquiring a first mapping relation and/or a second mapping relation sent by the terminal;
and sending the first mapping relation and/or the second mapping relation which is generated latest to the terminal according to the request information.
Specifically, the first server receives request information for acquiring a first mapping relationship and/or a second mapping relationship sent by the terminal, and sends the first mapping relationship and/or the second mapping relationship which is newly generated to the terminal, wherein the first mapping relationship may carry version identifiers corresponding to the first mapping relationship, and the version identifiers corresponding to the first mapping relationship need to be updated simultaneously while the first mapping relationship is updated, so that the server can distinguish the first mapping relationship corresponding to each version identifier, and accuracy and safety of acquiring the first mapping relationship by the terminal are improved. The second mapping relationship may carry the version identifier corresponding to the first mapping relationship, and the version identifier corresponding to the second mapping relationship needs to be updated simultaneously while the second mapping relationship is updated, so that the server may distinguish the second mapping relationship corresponding to each version identifier, and accuracy and safety of the terminal in obtaining the second mapping relationship are improved.
It should be noted that, in the above embodiments, all descriptions regarding the data processing method applied to the first server are applicable to the embodiment of the data processing method applied to the terminal, and the same technical effects can be achieved, and detailed descriptions are not repeated herein.
In summary, the first server may generate the first mapping relationship and/or the second mapping relationship according to the hit rate of the sub-character strings in the historical data, and send the first mapping relationship and/or the second mapping relationship to the terminal, so that the terminal may perform mapping replacement on the sub-character string combination according to the first mapping relationship and/or the second mapping relationship to form the target character string, which may improve the efficiency of mapping replacement, and the target character string formed after mapping replacement may reduce transmission of data amount.
As shown in fig. 3, an embodiment of the present invention further provides a data processing method applied to a second server, including:
step 301, receiving the target character string sent by the terminal.
Specifically, in step 301, the second server receives the target character string sent by the terminal, and the transmission process of the target character string consumes less traffic and has higher confidentiality, so that the target character string is not easy to be acquired by others.
It should be noted that the second server may be the same as the first server, or may be a different server, and is not limited herein.
Step 302, obtaining a first mapping relation and/or a second mapping relation.
Specifically, if the first server and the second server are the same server, the second server may directly obtain the first mapping relationship and/or the second mapping relationship. If the first server and the second server are different servers, the first server may store the generated first mapping relationship and/or second mapping relationship in a database, and the second server obtains the first mapping relationship and/or second mapping relationship from the database.
Step 303, according to the first mapping relationship and/or the second mapping relationship, decompressing the target character string to obtain a sub-character string combination of at least one attribute characteristic.
Specifically, the second server decompresses the target character string according to the first mapping relationship, and may obtain a sub-character string combination of the first attribute characteristic, that is, a first sub-character string combination. And the second server decompresses the target character string according to the second mapping relation to obtain a sub-character string combination with a second attribute characteristic, namely a second sub-character string combination.
If the received target character string is added with the signature, the second server needs to check the signature in the target character string first, and if the check is successful, the target character string is decompressed to obtain an original value after decompression; if the verification is unsuccessful, subsequent decompression processing operation is not performed, so that errors of other simulated links in the decoding process can be prevented.
Optionally, in step 303, decompressing the target character string according to the first mapping relationship and/or the second mapping relationship, to obtain a sub-character string combination of at least one attribute feature, including:
decompressing the substring in the target string which meets the first attribute characteristic according to the first mapping relation to obtain a third substring combination which meets the first attribute characteristic; and/or
And decompressing the substring in the target string which meets the second attribute characteristic according to the first mapping relation to obtain a fourth substring combination which meets the second attribute characteristic.
Specifically, the second server decompresses the sub-character strings in the target character string, which meet the first attribute characteristics, according to the first mapping relationship to obtain a third sub-character string combination meeting the first attribute characteristics, namely the first sub-character string combination before terminal mapping replacement; and/or the second server decompresses the sub-character strings in the target character string according with the second attribute characteristic according to the second mapping relation to obtain a fourth sub-character string combination according with the second attribute characteristic, namely the second sub-character string combination before terminal mapping replacement.
If the character string is the URL interface address, firstly decompressing the key after mapping replacement, and acquiring a decompression result related to the key, namely obtaining a third sub-character string combination and a version identifier corresponding to the second mapping relation.
For example: since the sub-string combination of key and the sub-string combination of value are separated by "═ then key and value can be determined first by" ═ then the left side of "═ is key and the right side of" ═ is value. Then, decompression processing is carried out on the keys through the first mapping relation, and a third substring combination related to the keys, namely an original value corresponding to each compressed key, is obtained.
Because the first mapping relationship has the corresponding version identifier, the version identifier of the second mapping relationship can be determined according to the version identifier of the first mapping relationship, the second mapping relationship is determined according to the version identifier of the second mapping relationship, the values are decrypted through the second mapping relationship, the decompression result of the values is obtained, and the fourth substring combination is obtained.
Firstly, the second server needs to segment the values according to the second identifier, and if the values can be segmented, the segmented values are the original values. For example: the target string is: http:// xxx.com3 ═ 0 ═ 3 ═ 8, values (i.e., the sub-string combination after the second sub-string mapping replacement) are 3 ═ 0 ═ 3 ═ 8, and the second identifier is "═", and since each two adjacent characters (the values after the mapping replacement) are divided by "═ division, the values can be divided by" ═ "and the characters without the corresponding mapped values in the second mapping relationship are firstly divided, that is, 0 can be divided. Then, the segmentation is performed by "═ i", that is, the segmentation can be: 3. 0, 3, and 8, wherein 0 is the original value, the original values corresponding to 3, and 8 need to be obtained through the second mapping relationship, and the original values of key and value can be decoded reversely.
In summary, the second server performs signature verification after receiving the target character string, and decompresses the target character string through the first mapping relationship and/or the second mapping relationship after the signature verification succeeds to obtain an original value, so that not only can the data receiving amount be reduced, but also the interface security can be improved; and moreover, due to the unique mapping mode, the attack cannot be performed after the plaintext is seen, and the security is higher.
As shown in fig. 4, the specific implementation manner of the data processing method according to the embodiment of the present invention is as follows:
specifically, in step 401, after receiving the request message, the first server obtains the history data of the URL.
Step 402, generating a first mapping relation according to the historical data, counting the hit rate of value in the historical data to obtain a second mapping relation related to the value, and then issuing the first mapping relation and the second mapping relation carrying the version identifier to the terminal.
Step 403, the terminal combines all keys according to the first sequence to form keys under the condition that the first mapping relation and the second mapping relation are received, all values are combined to form values, the keys and the values separate two sides by "═ in the process, and the version identification must be transmitted.
Step 404, then replace keys according to the first mapping relation mapping.
And step 405, sequentially mapping and replacing according to the length of the value according to the second mapping relation until all values are replaced, and separating every two adjacent values after mapping and replacing by using ═ to obtain the target character string.
And step 406, signing the whole target character string and sending the whole target character string to a second server.
In step 407, the second server performs signature verification after receiving the target character string after signature. If the check is successful, the first value before being equal to is determined to be keys after the mapping replacement, and the first value before being equal to is determined to be values after the mapping replacement.
And step 408, decrypting the keys according to the first mapping relation to obtain the original value of the keys and the version identification of the values.
Step 409, dividing, wherein if the character can be divided, the beginning of each divided character is an original value; then, the original value of the values is decoded according to the second mapping relation.
It should be noted that, in the above embodiments, all descriptions regarding the data processing method applied to the second server are applicable to the embodiment of the data processing method applied to the terminal, and the same technical effects can be achieved, and detailed descriptions are not repeated herein.
As shown in fig. 5, an embodiment of the present invention provides a data processing apparatus 500, applied to a terminal, including:
a first obtaining module 501, configured to obtain, according to the attribute feature, a sub-string combination in the string, where the sub-string combination includes: a first sub-string combination conforming to the first attribute characteristic and/or a second sub-string combination conforming to the second attribute characteristic;
a second obtaining module 502, configured to obtain the first mapping relationship and/or the second mapping relationship;
a first replacing module 503, configured to perform mapping replacement on the first sub-string combination according to the first mapping relationship, and/or perform mapping replacement on the second sub-string combination according to a second mapping relationship, so as to form a target string;
a first sending module 504, configured to send the target character string.
Optionally, the second obtaining module 502 includes:
the first sending unit is used for sending request information for acquiring the first mapping relation and/or the second mapping relation to the first server every interval of a first preset duration;
a first receiving unit, configured to receive the first mapping relationship and/or the second mapping relationship sent by the first server.
Optionally, in the first replacing module 503, the priority of mapping replacement is positively correlated to the length of the sub-string in the first sub-string combination in the first mapping relationship.
Optionally, in the first replacing module 503, the priority of mapping replacement is positively correlated to the length of the sub-string in the second sub-string combination in the second mapping relationship.
Optionally, the first replacing module 503 includes:
and the first mapping and replacing unit is used for mapping and replacing the first sub-character string combination according to the first mapping relation, and adding a first identifier between adjacent sub-character strings after mapping and replacing to form a target character string.
Optionally, the first replacing module 503 further includes:
and the second mapping and replacing unit is used for mapping and replacing the second sub-character string combination according to the second mapping relation, and adding a second identifier between adjacent sub-character strings after mapping and replacing to form a target character string.
It should be noted that the embodiment of the data processing apparatus applied to the terminal is an apparatus corresponding to the data processing method applied to the terminal, and all implementation manners of the above embodiment are applicable to the embodiment of the apparatus, and can also achieve the same technical effect, which is not described herein again.
In summary, the terminal sends request information for acquiring the first mapping relationship and/or the second mapping relationship to the server, and after receiving the first mapping relationship and/or the second mapping relationship sent by the server, performs mapping replacement on the first sub-string combination according to the first mapping relationship, and/or performs mapping replacement on the second sub-string combination according to the second mapping relationship to form a target string, which not only can improve interface security, but also can reduce transmission of data amount; and then, the signature can be added to the target character string, and the target character string containing the signature can be obtained, so that the encryption is carried out on the basis of mapping and replacing the character string, and the interface safety is further improved.
As shown in fig. 6, an embodiment of the present invention further provides a data processing apparatus 600, applied to a first server, including:
a third obtaining module 601, configured to obtain, every second preset duration, historical data of a uniform resource locator URL;
a first generating module 602, configured to generate a first mapping relationship and/or a second mapping relationship according to the historical data;
a second sending module 603, configured to send the first mapping relationship and/or the second mapping relationship to the terminal.
Optionally, the first generating module 602 includes:
the obtaining unit is used for counting the hit rate of the substrings in the historical data and obtaining the substrings of which the hit rate meets the preset conditions;
the generating unit is used for generating a first mapping relation according to the substrings of which the hit rates meet the preset conditions and meet the first attribute characteristics; and/or
And generating a second mapping relation according to the substrings of which the hit rate meets the preset condition and meets the second attribute characteristic.
Optionally, the second sending module 603 includes:
a second receiving unit, configured to receive request information for acquiring the first mapping relationship and/or the second mapping relationship, where the request information is sent by the terminal;
and the second sending unit is used for sending the first mapping relation and/or the second mapping relation which is generated latest to the terminal according to the request information.
It should be noted that the embodiment of the data processing apparatus applied to the first server is an apparatus corresponding to the data processing method applied to the first server, and all implementation manners of the embodiment are applicable to the embodiment of the apparatus, and can achieve the same technical effect, which is not described herein again.
In summary, the first server may generate the first mapping relationship and/or the second mapping relationship according to the hit rate of the sub-character strings in the historical data, and send the first mapping relationship and/or the second mapping relationship to the terminal, so that the terminal may perform mapping replacement on the sub-character string combination according to the first mapping relationship and/or the second mapping relationship to form the target character string, which may improve the efficiency of mapping replacement, and the target character string formed after mapping replacement may reduce transmission of data amount.
As shown in fig. 7, an embodiment of the present invention further provides a data processing apparatus 700, applied to a second server, including:
a first receiving module 701, configured to receive a target character string sent by a terminal;
a fourth obtaining module 702, configured to obtain the first mapping relationship and/or the second mapping relationship;
a processing module 703, configured to decompress the target character string according to the first mapping relationship and/or the second mapping relationship, so as to obtain a sub-character string combination with at least one attribute characteristic.
Optionally, the processing module 703 includes:
the processing unit is used for decompressing the substring in the target string, which accords with the first attribute characteristic, according to the first mapping relation, so as to obtain a third substring combination which accords with the first attribute characteristic; and/or
And decompressing the substring in the target string which meets the second attribute characteristic according to the first mapping relation to obtain a fourth substring combination which meets the second attribute characteristic.
It should be noted that, the embodiment of the data processing apparatus applied to the second server is an apparatus corresponding to the data processing method applied to the second server, and all implementation manners of the above embodiment are applicable to the embodiment of the apparatus, and can achieve the same technical effect as that of the embodiment of the apparatus, which is not described herein again.
In summary, the second server performs signature verification after receiving the target character string, and decompresses the target character string through the first mapping relationship and/or the second mapping relationship after the signature verification succeeds to obtain an original value, so that not only can the data receiving amount be reduced, but also the interface security can be improved; and moreover, due to the unique mapping mode, the attack cannot be performed after the plaintext is seen, and the security is higher.
The embodiment of the present invention further provides an electronic device, which may be a terminal or a server, as shown in fig. 8, including a processor 81, a communication interface 82, a memory 83 and a communication bus 84, where the processor 81, the communication interface 82, and the memory 83 complete mutual communication through the communication bus 84;
a memory 83 for storing a computer program;
when the electronic device is a terminal, the processor 81 is configured to implement the following steps when executing the program stored in the memory 83:
according to the attribute characteristics, acquiring a sub-character string combination in the character string, wherein the sub-character string combination comprises: a first sub-string combination conforming to the first attribute characteristic and/or a second sub-string combination conforming to the second attribute characteristic;
acquiring a first mapping relation and/or a second mapping relation;
according to the first mapping relation, carrying out mapping replacement on the first sub-character string combination, and/or according to a second mapping relation, carrying out mapping replacement on the second sub-character string combination to form a target character string;
and sending the target character string.
Optionally, the obtaining the first mapping relationship and/or the second mapping relationship includes:
sending request information for acquiring a first mapping relation and/or a second mapping relation to a first server every a first preset time interval;
and receiving the first mapping relation and/or the second mapping relation sent by the first server.
Optionally, in the step of performing mapping replacement on the first sub-string combination according to the first mapping relationship, the priority of mapping replacement is positively correlated with the length of the sub-string in the first sub-string combination in the first mapping relationship.
Optionally, in the step of performing mapping replacement on the second sub-string combination according to the second mapping relationship, the priority of mapping replacement is positively correlated with the length of the sub-string in the second sub-string combination in the second mapping relationship.
Optionally, mapping and replacing the first sub-string combination according to the first mapping relationship to form a target string, including:
and carrying out mapping replacement on the first sub-character string combination according to the first mapping relation, and adding a first identifier between adjacent sub-character strings after the mapping replacement to form a target character string.
Optionally, mapping and replacing the second sub-string combination according to the second mapping relationship to form a target string, including:
and carrying out mapping replacement on the second sub-character string combination according to the second mapping relation, and adding a second identifier between adjacent sub-character strings after the mapping replacement to form a target character string.
When the electronic device is a first server, the processor 81 is configured to execute the program stored in the memory 83, and implement the following steps:
acquiring historical data of the uniform resource locator URL at intervals of a second preset duration;
generating a first mapping relation and/or a second mapping relation according to the historical data;
and sending the first mapping relation and/or the second mapping relation to a terminal.
Optionally, the generating a first mapping relationship and/or a second mapping relationship according to the historical data includes:
counting the hit rate of the substrings in the historical data, and acquiring the substrings with the hit rate meeting preset conditions;
generating a first mapping relation according to the substrings of which the hit rate meets a preset condition and meets the first attribute characteristic; and/or
And generating a second mapping relation according to the substrings of which the hit rate meets the preset condition and meets the second attribute characteristic.
Optionally, the sending the first mapping relationship and/or the second mapping relationship to the terminal includes:
receiving request information for acquiring a first mapping relation and/or a second mapping relation sent by the terminal;
and sending the first mapping relation and/or the second mapping relation which is generated latest to the terminal according to the request information.
When the electronic device is a second server, the processor 81 is configured to implement the following steps when executing the program stored in the memory 83:
receiving a target character string sent by a terminal;
acquiring a first mapping relation and/or a second mapping relation;
and decompressing the target character string according to the first mapping relation and/or the second mapping relation to obtain a sub-character string combination of at least one attribute characteristic.
Optionally, the decompressing the target character string according to the first mapping relationship and/or the second mapping relationship to obtain a sub-character string combination of at least one attribute feature includes:
decompressing the substring in the target string which meets the first attribute characteristic according to the first mapping relation to obtain a third substring combination which meets the first attribute characteristic; and/or
And decompressing the substring in the target string which meets the second attribute characteristic according to the first mapping relation to obtain a fourth substring combination which meets the second attribute characteristic.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, which has instructions stored therein, and when the instructions are executed on a computer, the computer is caused to execute the data processing method described in any one of the above embodiments.
In a further embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the data processing method of any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (16)

1. A data processing method is applied to a terminal and is characterized by comprising the following steps:
according to the attribute characteristics, acquiring a sub-character string combination in the character string, wherein the sub-character string combination comprises: a first sub-string combination conforming to the first attribute characteristic and/or a second sub-string combination conforming to the second attribute characteristic;
acquiring a first mapping relation and/or a second mapping relation;
according to the first mapping relation, carrying out mapping replacement on the first sub-character string combination, and/or according to a second mapping relation, carrying out mapping replacement on the second sub-character string combination to form a target character string;
and sending the target character string.
2. The method of claim 1, wherein obtaining the first mapping relationship and/or the second mapping relationship comprises:
sending request information for acquiring a first mapping relation and/or a second mapping relation to a first server every a first preset time interval;
and receiving the first mapping relation and/or the second mapping relation sent by the first server.
3. The method according to claim 1, wherein in the step of performing mapping replacement on the first sub-string combination according to the first mapping relationship, the priority of mapping replacement is positively correlated to the length of the sub-string in the first sub-string combination in the first mapping relationship.
4. The method according to claim 1, wherein in the step of performing mapping replacement on the second sub-string combination according to the second mapping relationship, the priority of mapping replacement is positively correlated with the length of the sub-string in the second sub-string combination in the second mapping relationship.
5. The method of claim 1, wherein mapping and replacing the first sub-string combination according to a first mapping relationship to form a target string comprises:
and carrying out mapping replacement on the first sub-character string combination according to the first mapping relation, and adding a first identifier between adjacent sub-character strings after the mapping replacement to form a target character string.
6. The method according to claim 1 or 5, wherein mapping and replacing the second sub-string combination according to a second mapping relationship to form a target string comprises:
and carrying out mapping replacement on the second sub-character string combination according to the second mapping relation, and adding a second identifier between adjacent sub-character strings after the mapping replacement to form a target character string.
7. A data processing method is applied to a first server and is characterized by comprising the following steps:
acquiring historical data of the uniform resource locator URL at intervals of a second preset duration;
generating a first mapping relation and/or a second mapping relation according to the historical data;
and sending the first mapping relation and/or the second mapping relation to a terminal.
8. The method of claim 7, wherein generating the first mapping and/or the second mapping based on the historical data comprises:
counting the hit rate of the substrings in the historical data, and acquiring the substrings with the hit rate meeting preset conditions;
generating a first mapping relation according to the substrings of which the hit rate meets a preset condition and meets the first attribute characteristic; and/or
And generating a second mapping relation according to the substrings of which the hit rate meets the preset condition and meets the second attribute characteristic.
9. The method according to claim 7, wherein the sending the first mapping relationship and/or the second mapping relationship to a terminal comprises:
receiving request information for acquiring a first mapping relation and/or a second mapping relation sent by the terminal;
and sending the first mapping relation and/or the second mapping relation which is generated latest to the terminal according to the request information.
10. A data processing method is applied to a second server and is characterized by comprising the following steps:
receiving a target character string sent by a terminal;
acquiring a first mapping relation and/or a second mapping relation;
and decompressing the target character string according to the first mapping relation and/or the second mapping relation to obtain a sub-character string combination of at least one attribute characteristic.
11. The method according to claim 10, wherein the decompressing the target string according to the first mapping relationship and/or the second mapping relationship to obtain a sub-string combination of at least one attribute feature includes:
decompressing the substring in the target string which meets the first attribute characteristic according to the first mapping relation to obtain a third substring combination which meets the first attribute characteristic; and/or
And decompressing the substring in the target string which meets the second attribute characteristic according to the first mapping relation to obtain a fourth substring combination which meets the second attribute characteristic.
12. A data processing device applied to a terminal is characterized by comprising:
a first obtaining module, configured to obtain, according to the attribute feature, a sub-string combination in the string, where the sub-string combination includes: a first sub-string combination conforming to the first attribute characteristic and/or a second sub-string combination conforming to the second attribute characteristic;
the second obtaining module is used for obtaining the first mapping relation and/or the second mapping relation;
the first replacing module is used for carrying out mapping replacement on the first sub-character string combination according to the first mapping relation and/or carrying out mapping replacement on the second sub-character string combination according to the second mapping relation to form a target character string;
and the first sending module is used for sending the target character string.
13. A data processing apparatus applied to a first server, comprising:
the third acquisition module is used for acquiring the historical data of the uniform resource locator URL every second preset time interval;
the first generation module is used for generating a first mapping relation and/or a second mapping relation according to the historical data;
and the second sending module is used for sending the first mapping relation and/or the second mapping relation to the terminal.
14. A data processing apparatus applied to a second server, comprising:
the first receiving module is used for receiving a target character string sent by a terminal;
the fourth obtaining module is used for obtaining the first mapping relation and/or the second mapping relation;
and the processing module is used for decompressing the target character string according to the first mapping relation and/or the second mapping relation to obtain a sub-character string combination with at least one attribute characteristic.
15. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the data processing method of any one of claims 1 to 11 when executing the program stored in the memory.
16. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the data processing method of any one of claims 1 to 11.
CN202011224438.XA 2020-11-05 2020-11-05 Data processing method and device and electronic equipment Active CN112434231B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011224438.XA CN112434231B (en) 2020-11-05 2020-11-05 Data processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011224438.XA CN112434231B (en) 2020-11-05 2020-11-05 Data processing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN112434231A true CN112434231A (en) 2021-03-02
CN112434231B CN112434231B (en) 2023-09-08

Family

ID=74695483

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011224438.XA Active CN112434231B (en) 2020-11-05 2020-11-05 Data processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112434231B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114301681A (en) * 2021-12-28 2022-04-08 中国电信股份有限公司 Service data transmission method and device, storage medium and electronic device

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040054671A1 (en) * 1999-05-03 2004-03-18 Cohen Ariye M. URL mapping methods and systems
US20100302078A1 (en) * 2007-11-02 2010-12-02 Symbol Technologies, Inc. Efficient encoding and decoding of mixed data strings in rfid tags and other media
CN102934104A (en) * 2010-06-08 2013-02-13 微软公司 Web site implementation by mapping expression evaluation
CN105593831A (en) * 2013-10-08 2016-05-18 索尼公司 Server device, client device, information processing method, and recording medium
US20170124037A1 (en) * 2015-11-03 2017-05-04 International Business Machines Corporation Technique used in text analysis in a safe manner
US20180349423A1 (en) * 2017-06-01 2018-12-06 Oracle International Corporation System and method for generating a multi dimensional data cube for analytics using a map-reduce program
CN109062952A (en) * 2018-06-22 2018-12-21 北京奇艺世纪科技有限公司 A kind of data query method, apparatus and electronic equipment
CN109921875A (en) * 2017-12-13 2019-06-21 中国电信股份有限公司 Data transmission method, system and equipment
CN110765238A (en) * 2019-10-12 2020-02-07 北京字节跳动网络技术有限公司 Data encryption query method and device
CN111797334A (en) * 2020-06-19 2020-10-20 北京达佳互联信息技术有限公司 Website access method and device, electronic equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040054671A1 (en) * 1999-05-03 2004-03-18 Cohen Ariye M. URL mapping methods and systems
US20100302078A1 (en) * 2007-11-02 2010-12-02 Symbol Technologies, Inc. Efficient encoding and decoding of mixed data strings in rfid tags and other media
CN102934104A (en) * 2010-06-08 2013-02-13 微软公司 Web site implementation by mapping expression evaluation
CN105593831A (en) * 2013-10-08 2016-05-18 索尼公司 Server device, client device, information processing method, and recording medium
US20170124037A1 (en) * 2015-11-03 2017-05-04 International Business Machines Corporation Technique used in text analysis in a safe manner
US20180349423A1 (en) * 2017-06-01 2018-12-06 Oracle International Corporation System and method for generating a multi dimensional data cube for analytics using a map-reduce program
CN109921875A (en) * 2017-12-13 2019-06-21 中国电信股份有限公司 Data transmission method, system and equipment
CN109062952A (en) * 2018-06-22 2018-12-21 北京奇艺世纪科技有限公司 A kind of data query method, apparatus and electronic equipment
CN110765238A (en) * 2019-10-12 2020-02-07 北京字节跳动网络技术有限公司 Data encryption query method and device
CN111797334A (en) * 2020-06-19 2020-10-20 北京达佳互联信息技术有限公司 Website access method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114301681A (en) * 2021-12-28 2022-04-08 中国电信股份有限公司 Service data transmission method and device, storage medium and electronic device

Also Published As

Publication number Publication date
CN112434231B (en) 2023-09-08

Similar Documents

Publication Publication Date Title
WO2019095416A1 (en) Information pushing method and apparatus, and terminal device and storage medium
US11303617B2 (en) Methods and apparatuses for oblivious transfer using trusted environment
CN110263579B (en) Data processing method, system and related equipment
CN110839004A (en) Method and device for access authentication
CN112235104B (en) Data encryption transmission method, system, terminal and storage medium
CN112437060B (en) Data transmission method and device, computer equipment and storage medium
CN112434231B (en) Data processing method and device and electronic equipment
CN112995199A (en) Data encoding and decoding method, device, transmission system, terminal equipment and storage medium
CN114830572A (en) Data transmission method, device, equipment, system and storage medium
CN111931204A (en) Encryption and de-duplication storage method and terminal equipment for distributed system
CN116501997A (en) Short link generation method, device, electronic equipment and storage medium
CN110851794A (en) Media file uplink method and device, storage medium and electronic device
CN114650285B (en) Method for multi-dimensional full-factor monitoring of real estate registration business
CN112559546B (en) Database synchronization method, database synchronization device, computer equipment and readable storage medium
CN113162628B (en) Data encoding method, data decoding method, terminal and storage medium
CN112559497B (en) Data processing method, information transmission method, device and electronic equipment
CN111324914B (en) File transmission method, device, server, equipment and medium
CN114095037A (en) Application program updating method, updating data compression method, device and equipment
CN112202453A (en) Information processing method, device, equipment and medium for compressing ciphertext
KR102019558B1 (en) Efficient signature verification method for digital signatures using implicit certificates
CN107463840B (en) A kind of method and device based on the encrypted defence CC attacks of website and webpage title
CN113076550B (en) Script text updating method, script text encryption method and device
Park et al. A study on the processing and reinforcement of message digest through two-dimensional array masking
CN113282662B (en) Block information processing method, device, equipment and medium
CN107995177A (en) Data transmission system and 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