CN113609366A - Data acquisition method and device, terminal equipment and readable storage medium - Google Patents

Data acquisition method and device, terminal equipment and readable storage medium Download PDF

Info

Publication number
CN113609366A
CN113609366A CN202110891566.8A CN202110891566A CN113609366A CN 113609366 A CN113609366 A CN 113609366A CN 202110891566 A CN202110891566 A CN 202110891566A CN 113609366 A CN113609366 A CN 113609366A
Authority
CN
China
Prior art keywords
target
data
interface
ciphertext
data acquisition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110891566.8A
Other languages
Chinese (zh)
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.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch 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 Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN202110891566.8A priority Critical patent/CN113609366A/en
Publication of CN113609366A publication Critical patent/CN113609366A/en
Pending legal-status Critical Current

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/951Indexing; Web crawling techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems

Abstract

The application is applicable to the technical field of computers, and provides a data acquisition method, a data acquisition device, terminal equipment and a readable storage medium, wherein the method comprises the following steps: when a data acquisition request sent by a user is received, generating a target parameter ciphertext corresponding to an interface set, wherein the interface set comprises at least two data interfaces, and each data interface comprises a first target interface corresponding to the data acquisition request; sending the target parameter ciphertext to a server for verification; and when the target parameter ciphertext passes the verification, receiving the target data returned by the server. The problem that the prior anti-crawler technology is easy to crack can be solved to a certain extent.

Description

