[go: up one dir, main page]

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

Data processing method and device and electronic equipment Download PDF

Info

Publication number
CN112434231B
CN112434231B CN202011224438.XA CN202011224438A CN112434231B CN 112434231 B CN112434231 B CN 112434231B CN 202011224438 A CN202011224438 A CN 202011224438A CN 112434231 B CN112434231 B CN 112434231B
Authority
CN
China
Prior art keywords
mapping
sub
mapping relation
string
combination
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
CN202011224438.XA
Other languages
Chinese (zh)
Other versions
CN112434231A (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

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (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, sub-character string combinations in the character strings are obtained, wherein the sub-character string combinations comprise: a first sub-string combination conforming to the first attribute feature and/or a second sub-string combination conforming to the second attribute feature; acquiring a first mapping relation and/or a second mapping relation; according to the first mapping relation, mapping replacement is carried out on the first sub-string combination, and/or according to the second mapping relation, mapping replacement is carried out on the second sub-string combination, so that a target string is formed; and sending the target character string. By the scheme, the data security can be improved, and the 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, a data processing device, and an electronic device.
Background
At present, in order to facilitate development and debugging of request parameters on interface addresses and uniform resource locators (Uniform Resource Locator, URLs) in clear text transmission, the request parameters can be directly seen by some people who understand network knowledge, so that the request parameters can be possibly cracked, and operations such as interface simulation, injection attack and the like can be performed. Meanwhile, a relatively large complex interface needs a large amount of parameters, when the interface of the specified resource request data GET mode is spliced on the URL, the link is possibly caused to be too long to trigger the interception of certain intermediate links, and the POST method for submitting the data to be processed to the specified resource is put into the main body, so that the interception can be avoided, but the whole data quantity is not changed.
The current encryption problem is mainly solved by using hypertext transfer security protocol (Hyper Text Transfer Protocol over Secure Socket Layer, HTTPS), although the encryption processing method of a secure socket layer (Secure Sockets Layer, SSL) or a secure transport layer (Transport Layer Security, TLS) can avoid man-in-the-middle attack to a certain extent, if a client actively trusts a certificate issued by an agent, the client can see a clear request URL on the agent. While the credit chain architecture of SSL certificates is not secure. Man-in-the-middle attacks are equally feasible, especially in cases where the certificate authority (Certificate Authority, CA) root certificate can be controlled. And HTTPS requires additional computing resources to be consumed because of the need for encryption and decryption.
Also, the existing common compression algorithms in data compression are: huffman, string table compression (Lempel Ziv Welch, LZW), general algorithm LZ77 for sequential data compression and the like are limited to different degrees, huffman needs a table to realize, the cost is high, and other algorithms do not have a certain compression effect when the arrangement condition of compressed objects is different, and do not compress the URL of the HTTPS protocol.
As can be seen, in the prior art, the data encryption method such as the interface address has low security and consumes computing resources.
Disclosure of Invention
The embodiment of the invention aims to provide a data processing method, a data processing device and electronic equipment, so that the data security is improved to a certain extent, and the data transmission quantity is reduced. The specific technical scheme is as follows:
in a first aspect of the present invention, there is first provided a data processing method, applied to a terminal, including:
according to the attribute characteristics, sub-character string combinations in the character strings are obtained, wherein the sub-character string combinations comprise: a first sub-string combination conforming to the first attribute feature and/or a second sub-string combination conforming to the second attribute feature;
acquiring a first mapping relation and/or a second mapping relation;
according to the first mapping relation, mapping replacement is carried out on the first sub-string combination, and/or according to the second mapping relation, mapping replacement is carried out on the second sub-string combination, so that a target string is formed;
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 a Uniform Resource Locator (URL) every second preset time length;
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 also 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 feature.
In a fourth aspect of the present invention, there is also provided a data processing apparatus, applied to a terminal, including:
the first obtaining module is configured to obtain a sub-string combination in the string according to the attribute feature, where the sub-string combination includes: a first sub-string combination conforming to the first attribute feature and/or a second sub-string combination conforming to the second attribute feature;
the second acquisition module is used for acquiring 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-string combination according to the first mapping relation and/or carrying out mapping replacement on the second sub-string combination according to the second mapping relation to form a target 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 historical data of the Uniform Resource Locator (URL) every interval for a second preset duration;
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 the target character string sent by the terminal;
the fourth acquisition module is used for acquiring 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 of at least one attribute characteristic.
In a seventh aspect of the embodiment of the present invention, there is also 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 of the present invention, there is also provided a computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform any of the data processing methods described above.
In a ninth aspect of the 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, the terminal obtains the sub-string combination in the string according to the attribute characteristics, and obtains the first mapping relation and/or the second mapping relation, the terminal can perform mapping replacement on the first sub-string combination according to the first mapping relation, and/or the terminal can perform mapping replacement on the second sub-string combination according to the second mapping relation, so that a target string is formed, and the purpose is to compress the first sub-string combination and/or the second sub-string combination according to the corresponding mapping relation, so that data security can be improved, and transmission of data quantity 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 a data processing method according to an embodiment of the present invention;
FIG. 3 is a third flowchart illustrating 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 accompanying drawings in the embodiments of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a data processing method, which is applied to a terminal, and includes:
Step 101, obtaining a sub-string combination in a string according to the attribute characteristics, wherein the sub-string combination comprises: a first sub-string combination conforming to a first attribute feature and/or a second sub-string combination conforming to a second attribute feature.
Specifically, in the step 101, the character string may include: a substring that conforms to a first attribute feature, and/or a substring that conforms to a second attribute feature, etc. The terminal may obtain a first sub-string combination of sub-strings in the string that corresponds to the first attribute feature according to the first attribute feature, and the terminal may obtain a second sub-string combination of sub-strings in the string that corresponds to the second attribute feature according to the second attribute feature.
The character string can be a URL interface address, the first attribute feature can be an attribute feature of a parameter key, and the first sub-character string is combined into a combination 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 character 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 ordered according to a first order to obtain a first sub-character string combination (i.e. keys); sequencing all the parameter values to obtain a second substring combination (i.e. values); and then, classifying and combining all the ordered parameter keys and all the ordered parameter values, wherein after combination, all the parameter keys are combined, and all the parameter values are combined.
Since the parameter keys are limited and fixed, the arrangement of all the keys is only limited or only one way, and may be replaced by only one first mapping relationship, which is not limited herein.
It should be noted that, the first order may be that the keys are ordered according to the order of the first characters, or if the order of the first characters is the same, the prefix may be arranged in front. The manner of the first sequence described above is merely an example, and the specific manner of the first sequence may be set as needed, and is not particularly limited herein.
Specifically, the sub-string combinations in the character strings acquired according to the attribute characteristics comprise 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, 14 unsafe characters in the rule of HTTP URL, 7 reserved characters and 74 characters are available, so the first mapping relation and/or the second mapping relation can use 74 scale. The character string of the interface URL has a fixed format of ken1=value1 & ken2=value2 & ken3=value3, and after the ordered keys are obtained, the value corresponding to each key may be ordered correspondingly. For example: if the keys after sorting are in turn: key1, key3, key2, then according to this order, the ordered values are in order: value1, value3, value2, i.e. after ordering: ke1=value 1& ke3=value 3& ke2=value 2.
Step 102, obtaining a first mapping relation and/or a second mapping relation.
Specifically, in the step 102, the terminal obtains a first mapping relation about the first sub-string combination, and/or the terminal obtains a second mapping relation about the second sub-string combination. The first mapping relations can carry version identifiers corresponding to the first mapping relations, and each first mapping relation has different version identifiers, so that when the first mapping relation is updated later or a plurality of first mapping relations are provided, the corresponding first mapping relation can be obtained quickly through the version identifiers, and the accuracy and the safety of the terminal for obtaining the first mapping relation are improved. The second mapping relations can carry version identifications corresponding to the first mapping relations, each second mapping relation has different version identifications, so that when the second mapping relation is updated later or the second mapping relation is more than one, the corresponding second mapping relation can be obtained quickly through the version identifications, and the accuracy and the safety of the terminal for obtaining the second mapping relation are improved.
And 103, according to the first mapping relation, mapping replacement is performed on the first sub-string combination, and/or according to a second mapping relation, mapping replacement is performed on the second sub-string combination, so that a target string is formed.
Specifically, in step 103, when the terminal obtains the first mapping relationship, the terminal may perform mapping replacement on the first sub-string combination according to the first mapping relationship to form the target string. Under the condition that the terminal acquires the second mapping relation, the terminal can perform mapping replacement on the second sub-string combination according to the second mapping relation so as to form the target string. Under the condition that the terminal obtains the first mapping relation and the second mapping relation, the first sub-string combination can be subjected to mapping replacement according to the first mapping relation, and the second sub-string combination can be subjected to mapping replacement according to the second mapping relation, so that a target string is formed, the compression effect can be achieved, HTTPS can be not used any more, and data compression can reduce data quantity transmission, save cost and improve efficiency.
And 104, transmitting the target character string.
In step 104, the terminal sends the target character string to the second server in the case of forming the target character string, 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 feature, and obtains the first mapping relationship and/or the second mapping relationship, and the terminal may perform mapping replacement on the first sub-string combination according to the first mapping relationship, and/or the terminal may perform mapping replacement on the second sub-string combination according to the second mapping relationship, so as to form the target string, so as to compress the first sub-string combination and/or the second sub-string combination according to the corresponding mapping relationship, which not only may improve data security, but also may reduce transmission of data volume.
Optionally, the step of obtaining the first mapping relationship and/or the second mapping relationship in the step 102 may specifically include:
each interval is a first preset duration, and request information for acquiring a first mapping relation and/or a second mapping relation is sent to a first server;
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 a first preset time length, and requests to obtain a first mapping relation and/or a second mapping relation to the first server, that is, the terminal requests the first server to send the first mapping relation related to the first sub-string combination and/or the second mapping relation related to the second sub-string combination, so that mapping replacement can be performed on the terminal by using the first mapping relation and/or the second mapping relation to form a target string. After the first server receives the request information, the first mapping relation and/or the second mapping relation required by the terminal are sent to the terminal according to the request information, and the first mapping relation and/or the second mapping relation sent by the first server are received.
The first preset duration is a period time for which the preset terminal needs to update the first mapping relationship and/or the second mapping relationship, and may be set according to needs.
Optionally, in step 103, in the step of mapping and replacing the first sub-string combination according to the first mapping relationship, the priority of mapping and replacing 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-string combination according to the first mapping relationship, the terminal may perform mapping replacement on the longest sub-string in the first sub-string combination first, and then perform mapping replacement on the longest sub-string in the first sub-string combination that is not subjected to mapping replacement, and so on until all sub-strings in the first sub-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 substitution, the efficiency of the mapping substitution can be maximized, thereby maximizing the compression efficiency.
Optionally, in step 103, in the step of mapping and replacing the second sub-string combination according to the second mapping relationship, the priority of mapping and replacing 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-string combination according to the second mapping relationship, the terminal may perform mapping replacement on the longest sub-string in the second sub-string combination first, and then perform mapping replacement on the longest sub-string in the second sub-string combination that is not subjected to mapping replacement, and so on until all sub-strings in the second sub-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 substitution, the efficiency of the mapping substitution can be maximized, thereby maximizing the compression efficiency.
Optionally, in step 103, mapping replacement is performed on the first sub-string combination according to a first mapping relationship to form a target string, which may specifically include:
and according to the first mapping relation, mapping and replacing the first sub-string combination, and adding a first identifier between adjacent sub-strings after mapping and replacing to form a target string.
Specifically, the terminal may perform mapping replacement on each sub-string in the first sub-string combination according to the first mapping relationship, and may add a first identifier between every two adjacent sub-strings after mapping replacement, so as to form a target string after mapping replacement, so as to avoid recognition conflicts of different sub-strings in the mapped sub-string combination.
Optionally, in step 103, mapping replacement is performed on the second sub-string combination according to a second mapping relationship to form a target string, which may specifically include:
and according to the second mapping relation, carrying out mapping replacement on the second sub-string combination, and adding a second identifier between adjacent sub-strings after mapping replacement to form a target string.
Specifically, the terminal may perform mapping replacement on each sub-string in the second sub-string combination according to the second mapping relationship, and in order to avoid recognition conflicts of different sub-strings in the mapped sub-string combination, a second identifier may be added between every two adjacent sub-strings after mapping replacement, so as to form a target string after mapping replacement.
Further, if the original value before the sub-string mapping in the first sub-string combination does not exist in the first mapping relationship, a third identifier may be added as a value after mapping replacement on the basis of the original value. If the original value before the sub-string mapping in the second sub-string combination does not exist in the second mapping relation, a fourth identifier can be added as a value after mapping replacement on the basis of the original value.
Optionally, a signature may be added to the target string to obtain a target string including the signature, that is, a Message-Digest Algorithm (MD 5) is added to make a signature by using a contract identifier, so that the server may verify the signature, decompress the target string after the verification is successful, and obtain an original value after decompression, that is, obtain a sub-string combination of at least one attribute feature, and may prevent errors in the decoding process of the other analog link.
The following describes the above scheme in detail by a specific embodiment:
firstly, the character strings are URL interface addresses, and all parameter keys can be sequenced according to a first sequence to obtain a first sub-character string combination (namely keys); sequencing all the parameter values to obtain a second substring combination (i.e. values); then, all the ordered parameter keys and all the ordered parameter values can be classified and combined, after combination, all the parameter keys are combined, all the parameter values are combined, and the two combinations can be separated by a fifth identifier (such as: =).
For example: the character string is as follows: http: the composition=1.0.1 & device=1100110 & os=iphone, i.e. key1 is version and value1 is 1.0.1; key2 is device, value2 is 1100110; key3 is os and value3 is iphone. If the first order is: the keys are ordered according to the order of the sizes of the first characters, or if the order of the sizes of the first characters is the same and the prefix is shorter and can be arranged in the front, the ordered character strings are as follows: http:// xxx.com & os & version=1100110 & iphone &1.0.1. Wherein, the first sub-string combination is: device & os & version, the second substring combination is: 1100110& iphone &1.0.1.
And then, sending request information for acquiring the first mapping relation and the second mapping relation to the first server every first preset time period by the terminal, and then receiving 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 of the first mapping relation about keys is shown in table 1 below:
TABLE 1 first mapping Table
Substring of key Values corresponding to keys
device&os 1
os&version 2
device&os&version 3
Wherein, the value corresponding to the substring device & os is 1, the value corresponding to the substring os & version is 2, and the value corresponding to the substring 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 of the second mapping relation regarding value is shown in table 2 below:
TABLE 2 second mapping Table
value substring 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& 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. The longest substring is matched first, i.e. mapping substitution is performed on the (iphone) and the (1.0.1), the corresponding value after mapping substitution is 8, separation can be performed by "=", and the target character string after mapping substitution is http:/(xxx.com3= 1100110 =8). Then mapping and replacing the rest substrings, wherein the longest character in the rest substrings is 110, 0 and 110 after segmentation, wherein the corresponding value of 110 after replacement is 3, and if 0 has no corresponding value in the second mapping relation table, a fourth identifier (for example: "=") can be added to the left side of 0, and the obtained mapping value is: 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: 3= 0=3=8, the target string after mapping substitution is: http:// xxx.com3=3= =0=3=8.
It should be noted that the execution order is merely an example, and is not limited to specific, and the key and the value may be separated first, then the key is ordered according to the first order, and then the value is ordered according to the ordered key.
In summary, the terminal sends request information for acquiring the first mapping relationship and/or the second mapping relationship to the server, 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, so as to form a target string, thereby not only improving interface security, but also reducing transmission of data volume; 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 character string is encrypted on the basis of mapping and replacing, and the interface security is further improved.
As shown in fig. 2, an embodiment of the present invention further provides a data processing method, which is applied to a first server, and includes:
step 201, obtaining historical data of uniform resource locator URL every second preset time period.
Specifically, in the step 201, the first server obtains the history data of the URL every second preset time period, where the history data is the data transmission history of the terminal.
The second preset duration is a preset cycle time of the first server for updating the historical data of the URL, and may be set as required.
Step 202, generating a first mapping relation and/or a second mapping relation according to the historical data.
Specifically, in the step 202, the first server generates a first mapping relation for the first sub-string combination and/or a second mapping relation for the second sub-string combination according to the history data.
And 203, transmitting 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-string combination according to the first mapping relation and/or the second mapping relation to form a target 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 history 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-string combination according to the first mapping relationship and/or the second mapping relationship to form the target string, so that the efficiency of mapping replacement may be improved, and the target string formed after mapping replacement may reduce the transmission of the data volume.
Optionally, in step 202, the generating the first mapping relationship and/or the second mapping relationship according to the history data may specifically include:
counting the hit rate of the substrings in the historical data, and acquiring substrings with hit rates meeting preset conditions;
generating a first mapping relation according to the substrings with hit rates meeting preset conditions and conforming to 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 characteristics.
Specifically, the first server counts hit rate or word frequency of each sub-string in the historical data, and generates a first mapping relation according to sub-strings which meet first attribute characteristics in all sub-strings meeting preset conditions; and similarly, generating a second mapping relation according to the sub-strings which meet the second attribute characteristics in all the sub-strings meeting the preset conditions.
The character string can be a URL interface address, the first attribute feature can be an attribute feature of a parameter key, and the first sub-character string is combined into a combination 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 character string, the first attribute feature, and the second attribute feature are not specifically limited herein.
Alternatively, 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 or unique, and may be replaced by only one first mapping relationship, which is not limited herein.
Optionally, after the first server obtains the value in the history data, because there are many personalized data in the value, but not all the personalized data can not be mapped completely, and because there are many specific high-frequency words such as equipment model, version number, region, etc. in the service, the first server may firstly segment the value from length 3 to all the lengths (because at least one bit identifier is added with a connector after mapping, namely length is 2, there is no compression effect after mapping of original length is 2), that is, split the substring from length 3 to all the lengths, statistics is performed on the history data after splitting, and hit rate of each sub-string after statistical splitting, that is, hit rate of each sub-string after statistical splitting is performed; 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 with hit rate reaching a threshold, and the threshold may be set according to service requirements, which is not limited herein specifically.
It should be noted that, different from the compression of the general sub-string, because the service relationship value has a certain high-frequency word, if the high-frequency word is placed on the same side and connected with other high-frequency words, a longer high-frequency word can be formed than the 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 which is sent by the terminal and used for acquiring the first mapping relation and/or the second mapping relation;
and according to the request information, the latest generated first mapping relation and/or second mapping relation is/are sent to the terminal.
Specifically, the first server receives the request information for acquiring the first mapping relationship and/or the second mapping relationship sent by the terminal, and sends the latest generated first mapping relationship and/or second mapping relationship to the terminal, wherein the first mapping relationship can carry the version identifier corresponding to the first mapping relationship, and the version identifier corresponding to the first mapping relationship needs to be updated simultaneously when the first mapping relationship is updated, so that the server can distinguish the first mapping relationship corresponding to each version identifier, and the accuracy and the safety of acquiring the first mapping relationship by the terminal are improved. The second mapping relationship may carry a version identifier corresponding to the first mapping relationship, and when updating the second mapping relationship, the version identifier corresponding to the second mapping relationship also needs to be updated at the same time, so that the server can distinguish the second mapping relationship corresponding to each version identifier, and the correctness and safety of the terminal for acquiring the second mapping relationship are improved.
It should be noted that, in the above embodiments, all descriptions about the embodiments of the data processing method applied to the first server are applicable to the embodiments of the data processing method applied to the terminal, and the same technical effects as those of the embodiments can be achieved, which are not described in detail 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-strings in the history 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-string combination according to the first mapping relationship and/or the second mapping relationship to form the target string, so that the efficiency of mapping replacement may be improved, and the target string formed after mapping replacement may reduce the transmission of the data volume.
As shown in fig. 3, the embodiment of the present invention further provides a data processing method, which is applied to a second server, and includes:
step 301, receiving a target character string sent by a terminal.
Specifically, in step 301, the second server receives the target string sent by the terminal, and the transmission process of the target string consumes less traffic and has higher confidentiality, so that the target string is not easy to be acquired by others.
The second server may be the same server as the first server or may be a different server, which is not specifically limited herein.
Step 302, a first mapping relationship and/or a second mapping relationship are obtained.
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 can store the generated first mapping relation and/or second mapping relation into a database, and the second server obtains the first mapping relation and/or the second mapping relation from the database.
Step 303, 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 feature.
Specifically, the second server decompresses the target string according to the first mapping relationship, so as to obtain a sub-string combination of the first attribute feature, i.e. a first sub-string combination. And the second server decompresses the target character string according to the second mapping relation, so that a sub-character string combination of the second attribute characteristic, namely a second sub-character string combination, can be obtained.
If the received target character string is added with the signature, the second server needs to check the signature in the target character string, and if the verification is successful, the target character string is decompressed to obtain an original value after decompression; if the verification is unsuccessful, the subsequent decompression processing operation is not performed, and the error of the other people in the decoding process of the analog link can be prevented.
Optionally, in step 303, the decompressing process is performed on 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, where the sub-string combination includes:
according to the first mapping relation, decompressing the sub-strings conforming to the first attribute characteristics in the target string to obtain a third sub-string combination conforming to the first attribute characteristics; and/or
And according to the first mapping relation, decompressing the sub-strings which accord with the second attribute characteristics in the target string to obtain a fourth sub-string combination which accords with the second attribute characteristics.
Specifically, the second server decompresses the sub-strings conforming to the first attribute characteristics in the target string according to the first mapping relation to obtain a third sub-string combination conforming to the first attribute characteristics, namely, the first sub-string combination before terminal mapping replacement; and/or the second server decompresses the sub-strings conforming to the second attribute characteristics in the target string according to the second mapping relation to obtain a fourth sub-string combination conforming to the second attribute characteristics, namely a second sub-string combination before terminal mapping replacement.
And if the character string is a URL interface address, firstly decompressing the key after mapping replacement to obtain a decompression result about the key, namely obtaining a third sub-character string combination and a version identifier corresponding to the second mapping relation.
For example: since the substring combinations keys and values of keys are separated by "=" it is possible to determine keys and values first by "=" and then the left side of "=" is keys and the right side of "=" is values. And then decompressing the keys through the first mapping relation to obtain a third sub-string combination related to the keys, namely the original value corresponding to each compressed key.
Because the first mapping relation has the corresponding version identifier, the version identifier of the second mapping relation can be determined according to the version identifier of the first mapping relation, the second mapping relation is determined according to the version identifier of the second mapping relation, the value is decrypted through the second mapping relation, and a decompression result about the value is obtained, so that a fourth sub-string combination is obtained.
Firstly, the second server needs to divide the value according to the second identifier, and if the value can be divided, the divided value is the original value. For example: the target character string is: http:// xxx.com3=3= =0=3=8, and values (i.e. the sub-string combination after mapping the second sub-string) is 3= =0=3=8, and the second identifier is "=", and since every two adjacent characters (the value after mapping the replacement) are all divided by "=", the values can be divided by "=", and the characters without the corresponding mapped values in the second mapping relationship can be divided first, namely, the 0 can be divided. Then, the method can be divided into: 3. and 0, 3 and 8, wherein 0 is an original value, and the original values corresponding to 3, 3 and 8 are required to be obtained through a second mapping relation, so that the original values of the key and the value can be reversely decoded.
In summary, after receiving the target character string, the second server performs signature verification, and after the signature verification is successful, decompresses the target character string through the first mapping relation and/or the second mapping relation to obtain the original value, so that the data receiving amount can be reduced, and the interface security can be improved; and the unique mapping mode ensures that the plain text can not be attacked and is safer.
As shown in fig. 4, a specific implementation manner of the data processing method in the embodiment of the present invention is:
specifically, in step 401, the first server acquires the history data of the URL after receiving the request information.
Step 402, a first mapping relation is generated according to the historical data, the hit rate of the value in the historical data is counted to obtain a second mapping relation about the value, and then the first mapping relation and the second mapping relation carrying the version identification are issued to the terminal.
Step 403, under the condition that the terminal receives the first mapping relation and the second mapping relation, combining all keys according to a first sequence to form keys, combining all values to form values, and separating two sides of the keys and the values through '=', wherein in the process, the version identification is transmitted.
Step 404, replacing keys according to the first mapping relation.
And 405, according to the second mapping relation, mapping and replacing sequentially according to the length of the value until all the value is replaced, and separating every two adjacent values after mapping and replacing by using a '=' method, so as to obtain the target character string.
And step 406, integrally signing the target character string, and sending the target character string to a second server.
In step 407, the second server performs signature verification after receiving the signed target string. If the check is successful, it may be determined that the value before the first "=" is the key after the mapping replacement, and the value before the first "=" is the value after the mapping replacement.
And step 408, decrypting the key according to the first mapping relation to obtain the original value of the key and the version identifier of the value.
Step 409, dividing by "= =" and if the division is possible, the beginning of each divided character is the original value; then the method is divided by "=" and then the original value of the value is reversely decoded according to the second mapping relation.
It should be noted that, in the above embodiments, all descriptions about the embodiments of the data processing method applied to the second server are applicable to the embodiments of the data processing method applied to the terminal, and the same technical effects as those of the embodiments can be achieved, which are not described in detail herein.
As shown in fig. 5, an embodiment of the present invention provides a data processing apparatus 500, which is applied to a terminal, including:
the first obtaining module 501 is 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 feature and/or a second sub-string combination conforming to the second attribute feature;
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 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 first preset time length;
the first receiving unit is used for receiving the first mapping relation and/or the second mapping relation sent by the first server.
Optionally, in the first replacing module 503, the priority of mapping replacement is positively correlated with the length of the substring in the first substring combination in the first mapping relationship.
Optionally, in the first replacing module 503, the priority of mapping replacement is positively correlated with the length of the substring in the second substring combination in the second mapping relationship.
Optionally, the first replacing module 503 includes:
and the first mapping replacement unit is used for mapping the first sub-string combination according to the first mapping relation, and adding a first identifier between adjacent sub-strings after mapping replacement to form a target string.
Optionally, the first replacing module 503 further includes:
and the second mapping replacement 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 device applied to the terminal is a device corresponding to the data processing method applied to the terminal, and all implementation manners of the embodiment are applicable to the embodiment of the device, so that the same technical effects as those of the embodiment of the device can be achieved, which is not described herein.
In summary, the terminal sends request information for acquiring the first mapping relationship and/or the second mapping relationship to the server, 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, so as to form a target string, thereby not only improving interface security, but also reducing transmission of data volume; 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 character string is encrypted on the basis of mapping and replacing, and the interface security 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 historical data of URL at each interval for a second preset duration;
a first generating module 602, configured to generate a first mapping relationship and/or a second mapping relationship according to the history data;
and the second sending module 603 is configured to send the first mapping relationship and/or the second mapping relationship to a terminal.
Optionally, the first generating module 602 includes:
the acquisition unit is used for counting the hit rate of the substrings in the historical data and acquiring substrings with hit rates meeting preset conditions;
the generation unit is used for generating a first mapping relation according to the substrings which meet the preset conditions and accord with 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 characteristics.
Optionally, the second sending module 603 includes:
the second receiving unit is used for receiving request information which is sent by the terminal and is used for acquiring the first mapping relation and/or the second mapping relation;
and the second sending unit is used for sending the latest generated first mapping relation and/or second mapping relation 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, so that the same technical effects as those of the embodiment of the invention can be achieved, and the description thereof is omitted 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-strings in the history 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-string combination according to the first mapping relationship and/or the second mapping relationship to form the target string, so that the efficiency of mapping replacement may be improved, and the target string formed after mapping replacement may reduce the transmission of the data volume.
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 string sent by a terminal;
a fourth obtaining module 702, configured to obtain the first mapping relationship and/or the second mapping relationship;
and a processing module 703, configured to decompress 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.
Optionally, the processing module 703 includes:
the processing unit is used for decompressing the sub-strings conforming to the first attribute characteristics in the target strings according to the first mapping relation to obtain a third sub-string combination conforming to the first attribute characteristics; and/or
And according to the first mapping relation, decompressing the sub-strings which accord with the second attribute characteristics in the target string to obtain a fourth sub-string combination which accords with the second attribute characteristics.
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 embodiment are applicable to the embodiment of the apparatus, so that the same technical effects as those of the embodiment of the invention can be achieved, and the description thereof is omitted herein.
In summary, after receiving the target character string, the second server performs signature verification, and after the signature verification is successful, decompresses the target character string through the first mapping relation and/or the second mapping relation to obtain the original value, so that the data receiving amount can be reduced, and the interface security can be improved; and the unique mapping mode ensures that the plain text can not be attacked and is safer.
The embodiment of the invention also provides an electronic device, which can be a terminal or a server, as shown in fig. 8, and comprises a processor 81, a communication interface 82, a memory 83 and a communication bus 84, wherein the processor 81, the communication interface 82 and the memory 83 complete communication with each other 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 execute the program stored in the memory 83, thereby implementing the following steps:
according to the attribute characteristics, sub-character string combinations in the character strings are obtained, wherein the sub-character string combinations comprise: a first sub-string combination conforming to the first attribute feature and/or a second sub-string combination conforming to the second attribute feature;
acquiring a first mapping relation and/or a second mapping relation;
according to the first mapping relation, mapping replacement is carried out on the first sub-string combination, and/or according to the second mapping relation, mapping replacement is carried out on the second sub-string combination, so that a target string is formed;
and sending the target character string.
Optionally, the obtaining the first mapping relationship and/or the second mapping relationship includes:
each interval is a first preset duration, and request information for acquiring a first mapping relation and/or a second mapping relation is sent to a first server;
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, a priority of mapping replacement is positively correlated with a length of a 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, according to a first mapping relationship, mapping replacement is performed on the first sub-string combination to form a target string, including:
and according to the first mapping relation, mapping and replacing the first sub-string combination, and adding a first identifier between adjacent sub-strings after mapping and replacing to form a target string.
Optionally, according to a second mapping relationship, mapping replacement is performed on the second sub-string combination to form a target string, including:
and according to the second mapping relation, carrying out mapping replacement on the second sub-string combination, and adding a second identifier between adjacent sub-strings after mapping replacement to form a target string.
When the electronic device is a first server, the processor 81 is configured to execute the program stored in the memory 83, thereby implementing the following steps:
acquiring historical data of a Uniform Resource Locator (URL) every second preset time length;
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 substrings with hit rates meeting preset conditions;
generating a first mapping relation according to the substrings with hit rates meeting preset conditions and conforming to 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 characteristics.
Optionally, the sending the first mapping relationship and/or the second mapping relationship to the terminal includes:
receiving request information which is sent by the terminal and used for acquiring the first mapping relation and/or the second mapping relation;
and according to the request information, the latest generated first mapping relation and/or second mapping relation is/are sent to the terminal.
When the electronic device is a second server, the processor 81 is configured to execute the program stored in the memory 83, thereby implementing 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 feature.
Optionally, the decompressing processing is performed on 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, where the decompressing processing includes:
according to the first mapping relation, decompressing the sub-strings conforming to the first attribute characteristics in the target string to obtain a third sub-string combination conforming to the first attribute characteristics; and/or
And according to the first mapping relation, decompressing the sub-strings which accord with the second attribute characteristics in the target string to obtain a fourth sub-string combination which accords with the second attribute characteristics.
The communication bus mentioned by the above electronic device may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, or the like. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The memory may include random access memory (Random Access Memory, RAM) or 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 aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, a computer readable storage medium is provided, in which instructions are stored, which when run on a computer, cause the computer to perform the data processing method according to any of the above embodiments.
In a further embodiment of the present invention, a computer program product comprising instructions which, when run on a computer, causes the computer to perform the data processing method according to any of the above embodiments is also provided.
In the above embodiments, it may be implemented in whole or in part 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, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more 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)), etc.
It is noted that relational terms such as first and second, and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (15)

1. A data processing method applied to a terminal, comprising:
according to the attribute characteristics, sub-character string combinations in the character strings are obtained, wherein the sub-character string combinations comprise: a first sub-string combination conforming to the first attribute feature and/or a second sub-string combination conforming to the second attribute feature;
acquiring a first mapping relation and/or a second mapping relation;
according to the first mapping relation, mapping replacement is carried out on the first sub-string combination, and/or according to the second mapping relation, mapping replacement is carried out on the second sub-string combination, so that a target string is formed;
and sending the target character string.
2. The method according to claim 1, wherein the obtaining the first mapping relation and/or the second mapping relation comprises:
each interval is a first preset duration, and request information for acquiring a first mapping relation and/or a second mapping relation is sent to a first server;
And receiving the first mapping relation and/or the second mapping relation sent by the first server.
3. The method of claim 1, wherein in the step of mapping the first sub-string combination according to the first mapping relationship, a priority of mapping is positively correlated with a length of a sub-string in the first sub-string combination in the first mapping relationship.
4. The method of claim 1, wherein in the step of mapping the second sub-string combination according to the second mapping relationship, a priority of mapping is positively correlated with a length of a sub-string in the second sub-string combination in the second mapping relationship.
5. The method of claim 1, wherein mapping the first sub-string combination according to a first mapping relationship to form a target string comprises:
and according to the first mapping relation, mapping and replacing the first sub-string combination, and adding a first identifier between adjacent sub-strings after mapping and replacing to form a target string.
6. The method according to claim 1 or 5, wherein mapping the second sub-string combination according to a second mapping relationship to form a target string comprises:
And according to the second mapping relation, carrying out mapping replacement on the second sub-string combination, and adding a second identifier between adjacent sub-strings after mapping replacement to form a target string.
7. A data processing method applied to a first server, comprising:
acquiring historical data of a Uniform Resource Locator (URL) every second preset time length;
generating a first mapping relation and/or a second mapping relation according to the historical data; the first mapping relation is used for mapping and replacing the sub-character strings which accord with the first attribute characteristics in the character strings, and the second mapping relation is used for mapping and replacing the sub-character strings which accord with the second attribute characteristics in the character strings;
and sending the first mapping relation and/or the second mapping relation to a terminal.
8. The method according to claim 7, wherein generating the first mapping relation and/or the second mapping relation according to the history data comprises:
counting the hit rate of the substrings in the historical data, and acquiring substrings with hit rates meeting preset conditions;
generating a first mapping relation according to the substrings of which the hit rate meets a preset condition and accords with 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 characteristics.
9. The method of claim 7, wherein the sending the first mapping relationship and/or the second mapping relationship to the terminal comprises:
receiving request information which is sent by the terminal and used for acquiring the first mapping relation and/or the second mapping relation;
and according to the request information, the latest generated first mapping relation and/or second mapping relation is/are sent to the terminal.
10. A data processing method applied to a second server, comprising:
receiving a target character string sent by a terminal;
acquiring a first mapping relation and/or a second mapping relation;
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 feature;
the decompressing process is performed on 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 of at least one attribute feature, including:
according to the first mapping relation, decompressing the sub-strings conforming to the first attribute characteristics in the target string to obtain a third sub-string combination conforming to the first attribute characteristics; and/or
And according to the second mapping relation, decompressing the sub-strings conforming to the second attribute characteristics in the target string to obtain a fourth sub-string combination conforming to the second attribute characteristics.
11. A data processing apparatus, applied to a terminal, comprising:
the first obtaining module is configured to obtain a sub-string combination in the string according to the attribute feature, where the sub-string combination includes: a first sub-string combination conforming to the first attribute feature and/or a second sub-string combination conforming to the second attribute feature;
the second acquisition module is used for acquiring 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-string combination according to the first mapping relation and/or carrying out mapping replacement on the second sub-string combination according to the second mapping relation to form a target string;
and the first sending module is used for sending the target character string.
12. A data processing apparatus for use with a first server, comprising:
the third acquisition module is used for acquiring historical data of the Uniform Resource Locator (URL) every interval for a second preset duration;
The first generation module is used for generating a first mapping relation and/or a second mapping relation according to the historical data; the first mapping relation is used for mapping and replacing the sub-character strings which accord with the first attribute characteristics in the character strings, and the second mapping relation is used for mapping and replacing the sub-character strings which accord with the second attribute characteristics in the character strings;
and the second sending module is used for sending the first mapping relation and/or the second mapping relation to the terminal.
13. A data processing apparatus for use with a second server, comprising:
the first receiving module is used for receiving the target character string sent by the terminal;
the fourth acquisition module is used for acquiring the first mapping relation and/or the second mapping relation;
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 of at least one attribute characteristic;
the processing module comprises:
according to the first mapping relation, decompressing the sub-strings conforming to the first attribute characteristics in the target string to obtain a third sub-string combination conforming to the first attribute characteristics; and/or
And according to the second mapping relation, decompressing the sub-strings conforming to the second attribute characteristics in the target string to obtain a fourth sub-string combination conforming to the second attribute characteristics.
14. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the data processing method according to any one of claims 1 to 10 when executing a program stored on a memory.
15. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements a data processing method according to any one of claims 1-10.
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 CN112434231A (en) 2021-03-02
CN112434231B true 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)