Data acquisition method and device, terminal equipment and readable storage medium
Technical Field
The present application belongs to the field of computer technologies, and in particular, to a data acquisition method, an apparatus, a terminal device, and a readable storage medium.
Background
With the rapid development of the internet, massive data exist on the internet. Crawler technology has emerged in order to crawl valuable data on various websites. At the same time, however, a wide variety of malicious crawler technologies have also been derived.
The malicious crawler technology not only occupies a large amount of website traffic and affects the access of users who really have needs, but also can cause the improper use of the key information of the website. Therefore, anti-crawler technology is essential for websites.
Currently, although there are various anti-crawler technologies, anti-crawler is implemented by, for example, User-Agent technology and IP restriction technology. However, these anti-crawler technologies are all easy to break.
Disclosure of Invention
The embodiment of the application provides a data acquisition method, a data acquisition device, terminal equipment and a readable storage medium, and can solve the problem that the existing anti-crawler technology is easy to crack to a certain extent.
In a first aspect, an embodiment of the present application provides a data obtaining method, which is applied to a client, and includes:
when a data acquisition request sent by a user is received, generating a target parameter ciphertext corresponding to an interface set, wherein the interface set comprises at least two data interfaces, and the data interfaces comprise first target interfaces corresponding to the data acquisition request;
sending the target parameter ciphertext to a server for verification;
and receiving the target data returned by the server when the target parameter ciphertext passes the verification.
Optionally, the generating of the target parameter ciphertext corresponding to the interface set includes:
acquiring initial parameter ciphertexts corresponding to the data interfaces in the interface set;
and arranging the initial parameter ciphertext according to a preset rule to obtain the target parameter ciphertext.
Optionally, before the obtaining the initial parameter ciphertext corresponding to each data interface in the interface set, the method further includes:
if a second target interface without the initial parameter ciphertext exists in the interface set, generating a preset number of random characters, and using the preset number of random characters as the initial parameter ciphertext of the second target interface.
Optionally, the obtaining of the initial parameter ciphertext corresponding to each data interface in the interface set includes:
acquiring parameter cleartext corresponding to each data interface in the interface set;
and encrypting the parameter plaintext of the data interface by adopting the encryption algorithm corresponding to each data interface to obtain an initial parameter ciphertext, wherein the encryption algorithms corresponding to the data interfaces are different.
Optionally, the method further comprises:
and periodically changing the key of the encryption algorithm corresponding to each upper data interface.
Optionally, the arranging the initial parameter ciphertext according to a preset rule to obtain the target parameter ciphertext includes:
arranging the initial parameter ciphertext according to a preset rule to obtain a random ciphertext;
and adding a check character to the random ciphertext to obtain a target parameter ciphertext, wherein the check character is used for checking the validity of the target parameter ciphertext.
Optionally, the content of the check character and/or the position of the check character on the random ciphertext is periodically changed.
In a second aspect, an embodiment of the present application provides another data acquisition method, which is applied to a server, and includes:
when a target parameter ciphertext corresponding to an interface set is received, verifying the target parameter ciphertext, wherein the interface set comprises at least two data interfaces, and each data interface comprises a first target interface corresponding to a data acquisition request;
if the target parameter ciphertext passes the verification, acquiring target data corresponding to the data acquisition request through the first target interface, and returning the target data to the client;
and if the target parameter ciphertext is not verified, not responding.
In a third aspect, an embodiment of the present application provides a data obtaining apparatus, which is applied to a client, and includes:
the system comprises a generating module, a sending module and a receiving module, wherein the generating module is used for generating a target parameter ciphertext corresponding to an interface set when receiving a data acquisition request sent by a user, the interface set comprises at least two data interfaces, and the data interfaces comprise a first target interface corresponding to the data acquisition request;
and the sending module is used for sending the target parameter ciphertext to a server for verification.
In a fourth aspect, an embodiment of the present application provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the first aspect when executing the computer program.
In a fifth aspect, the present application provides a computer-readable storage medium, where a computer program is stored, and the computer program, when executed by a processor, implements the steps of the first aspect and the second aspect.
In a sixth aspect, the present application provides a computer program product, which when run on a terminal device, causes the terminal device to execute the method in the first aspect and the second aspect.
It is understood that the beneficial effects of the second to sixth aspects can be seen from the description of the first aspect, and are not described herein again.
Compared with the prior art, the embodiment of the application has the advantages that:
the application provides a data acquisition method, which comprises the steps of firstly, generating a target parameter ciphertext corresponding to an interface set when a data acquisition request sent by a user is received, then sending the target parameter ciphertext to a server for verification, and receiving target data returned by the server when the target parameter ciphertext passes the verification. The target parameter ciphertext is the ciphertext corresponding to the interface set, and the interface set not only comprises the first target interface corresponding to the data acquisition request, but also comprises other data interfaces. Therefore, the target parameter ciphertext not only includes the parameter ciphertext of the first target interface, but also includes the parameter ciphertext of other data interfaces. In the cracking process, the parameter cryptograph of the first target interface can be interfered by the parameter cryptograph of the other data interface. Therefore, the crawler user is difficult to crack the target parameter ciphertext and recognize which characters in the target parameter ciphertext are the parameter ciphertext of the first target interface. Because the target parameter ciphertext is difficult to crack and the parameter ciphertext of the first target interface is difficult to identify, the crawler user is difficult to acquire data through the first target interface. Therefore, the anti-crawler scheme of the application is difficult to crack.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flowchart of a data acquisition method according to an embodiment of the present application;
FIG. 2 is a diagram illustrating an initial parameter ciphertext and a target parameter ciphertext according to an embodiment of the present application;
FIG. 3 is a diagram illustrating encryption of parameter plaintext according to an embodiment of the present application;
FIG. 4 is a diagram of a check character according to an embodiment of the present application;
FIG. 5 is a schematic flow chart diagram illustrating another data acquisition method according to an embodiment of the present application;
FIG. 6 is a schematic structural diagram of a data acquisition device according to an embodiment of the present application;
FIG. 7 is a schematic structural diagram of another data acquisition device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The data acquisition method provided by the embodiment of the application can be applied to terminal devices such as a mobile phone, a tablet computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), and the like, and the embodiment of the application does not limit the specific types of the terminal devices.
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
Example one
A data obtaining method provided in an embodiment of the present application is described below, where the method is applied to a client, please refer to fig. 1, and the method includes:
step S101, when a data acquisition request sent by a user is received, a target parameter ciphertext corresponding to an interface set is generated, the interface set comprises at least two data interfaces, and the data interfaces comprise first target interfaces corresponding to the data acquisition request.
The anti-crawler system comprises a client and a server, interaction is carried out between the client and the server through a unified interface, a plurality of data interfaces exist in the server, and the server can acquire data through each data interface. The data interface refers to an interface for outputting data when transmitting data.
When the user wants to acquire data from the server, the user can operate the client. For example, the user may operate the interactive interface of the client, and the interactive interface may exist in the form of a touch screen, a liquid crystal display, a button, a keyboard, a mouse, and the like.
When the client detects the operation of the user, the client may receive a data acquisition request in response to the operation of the user.
When receiving a data acquisition request, a client generates a target parameter ciphertext corresponding to an interface set, wherein the interface set comprises at least two data interfaces, and each data interface comprises a first target interface corresponding to the data acquisition request.
The target parameter ciphertext is the ciphertext corresponding to the interface set, and the interface set not only comprises the first target interface corresponding to the data acquisition request, but also comprises other data interfaces. Therefore, the target parameter ciphertext may include not only the parameter ciphertext of the first target interface, but also the parameter ciphertext of other data interfaces (for example, when the interface set includes two data interfaces, the parameter ciphertext of data interface 1 is ABC, the number of bits of the parameter ciphertext of data interface 2 is and2, and the target parameter ciphertext may be abcind 2.).
Therefore, in the cracking process, the parameter ciphertexts of other data interfaces can interfere with the parameter ciphertexts of the first target interface. Therefore, the crawler user is difficult to crack the target parameter ciphertext and recognize which characters in the target parameter ciphertext are the parameter ciphertext of the first target interface. Because the target parameter ciphertext is difficult to crack and the parameter ciphertext of the first target interface is difficult to identify, the crawler user is difficult to acquire data through the first target interface.
It should be noted that the target parameter ciphertext generated by the client at each time may be different. For example, the client receives the data acquisition request at time a and generates a target parameter ciphertext corresponding to the interface set as abcard 2, and the client receives the data acquisition request at time B and generates a target parameter ciphertext corresponding to the interface set as and2 ABC. Because the target parameter ciphertext generated by the client at each time is different, the last target parameter ciphertext is an invalid ciphertext at the current time, and therefore, the current crawler user cannot acquire data according to the target parameter ciphertext. And because the target parameter ciphertext is the ciphertext corresponding to the interface set, even if the crawler user cracks the last target parameter ciphertext, the crawler user is difficult to crack the current target parameter ciphertext according to the last target parameter ciphertext, and thus the cracking difficulty is further increased.
And S102, sending the target parameter ciphertext to a server for verification.
And after generating the target parameter ciphertext, the client sends the target parameter ciphertext to the server through the unified interface. And after receiving the target parameter ciphertext, the server checks the target parameter ciphertext. And if the verification is passed, the server acquires target data corresponding to the data acquisition request through the first target interface and returns the target data to the client through the uniform interface, so that the client receives the target data.
And step S103, receiving the target data returned by the server when the target parameter ciphertext passes the verification.
After the client sends the target parameters to the server for verification, if the verification is passed, the client can receive the target data returned by the server.
In summary, the present application provides a data acquisition method, which includes, first, generating a target parameter ciphertext corresponding to an interface set when a data acquisition request sent by a user is received, then sending the target parameter ciphertext to a server for verification, and receiving target data returned by the server when the target parameter ciphertext passes the verification. The target parameter ciphertext is the ciphertext corresponding to the interface set, and the interface set not only comprises the first target interface corresponding to the data acquisition request, but also comprises other data interfaces. Therefore, the target parameter ciphertext not only includes the parameter ciphertext of the first target interface, but also includes the parameter ciphertext of other data interfaces. In the cracking process, the parameter cryptograph of the first target interface can be interfered by the parameter cryptograph of the other data interface. Therefore, the crawler user is difficult to crack the target parameter ciphertext and recognize which characters in the target parameter ciphertext are the parameter ciphertext of the first target interface. Because the target parameter ciphertext is difficult to crack and the parameter ciphertext of the first target interface is difficult to identify, the crawler user is difficult to acquire data through the first target interface. Therefore, the anti-crawler scheme of the application is difficult to crack.
In some embodiments, generating a target parameter ciphertext corresponding to the interface set includes: and acquiring initial parameter ciphertexts corresponding to the data interfaces in the interface set, and arranging the initial parameter ciphertexts according to a preset rule to obtain a target parameter cipher text.
In this embodiment, the client first obtains the initial parameter ciphertexts corresponding to each data interface in the interface set, and then arranges the initial parameter ciphertexts according to a preset rule to obtain the target parameter ciphertexts. For example, the interface set includes 7 data interfaces, each data interface has a corresponding initial parameter ciphertext, and after the initial parameter ciphertexts are arranged according to a preset rule, an obtained target parameter ciphertext may be as shown in fig. 2.
And arranging the initial parameter ciphertext according to a preset rule, thereby further increasing the difficulty of identifying which characters in the target parameter ciphertext are the parameter ciphertext of the first target interface.
In other embodiments, the specific process of the client obtaining the initial parameter ciphertext corresponding to each data interface in the interface set may be as follows: and acquiring parameter plaintexts corresponding to each data interface in the interface set, and encrypting the parameter plaintexts of the data interface by adopting an encryption algorithm corresponding to the data interface to obtain an initial parameter ciphertext. For example, as shown in FIG. 3 (z)nRepresenting the initial parameter ciphertext, fnRepresenting a cryptographic function, xnRepresenting the parameter plaintext, ynRepresenting a key, n-1, 2,3,4,5,6, 7).
Also, the encryption algorithms of the respective data interfaces may be different. Or the key of each encryption algorithm can be periodically changed, so that the cracking difficulty of the target parameter ciphertext is further increased.
It should be noted that the target parameter ciphertext generated by the client at each time is different, and the sequence of the characters of each initial parameter ciphertext in the target parameter ciphertext may be different, so that the target parameter ciphertext is different. Or, the content of the character of the initial parameter ciphertext may be changed, so that the target parameter ciphertext is different. For the actual situation, the setting can be performed according to the actual situation, and the application is not specifically limited herein.
In other embodiments, if a second target interface without the initial parameter ciphertext is present in the interface set, the client generates a preset number of random characters, and uses the preset number of random characters as the initial parameter ciphertext of the second target interface. Therefore, each data interface in the interface set has a corresponding initial parameter ciphertext.
In other embodiments, in order to improve the efficiency of the server in checking the target parameter ciphertext, the client sets a check character in the target parameter ciphertext, so that when the server receives the target parameter ciphertext, the server can first judge the validity of the target parameter ciphertext according to the check character. Therefore, in this embodiment, the client may first arrange the initial parameter ciphertext according to a preset rule to obtain a random ciphertext, and then add the check character to the random ciphertext to obtain the target parameter ciphertext, for example, as shown in fig. 4.
In order to increase the difficulty of cracking the target parameter ciphertext, the client side can also periodically change the content of the check character and/or the position of the check character on the random ciphertext. For example, if the 5 th bit character in the previous target parameter dense text is check character 7, the 8 th bit character in the current target parameter dense text is check character 7, or the 5 th bit character in the current target parameter dense text is check character 9, or the 8 th bit character in the current target parameter dense text is check character 9.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Example two
A data obtaining method provided in the second embodiment of the present application is described below, and the method is applied to a server, please refer to fig. 5, where the method includes:
s501, when a target parameter ciphertext corresponding to an interface set is received, the target parameter ciphertext is verified, the interface set comprises at least two data interfaces, and each data interface comprises a first target interface corresponding to a data acquisition request.
Since the protocols are set in advance at the server and the client, respectively. Therefore, when the server receives the target parameter ciphertext corresponding to the interface set, the server can check the target parameter ciphertext according to the protocol. And according to the protocol, the server can determine which characters in the target parameter ciphertext are valid ciphertexts, and then determine the first target interface according to the valid ciphertexts.
And S502, if the target parameter ciphertext passes the verification, acquiring target data corresponding to the data acquisition request through the first target interface, and returning the target data to the client.
And when the target parameter ciphertext passes the verification, the server acquires target data corresponding to the data acquisition request through the first target interface, returns the target data to the client through the unified interface, and the client acquires the target data.
And S503, if the target parameter ciphertext check is not passed, no response is carried out.
And if the first target parameter is not checked, the data acquisition request is an abnormal request, and the server does not respond.
In the related art, data is generally stored in a certain storage module in a server. At this time, if the server accesses the storage module through the data interface 1, the server may not access the storage module through the data interface 2, resulting in inefficient data acquisition. Therefore, in order to improve the efficiency of data acquisition, the storage module is divided into a first preset number of sub-storage modules, and then the same type of data is stored in one sub-storage module. At this time, when the data corresponding to each data acquisition request is different, the server may respond to each data acquisition request at the same time. Thereby improving the efficiency of data acquisition.
For example, the server receives two target parameter ciphertexts and the two target parameter ciphertexts both pass verification, an effective cipher text in one target parameter cipher text is a parameter cipher text of the data interface 1, an effective cipher text in the other target parameter cipher text is a parameter cipher text of the data interface 2, the data stored in the first sub-module is data needing payment, and the data stored in the second sub-module is recharging service data. The server can obtain the data of the recharge service through the data interface 2 while obtaining the data for which payment is needed through the data interface 1.
To sum up, the present application provides a data acquisition method, and first, when receiving a target parameter ciphertext corresponding to an interface set, a server checks the target parameter ciphertext. And if the target parameter ciphertext passes the verification, the server acquires the target data corresponding to the data acquisition request through the first target interface and returns the target data to the client, and if the target parameter ciphertext does not pass the verification, the server does not respond. The target parameter ciphertext is the ciphertext corresponding to the interface set, and the interface set not only comprises the first target interface corresponding to the data acquisition request, but also comprises other data interfaces. Therefore, the target parameter ciphertext not only includes the parameter ciphertext of the first target interface, but also includes the parameter ciphertext of other data interfaces. In the cracking process, the parameter cryptograph of the first target interface can be interfered by the parameter cryptograph of the other data interface. Therefore, the crawler user is difficult to crack the target parameter ciphertext and recognize which characters in the target parameter ciphertext are the parameter ciphertext of the first target interface. Because the target parameter ciphertext is difficult to crack and the parameter ciphertext of the first target interface is difficult to identify, the crawler user is difficult to acquire data through the first target interface. Therefore, the anti-crawler scheme of the application is difficult to crack.
EXAMPLE III
Fig. 6 shows an example of a data acquisition apparatus, and for convenience of explanation, only the portions related to the embodiments of the present application are shown. The apparatus 600 comprises:
the generating module 601 is configured to generate a target parameter ciphertext corresponding to an interface set when a data acquisition request sent by a user is received, where the interface set includes at least two data interfaces, and the data interface includes a first target interface corresponding to the data acquisition request.
A sending module 602, configured to send the target parameter ciphertext to a server for verification;
and the receiving module 603 is configured to receive the target data returned by the server when the target parameter ciphertext passes the check.
Optionally, the generating module 601 is specifically configured to perform:
acquiring initial parameter ciphertexts corresponding to the data interfaces in the interface set;
and arranging the initial parameter ciphertext according to a preset rule to obtain a target parameter ciphertext.
Optionally, the apparatus 600 further comprises:
and the random character generation module is used for generating a preset number of random characters if a second target interface without the initial parameter ciphertext exists in the interface set, and taking the preset number of random characters as the initial parameter ciphertext of the second target interface.
Optionally, the generating module 601 is specifically configured to perform:
acquiring parameter cleartexts corresponding to the data interfaces in the interface set;
and encrypting the parameter plaintext of the data interface by adopting the encryption algorithm corresponding to each data interface to obtain an initial parameter ciphertext, wherein the encryption algorithms corresponding to the data interfaces are different.
Optionally, the key of the encryption algorithm corresponding to each data interface is periodically changed.
Optionally, the generating module 601 is specifically configured to perform:
arranging the initial parameter ciphertext according to a preset rule to obtain a random ciphertext;
and adding the check character to the random ciphertext to obtain a target parameter ciphertext, wherein the check character is used for checking the validity of the target parameter ciphertext.
Optionally, the content of the check character and/or the position of the check character on the random ciphertext is periodically changed.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the method embodiment of the present application, and specific reference may be made to a part of the method embodiment, which is not described herein again.
Example four
Fig. 7 shows an example of a data acquisition apparatus, and for convenience of explanation, only the portions related to the embodiments of the present application are shown. The apparatus 700 comprises:
the verification module 701 is configured to verify a target parameter ciphertext when receiving the target parameter ciphertext corresponding to an interface set, where the interface set includes at least two data interfaces, and the data interface includes a first target interface corresponding to a data acquisition request.
A response module 702, configured to, if the target parameter ciphertext passes the verification, obtain target data corresponding to the data obtaining request through the first target interface, and return the target data to the client; and if the target parameter ciphertext is not verified, no response is carried out.
EXAMPLE five
Fig. 8 is a schematic diagram of a terminal device provided in the third embodiment of the present application. As shown in fig. 8, the terminal apparatus 800 of this embodiment includes: a processor 801, a memory 802, and a computer program 803 stored in the memory 802 and operable on the processor 801. The steps in the various method embodiments described above are implemented when the processor 801 described above executes the computer program 803 described above. Alternatively, the processor 801 implements the functions of the modules/units in the device embodiments when executing the computer program 803.
Illustratively, the computer program 803 may be divided into one or more modules/units, which are stored in the memory 802 and executed by the processor 801 to complete the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 803 in the terminal device 800. For example, the computer program 803 may be divided into a generation module and a transmission module, and the specific functions of the modules are as follows:
when a data acquisition request sent by a user is received, a target parameter ciphertext corresponding to an interface set is generated, the interface set comprises at least two data interfaces, and the data interfaces comprise first target interfaces corresponding to the data acquisition request.
Sending the target parameter ciphertext to a server for verification;
and when the target parameter ciphertext passes the verification, receiving the target data returned by the server.
The terminal device may include, but is not limited to, a processor 801 and a memory 802. Those skilled in the art will appreciate that fig. 8 is merely an example of a terminal device 800 and does not constitute a limitation of terminal device 800 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the terminal device may also include input-output devices, network access devices, buses, etc.
The Processor 801 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware card, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 802 may be an internal storage unit of the terminal device 800, such as a hard disk or a memory of the terminal device 800. The memory 802 may also be an external storage device of the terminal device 800, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 800. Further, the memory 802 may include both an internal storage unit and an external storage device of the terminal device 800. The memory 802 is used for storing the computer program and other programs and data required by the terminal device. The memory 802 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the apparatus may be divided into different functional units or modules to implement all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the above modules or units is only one logical function division, and there may be other division manners in actual implementation, for example, a plurality of units or plug-ins may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units described above, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the above method embodiments may be implemented by a computer program, which may be stored in a computer readable storage medium and executed by a processor, so as to implement the steps of the above method embodiments. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer readable medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signal, telecommunication signal, software distribution medium, etc. It should be noted that the computer readable medium described above may include content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media that does not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A data acquisition method is applied to a client and comprises the following steps:
when a data acquisition request sent by a user is received, generating a target parameter ciphertext corresponding to an interface set, wherein the interface set comprises at least two data interfaces, and the data interfaces comprise a first target interface corresponding to the data acquisition request;
sending the target parameter ciphertext to a server for verification;
and receiving the target data returned by the server when the target parameter ciphertext passes the verification.
2. The data acquisition method according to claim 1, wherein the generating of the target parameter ciphertext corresponding to the interface set includes:
acquiring initial parameter ciphertexts corresponding to the data interfaces in the interface set;
and arranging the initial parameter ciphertext according to a preset rule to obtain the target parameter ciphertext.
3. The data acquisition method according to claim 2, wherein before the acquiring of the initial parameter cryptograph corresponding to each data interface in the interface set, the method further comprises:
if a second target interface without the initial parameter ciphertext exists in the interface set, generating a preset number of random characters, and using the preset number of random characters as the initial parameter ciphertext of the second target interface.
4. The data acquisition method according to claim 2, wherein the acquiring of the initial parameter cryptograph corresponding to each data interface in the interface set includes:
acquiring parameter cleartexts corresponding to the data interfaces in the interface set;
and encrypting the parameter plain text of the data interface by adopting the encryption algorithm corresponding to each data interface to obtain an initial parameter cipher text, wherein the encryption algorithms corresponding to the data interfaces are different.
5. The data acquisition method as set forth in claim 4, further comprising:
and periodically changing the key of the encryption algorithm corresponding to each data interface.
6. The data acquisition method as claimed in any one of claims 2 to 5, wherein the arranging the initial parameter ciphertext according to a preset rule to obtain the target parameter ciphertext comprises:
arranging the initial parameter ciphertext according to a preset rule to obtain a random ciphertext;
and adding a check character to the random ciphertext to obtain a target parameter ciphertext, wherein the check character is used for checking the validity of the target parameter ciphertext.
7. The data acquisition method as set forth in claim 6, further comprising:
periodically changing the content of the check character and/or the position of the check character on the random ciphertext.
8. A data acquisition method is applied to a server and comprises the following steps:
when a target parameter ciphertext corresponding to an interface set is received, verifying the target parameter ciphertext, wherein the interface set comprises at least two data interfaces, and each data interface comprises a first target interface corresponding to a data acquisition request;
if the target parameter ciphertext passes the verification, acquiring target data corresponding to the data acquisition request through the first target interface, and returning the target data to the client;
and if the target parameter ciphertext is not verified, not responding.
9. A data acquisition device is applied to a client and comprises:
the device comprises a generating module, a sending module and a receiving module, wherein the generating module is used for generating a target parameter ciphertext corresponding to an interface set when receiving a data acquisition request sent by a user, the interface set comprises at least two data interfaces, and the data interfaces comprise a first target interface corresponding to the data acquisition request;
the sending module is used for sending the target parameter ciphertext to a server for verification;
and the receiving module is used for receiving the target data returned by the server when the target parameter ciphertext passes the verification.
10. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1-7 or 8 when executing the computer program.
CN202110891566.8A 2021-08-04 2021-08-04 Data acquisition method and device, terminal equipment and readable storage medium Pending CN113609366A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110891566.8A CN113609366A (en) 2021-08-04 2021-08-04 Data acquisition method and device, terminal equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110891566.8A CN113609366A (en) 2021-08-04 2021-08-04 Data acquisition method and device, terminal equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN113609366A true CN113609366A (en) 2021-11-05