Families Citing this family (2)

* 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
CN118708559B (en) * 2024-08-29 2024-12-06 深圳市华磊迅拓科技有限公司 3D model data storage method, device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6654741B1 (en) * 1999-05-03 2003-11-25 Microsoft Corporation URL mapping methods and systems
EP2208305B1 (en) * 2007-11-02 2017-12-13 Symbol Technologies, LLC Efficient encoding and decoding of mixed data strings in rfid tags and other media
US10133879B2 (en) * 2015-11-03 2018-11-20 International Business Machines Corporation Technique used in text analysis in a safe manner
US11294876B2 (en) * 2017-06-01 2022-04-05 Oracle International Corporation System and method for generating a multi dimensional data cube for analytics using a map-reduce program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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

Also Published As

Publication number Publication date
CN112434231A (en) 2021-03-02

Similar Documents

Publication Publication Date Title
CN110149373B (en) Data storage method, device, medium and server based on peer-to-peer network
CN110224999B (en) Information interaction method and device and storage medium
US11303617B2 (en) Methods and apparatuses for oblivious transfer using trusted environment
CN110263579B (en) Data processing method, system and related equipment
CN112434231B (en) Data processing method and device and electronic equipment
CN114830572A (en) Data transmission method, device, equipment, system and storage medium
CN112235104B (en) A data encryption transmission method, system, terminal and storage medium
CN112422494A (en) Data transmission method, data security verification method and data transmission system
CN112995199A (en) Data encoding and decoding method, device, transmission system, terminal equipment and storage medium
EP4531374A1 (en) Domain name encryption method, decryption method, and apparatus based on content delivery network
CN114785805A (en) Data transmission method and device, electronic equipment and storage medium
CN109309655B (en) Stateless communication security signature method, terminal and server
CN114157716B (en) Block chain-based data processing method and device and electronic equipment
CN105184559A (en) System and method for payment
CN104636377B (en) Data compression method and device
CN113420238A (en) Short link generation method, device, electronic device and storage medium
CN112803950A (en) Data compression method, device and equipment and computer storage medium
CN111931204A (en) Encryption and de-duplication storage method and terminal equipment for distributed system
CN114095037B (en) Application program updating method, updating data compression method, device and equipment
WO2021036189A1 (en) Rdma data sending and receiving methods, electronic device and readable storage medium
CN115329291A (en) Anti-crawler method, system, computer equipment and storage medium
CN111324914B (en) File transmission method, device, server, equipment and medium
CN115208677B (en) Malicious website identification method and device
CN110392016B (en) Method, device and system for preventing traffic from being hijacked
CN107800758B (en) Risk control data processing method, device and system

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