Family

ID=78339486

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110891566.8A Pending CN113609366A (en) 2021-08-04 2021-08-04 Data acquisition method and device, terminal equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113609366A (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105721154A (en) * 2014-12-05 2016-06-29 航天信息股份有限公司 Encryption protection method based on Android platform communication interface
CN107483563A (en) * 2017-07-31 2017-12-15 九次方大数据信息集团有限公司 The data query method and apparatus and client and server of anti-reptile
WO2018157858A1 (en) * 2017-03-03 2018-09-07 腾讯科技(深圳)有限公司 Information storage method, device, and computer-readable storage medium
CN109255246A (en) * 2018-08-14 2019-01-22 平安普惠企业管理有限公司 Interface parameters encryption method, device, computer equipment and storage medium
CN109857479A (en) * 2018-12-14 2019-06-07 平安科技(深圳)有限公司 Interface data processing method, device, computer equipment and storage medium
CN110287037A (en) * 2019-05-20 2019-09-27 平安科技(深圳)有限公司 Distributed intelligence API asynchronism callback method and device
CN111314306A (en) * 2020-01-17 2020-06-19 网易(杭州)网络有限公司 Interface access method and device, electronic equipment and storage medium
CN111817845A (en) * 2019-04-11 2020-10-23 亿度慧达教育科技(北京)有限公司 Anti-crawler method and computer storage medium
WO2020237868A1 (en) * 2019-05-24 2020-12-03 平安科技(深圳)有限公司 Data transmission method, electronic device, server and storage medium
CN112217788A (en) * 2020-09-01 2021-01-12 国网福建省电力有限公司三明供电公司 Encryption method and system for Web interface data
CN112214270A (en) * 2020-09-18 2021-01-12 北京鸿腾智能科技有限公司 Page redrawing method, device, equipment and storage medium
CN112688919A (en) * 2020-12-11 2021-04-20 杭州安恒信息技术股份有限公司 APP interface-based crawler-resisting method, device and medium
CN112804269A (en) * 2021-04-14 2021-05-14 中建电子商务有限责任公司 Method for realizing website interface anti-crawler
CN112948851A (en) * 2021-02-25 2021-06-11 深圳壹账通智能科技有限公司 User authentication method, device, server and storage medium

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105721154A (en) * 2014-12-05 2016-06-29 航天信息股份有限公司 Encryption protection method based on Android platform communication interface
WO2018157858A1 (en) * 2017-03-03 2018-09-07 腾讯科技(深圳)有限公司 Information storage method, device, and computer-readable storage medium
CN107483563A (en) * 2017-07-31 2017-12-15 九次方大数据信息集团有限公司 The data query method and apparatus and client and server of anti-reptile
CN109255246A (en) * 2018-08-14 2019-01-22 平安普惠企业管理有限公司 Interface parameters encryption method, device, computer equipment and storage medium
CN109857479A (en) * 2018-12-14 2019-06-07 平安科技(深圳)有限公司 Interface data processing method, device, computer equipment and storage medium
CN111817845A (en) * 2019-04-11 2020-10-23 亿度慧达教育科技(北京)有限公司 Anti-crawler method and computer storage medium
WO2020233012A1 (en) * 2019-05-20 2020-11-26 平安科技(深圳)有限公司 Distributed smart api asynchronous callback method, device, client terminal, service terminal, and storage medium
CN110287037A (en) * 2019-05-20 2019-09-27 平安科技(深圳)有限公司 Distributed intelligence API asynchronism callback method and device
WO2020237868A1 (en) * 2019-05-24 2020-12-03 平安科技(深圳)有限公司 Data transmission method, electronic device, server and storage medium
CN111314306A (en) * 2020-01-17 2020-06-19 网易(杭州)网络有限公司 Interface access method and device, electronic equipment and storage medium
CN112217788A (en) * 2020-09-01 2021-01-12 国网福建省电力有限公司三明供电公司 Encryption method and system for Web interface data
CN112214270A (en) * 2020-09-18 2021-01-12 北京鸿腾智能科技有限公司 Page redrawing method, device, equipment and storage medium
CN112688919A (en) * 2020-12-11 2021-04-20 杭州安恒信息技术股份有限公司 APP interface-based crawler-resisting method, device and medium
CN112948851A (en) * 2021-02-25 2021-06-11 深圳壹账通智能科技有限公司 User authentication method, device, server and storage medium
CN112804269A (en) * 2021-04-14 2021-05-14 中建电子商务有限责任公司 Method for realizing website interface anti-crawler

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李浪等: "网络安全与密码技术导论", 30 September 2015, 华中科技大学出版社, pages: 194 - 198 *

Similar Documents

Publication Publication Date Title
CN110336774B (en) Mixed encryption and decryption method, equipment and system
CN112333198B (en) Secure cross-domain login method, system and server
US9641340B2 (en) Certificateless multi-proxy signature method and apparatus
CN104284213A (en) Hotlink protection method, client side and system
CN112039826B (en) Login method and device applied to applet end, electronic equipment and readable medium
CN109981576B (en) Key migration method and device
CN109347865B (en) User data authentication and evidence storage method and system based on block chain technology
CN112131564A (en) Encrypted data communication method, apparatus, device, and medium
CN110708335A (en) Access authentication method and device and terminal equipment
US11949688B2 (en) Securing browser cookies
CN111367923A (en) Data processing method, data processing device, node equipment and storage medium
CN106411520B (en) Method, device and system for processing virtual resource data
CN110035076B (en) Trusted access method, trusted client and server for energy Internet
CN114040411A (en) Equipment binding method and device, electronic equipment and storage medium
CN111368322B (en) File decryption method and device, electronic equipment and storage medium
CN111800390A (en) Abnormal access detection method, device, gateway equipment and storage medium
CN109547404B (en) Data acquisition method and server
CN116502189A (en) Software authorization method, system, device and storage medium
CN110602218A (en) Method and related device for assembling cloud service in user-defined manner
CN116248351A (en) Resource access method and device, electronic equipment and storage medium
CN113609366A (en) Data acquisition method and device, terminal equipment and readable storage medium
CN113946862A (en) Data processing method, device and equipment and readable storage medium
CN114117388A (en) Device registration method, device registration apparatus, electronic device, and storage medium
CN112053159A (en) Transaction data verification method and device, risk control server and business server
CN110166226B (en) Method and device for generating secret key

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