CN107277050B - Data processing method, server, terminal and computer readable storage medium - Google Patents

Data processing method, server, terminal and computer readable storage medium Download PDF

Info

Publication number
CN107277050B
CN107277050B CN201710624080.1A CN201710624080A CN107277050B CN 107277050 B CN107277050 B CN 107277050B CN 201710624080 A CN201710624080 A CN 201710624080A CN 107277050 B CN107277050 B CN 107277050B
Authority
CN
China
Prior art keywords
target
data stream
feature code
terminal
target file
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
CN201710624080.1A
Other languages
Chinese (zh)
Other versions
CN107277050A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201710624080.1A priority Critical patent/CN107277050B/en
Publication of CN107277050A publication Critical patent/CN107277050A/en
Application granted granted Critical
Publication of CN107277050B publication Critical patent/CN107277050B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/126Applying verification of the received information the source of the received data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • H04L63/1466Active attacks involving interception, injection, modification, spoofing of data unit addresses, e.g. hijacking, packet injection or TCP sequence number attacks

Abstract

The invention relates to the technical field of communication, and provides a data processing method, a server, a terminal and a computer readable storage medium, which are used for solving the problem that the existing network hijacking prevention method causes the slow communication speed between the terminal and the server. The data processing method of the invention comprises the following steps: receiving an access request of a terminal to a target file; acquiring a target data stream corresponding to the target file according to the access request, wherein the target data stream comprises a preset target feature code and a data stream of the target file; and sending the target data stream to the terminal so that the terminal reads the data stream of the target file after verifying the target feature code. Therefore, when the terminal acquires the data stream of the target file, network connection with the server does not need to be reestablished, and the communication speed between the terminal and the server is improved.

Description

Data processing method, server, terminal and computer readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a data processing method, a server, a terminal, and a computer-readable storage medium.
Background
With the rapid development of the internet, the demand of users on the internet is increasing, and various network hijacking phenomena follow the demand. For example, a user downloads an application a, and finds that the application is an application B after the application is opened; and the user needs to visit the A website, and jumps to the B website after opening the A website, and the like. These phenomena are all phenomena of network hijacking.
At present, some coping means exist for the network hijacking phenomenon. Common approaches include: replacing ordinary http (Hypertext Transfer Protocol) with https (Secure Hypertext Transfer Protocol); and using a multi-request mode, carrying the feature code and the secondary request address in the primary request, so that the terminal accesses the secondary request address and checks the feature code. The method can produce certain effect on preventing the network hijacking, but simultaneously influences the communication speed of the terminal and the server.
Therefore, the existing network hijack prevention method causes the slow communication speed between the terminal and the server.
Disclosure of Invention
The embodiment of the invention provides a data processing method, a server, a terminal and a computer readable storage medium, which are used for solving the problem of low communication speed between the terminal and the server caused by the existing network hijacking prevention method.
In a first aspect, an embodiment of the present invention provides a data processing method, which is applied to a server, and the data processing method includes:
receiving an access request of a terminal to a target file;
acquiring a target data stream corresponding to the target file according to the access request, wherein the target data stream comprises a preset target feature code and a data stream of the target file;
and sending the target data stream to the terminal so that the terminal reads the data stream of the target file after verifying the target feature code.
In a second aspect, an embodiment of the present invention provides a server, including:
the receiving module is used for receiving an access request of a terminal to a target file;
an obtaining module, configured to obtain a target data stream corresponding to the target file according to the access request received by the receiving module, where the target data stream includes a preset target feature code and a data stream of the target file;
and the sending module is used for sending the target data stream acquired by the acquiring module to the terminal so as to read the data stream of the target file after the terminal verifies the target feature code.
In a third aspect, an embodiment of the present invention further provides another server, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps in the data processing method as described above when executing the computer program.
In a fourth aspect, an embodiment of the present invention further provides another data processing method, which is applied to a terminal, and includes:
sending an access request for a target file to a server;
receiving a target data stream sent by the server according to the access request, wherein the target data stream comprises a preset target feature code and a data stream of a target file;
acquiring the target feature code, and checking the target feature code;
and if the target feature code is successfully verified, acquiring the data stream of the target file.
In a fifth aspect, an embodiment of the present invention provides a terminal, including:
the sending module is used for sending an access request to the target file to the server;
a receiving module, configured to receive a target data stream sent by the server according to the access request, where the target data stream includes a preset target feature code and a data stream of a target file;
the verification module is used for acquiring the target feature code received by the receiving module and verifying the target feature code;
and the obtaining module is used for obtaining the data stream of the target file if the verification module successfully verifies the target feature code.
In a sixth aspect, an embodiment of the present invention further provides another terminal, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps in the data processing method as described above when executing the computer program.
In a seventh aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when executed by a processor, the computer program implements the steps in the data processing method on the server side or implements the steps in the data processing method on the terminal side.
Thus, in the embodiment of the invention, the server receives the access request of the terminal to the target file; acquiring a target data stream corresponding to the target file according to the access request, wherein the target data stream comprises a preset target feature code and a data stream of the target file; and sending the target data stream to the terminal so that the terminal reads the data stream of the target file after verifying the target feature code. Therefore, when the terminal acquires the data stream of the target file, network connection with the server does not need to be reestablished, and the communication speed between the terminal and the server is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a flowchart of a data processing method on a server side according to an embodiment of the present invention;
fig. 2 is a flowchart of a data processing method at a terminal side according to an embodiment of the present invention;
FIG. 3 is one of the block diagrams of a server provided by the embodiments of the present invention;
fig. 4 is one of the structural diagrams of a terminal provided in the embodiment of the present invention;
fig. 5 is a structural diagram of a verification module in the terminal according to the embodiment of the present invention;
fig. 6 is a second structural diagram of a terminal according to an embodiment of the present invention;
fig. 7 is a third structural diagram of a terminal according to an embodiment of the present invention;
FIG. 8 is a second block diagram of a server according to an embodiment of the present invention;
fig. 9 is a fourth structural diagram of a terminal according to an embodiment of the present invention;
fig. 10 is a fifth structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of a data processing method provided by an embodiment of the present invention, and the data processing method of the present embodiment is applied to a server. As shown in fig. 1, the data processing method includes the steps of:
step 101, receiving an access request of a terminal to a target file.
The access request may be a download request or an access request to a web page. The terminal can send an access request to the server through the client to download the target file or access a webpage corresponding to the target file.
Step 102, obtaining a target data stream corresponding to the target file according to the access request, wherein the target data stream includes a preset target feature code and a data stream of the target file.
After receiving the access request, the server may search for the target file in the stored resource pool, and obtain a target data stream corresponding to the target file. Wherein the target data stream is a data stream comprising a preset target feature code and a source file. The target signature may be located at the head, tail, or other portion of the target data stream. Preferably, the target feature code may be provided at the head of the target data stream for easy reading of the target feature code. Therefore, the terminal can read the feature code first, verify the feature code and then read the data of the target file behind the feature code, and the implementation mode is simple.
For example, an installation package is a file with a length of L, and when the file is stored in the server, the file has a length of N + L, where N is the length of the target feature code. If such a file containing the feature code is used as it is, a format error may occur and the file cannot be analyzed. Therefore, the security of the target file can be improved by adding the target feature code to the target data stream so as to prevent network hijacking.
The target feature code can also be dynamically set, namely set through a client and exchanged through interaction between the client and the server. Thus, the security of the file can be further improved.
Step 103, sending the target data stream to the terminal, so that the terminal reads the data stream of the target file after verifying the target feature code.
When the step is implemented specifically, the server may send the target data stream to the terminal, so that the terminal obtains the target feature code in the target data stream and verifies the target feature code. If the verification is successful, the terminal can read the data stream of the target file, store the target file, or analyze the target file and display the target file as page information.
In addition, the server may also send the target feature code first, and send the data stream of the target file after the terminal successfully verifies the target feature code.
The terminal in the embodiment of the present invention may be a Mobile phone, a Computer, a Tablet Personal Computer (Tablet Personal Computer), a Laptop Computer (Laptop Computer), a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), a Wearable Device (Wearable Device), or the like.
The data processing method of the embodiment of the invention receives an access request of a terminal to a target file; acquiring a target data stream corresponding to the target file according to the access request, wherein the target data stream comprises a preset target feature code and a data stream of the target file; and sending the target data stream to the terminal so that the terminal reads the data stream of the target file after verifying the target feature code. Therefore, when the terminal acquires the data stream of the target file, network connection with the server does not need to be reestablished, and the communication speed between the terminal and the server is improved. And the target data stream contains the target feature code, so that the target file can be prevented from being hijacked.
Referring to fig. 2, fig. 2 is a flowchart of a data processing method according to an embodiment of the present invention. As shown in fig. 2, the data processing method applied to the terminal includes the following steps:
step 201, sending an access request for the target file to the server.
The access request may be a download request or an access request to a web page. The terminal can send an access request to the server through the client to download the target file or access a webpage corresponding to the target file.
Step 202, receiving a target data stream sent by the server according to the access request, wherein the target data stream includes a preset target feature code and a data stream of a target file.
The target data stream may include a preset target feature code and a data stream of the source file. The target signature code may be located at the head of the target data stream, or may be located at the tail or other locations. Preferably, the target feature code may be provided at the head of the target data stream for easy reading of the target feature code. Therefore, the terminal can read the feature code first, verify the feature code and then read the data of the target file behind the feature code, and the implementation mode is simple.
For example, an installation package is a file with a length of L, and when the file is stored in the server, the file has a length of N + L, where N is the length of the target feature code. If such a file containing the feature code is used as it is, a format error may occur and the file cannot be analyzed. Therefore, the security of the target file can be improved, and the phenomenon of network hijacking can be prevented. Therefore, the security of the target file can be improved by adding the target feature code to the target data stream so as to prevent network hijacking.
The target feature code can also be dynamically set, namely set through a client and exchanged through interaction between the client and the server. Thus, the security of the file can be further improved.
And 203, acquiring the target feature code and verifying the target feature code.
After the terminal acquires the target data stream, the terminal may first acquire the target feature code in the target data stream and verify the target feature code. During specific verification, whether the target feature code is the same as the preset verification code or not can be judged. If the target feature code is the same as the preset check code, the target feature code is checked successfully; and if the target feature code is different from the preset check code, the check fails.
Optionally, after the step of checking the target feature code, the method further includes: and if the target feature code is failed to be checked, discarding the data stream of the target file.
In this embodiment, if the verification of the target feature code fails, it may be determined that the target file is hijacked. At this time, the terminal may discard the data stream of the target file. Therefore, when the target file is hijacked, the data stream of the target file is not read, and the data security can be improved.
And 204, if the target feature code is successfully verified, acquiring the data stream of the target file.
After the target feature code is successfully verified, the data stream of the target file can be obtained after the target feature code is removed. For example, if the target data stream corresponding to the target file includes the N-bit signature and the data stream of the L-bit target file, the N-bit signature is located at the head of the data stream. If the verification of the N-bit feature code is successful, the data of the target file can be read from the (N + 1) -th bit, so that the data stream of the target file is obtained.
Optionally, when the access request is a download request, after the step of obtaining the data stream of the target file, the method further includes:
and storing the data stream of the target file as the target file.
In this embodiment, the terminal may obtain the data stream of the target file, and analyze the data stream of the target file, thereby obtaining the target file. Thus, the file downloading speed and the file downloading efficiency can be improved.
The terminal in the embodiment of the present invention may be a Mobile phone, a Computer, a Tablet Personal Computer (Tablet Personal Computer), a Laptop Computer (Laptop Computer), a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), a Wearable Device (Wearable Device), or the like.
The data processing method of the embodiment of the invention sends an access request to a target file to a server; receiving a target data stream sent by the server according to the access request, wherein the target data stream comprises a preset target feature code and a data stream of a target file; acquiring the target feature code, and checking the target feature code; and if the target feature code is successfully verified, acquiring the data stream of the target file. Therefore, when the terminal acquires the data stream of the target file, network connection with the server does not need to be reestablished, the communication speed between the terminal and the server is improved, and the loss of the server and the terminal is reduced. And the target data stream contains the target feature code, so that the target file can be prevented from being hijacked.
Referring to fig. 3, fig. 3 is a block diagram of a server according to an embodiment of the present invention, and as shown in fig. 3, a server 300 includes: a receiving module 301, an obtaining module 302 and a sending module 303. The receiving module 301 is connected to the obtaining module 302, and the obtaining module 302 is connected to the sending module 303.
A receiving module 301, configured to receive an access request from a terminal to a target file; an obtaining module 302, configured to obtain a target data stream corresponding to the target file according to the access request received by the receiving module 301, where the target data stream includes a preset target feature code and a data stream of the target file; a sending module 303, configured to send the target data stream obtained by the obtaining module 302 to the terminal, so that the terminal reads the data stream of the target file after verifying the target feature code.
Optionally, the target feature code is set in a header of the target data stream, and the access request is a download request.
The server 300 can implement each process implemented by the server in the method embodiment corresponding to fig. 1, and is not described herein again to avoid repetition.
The server 300 of the embodiment of the present invention receives an access request from a terminal to a target file; acquiring a target data stream corresponding to the target file according to the access request, wherein the target data stream comprises a preset target feature code and a data stream of the target file; and sending the target data stream to the terminal so that the terminal reads the data stream of the target file after verifying the target feature code. Therefore, when the terminal acquires the data stream of the target file, network connection with the server does not need to be reestablished, and the communication speed between the terminal and the server is improved. And the target data stream contains the target feature code, so that the target file can be prevented from being hijacked.
Referring to fig. 4, fig. 4 is a structural diagram of a terminal according to an embodiment of the present invention, and as shown in fig. 4, the terminal 400 includes: the device comprises a sending module 401, a receiving module 402, a checking module 403 and an obtaining module 404, wherein the sending module 401 is connected with the receiving module 402, the receiving module 402 is connected with the checking module 403, and the checking module 403 is connected with the obtaining module 404.
A sending module 401, configured to send an access request for a target file to a server; a receiving module 402, configured to receive a target data stream sent by the server according to the access request, where the target data stream includes a preset target feature code and a data stream of a target file; a checking module 403, configured to obtain the target feature code received by the receiving module 402, and check the target feature code; an obtaining module 404, configured to obtain a data stream of the target file if the verification module 403 succeeds in verifying the target feature code.
Optionally, as shown in fig. 5, the verification module 403 includes: a determining submodule 4031, configured to determine whether the target feature code is the same as a preset check code; a determining submodule 4032, configured to determine that the target feature code is successfully verified if the target feature code is the same as the preset verification code.
Optionally, as shown in fig. 6, the terminal 400 further includes: a discarding module 405, configured to discard the data stream of the target file if the verification of the target feature code fails.
Optionally, the target feature code is set in a header of the target data stream.
Optionally, as shown in fig. 7, the access request is a download request, and the terminal further includes: a storage module 406, configured to store the data stream of the target file acquired by the acquisition module 404 as a target file.
The terminal 400 can implement each process implemented by the terminal in the method embodiment corresponding to fig. 2, and is not described herein again to avoid repetition.
The terminal 400 of the embodiment of the present invention sends an access request for a target file to a server; receiving a target data stream sent by the server according to the access request, wherein the target data stream comprises a preset target feature code and a data stream of a target file; acquiring the target feature code, and checking the target feature code; and if the target feature code is successfully verified, acquiring the data stream of the target file. Therefore, when the terminal acquires the data stream of the target file, network connection with the server does not need to be reestablished, the communication speed between the terminal and the server is improved, and the loss of the server and the terminal is reduced. And the target data stream contains the target feature code, so that the target file can be prevented from being hijacked.
Referring to fig. 8, fig. 8 is a block diagram of a server according to an embodiment of the present invention, and as shown in fig. 8, a server 800 includes: at least one processor 801, memory 802, at least one network interface 804, and a user interface 803. The various components in server 800 are coupled together by a bus system 805. It is understood that the bus system 805 is used to enable communications among the components connected. The bus system 805 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 805 in fig. 8.
The user interface 803 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, track ball, touch pad, or touch screen, etc.).
It will be appreciated that the memory 802 in embodiments of the invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable Programmable ROM (EPROM), an Electrically Erasable Programmable ROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration, and not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous D RAM, SDRAM), Double Data Rate Synchronous Dynamic random access memory (ddr Data Rate SD RAM, ddr SDRAM), Enhanced Synchronous SD RAM (ESDRAM), Synchronous link Dynamic random access memory (Synchronous link D RAM, SLDRAM), and Direct memory bus random access memory (DRRAM). The memory 802 of the systems and methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 802 stores the following elements, executable modules or data structures, or a subset thereof, or an expanded set thereof: an operating system 8021 and application programs 8022.
The operating system 8021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application program 8022 includes various application programs, such as a Media Player (Media Player), a Browser (Browser), and the like, for implementing various application services. A program implementing a method according to an embodiment of the present invention may be included in application program 8022.
In the embodiment of the present invention, by calling the program or instruction stored in the memory 802, specifically, the program or instruction stored in the application program 8022, the processor 801 is configured to:
receiving an access request of a terminal to a target file; acquiring a target data stream corresponding to the target file according to the access request, wherein the target data stream comprises a preset target feature code and a data stream of the target file; and sending the target data stream to the terminal so that the terminal reads the data stream of the target file after verifying the target feature code.
The methods disclosed in the embodiments of the present invention described above may be implemented in the processor 801 or implemented by the processor 801. The processor 801 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 801. The Processor 801 may be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 802, and the processor 801 reads the information in the memory 802, and combines the hardware to complete the steps of the method.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the Processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
Optionally, the access request is a download request, and the target feature code is set in the header of the target data stream.
The server 800 can implement the processes implemented by the server in the foregoing embodiments, and in order to avoid repetition, the description is omitted here.
The server 800 in the embodiment of the present invention receives an access request to a target file from a terminal; acquiring a target data stream corresponding to the target file according to the access request, wherein the target data stream comprises a preset target feature code and a data stream of the target file; and sending the target data stream to the terminal so that the terminal reads the data stream of the target file after verifying the target feature code. Therefore, when the terminal acquires the data stream of the target file, network connection with the server does not need to be reestablished, and the communication speed between the terminal and the server is improved. And the target data stream contains the target feature code, so that the target file can be prevented from being hijacked.
Referring to fig. 9, fig. 9 is a structural diagram of a terminal provided in an embodiment of the present invention. As shown in fig. 9, terminal 900 includes: at least one processor 901, memory 902, at least one network interface 904, and a user interface 903. The various components in terminal 900 are coupled together by a bus system 905. It is understood that the bus system 905 is used to enable communications among the components. The bus system 905 includes a power bus, a control bus, and a status signal bus, in addition to a data bus. For clarity of illustration, however, the various buses are labeled in fig. 9 as bus system 905.
The user interface 903 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, track ball, touch pad, or touch screen, etc.).
It is to be understood that the memory 902 in embodiments of the present invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable Programmable ROM (EPROM), an Electrically Erasable Programmable ROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration, and not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous D RAM, SDRAM), Double Data Rate Synchronous Dynamic random access memory (ddr Data Rate SD RAM, ddr SDRAM), Enhanced Synchronous SD RAM (ESDRAM), Synchronous link Dynamic random access memory (Synchronous link D RAM, SLDRAM), and Direct memory bus random access memory (DRRAM). The memory 902 of the systems and methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 902 stores the following elements, executable modules or data structures, or a subset thereof, or an expanded set thereof: an operating system 9021 and application programs 9022.
The operating system 9021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is configured to implement various basic services and process hardware-based tasks. The application 9022 includes various applications, such as a Media Player (Media Player), a Browser (Browser), and the like, for implementing various application services. A program implementing the method of an embodiment of the present invention may be included in application 9022.
In the embodiment of the present invention, by calling a program or an instruction stored in the memory 902, specifically, a program or an instruction stored in the application 9022, the processor 901 is configured to: sending an access request for a target file to a server; receiving a target data stream sent by the server according to the access request, wherein the target data stream comprises a preset target feature code and a data stream of a target file; acquiring the target feature code, and checking the target feature code; and if the target feature code is successfully verified, acquiring the data stream of the target file.
The method disclosed in the above embodiments of the present invention may be applied to the processor 901, or implemented by the processor 901. The processor 901 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be implemented by integrated logic circuits of hardware or instructions in the form of software in the processor 901. The Processor 901 may be a general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 902, and the processor 901 reads the information in the memory 902, and completes the steps of the above method in combination with the hardware thereof.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the Processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
Optionally, the processor 901 is further configured to read the computer program and execute the following steps: judging whether the target feature code is the same as a preset check code or not; and if the target feature code is the same as the preset check code, determining that the target feature code is checked successfully.
Optionally, the processor 901 is further configured to read the computer program and execute the following steps: and if the target feature code is failed to be checked, discarding the data stream of the target file.
Optionally, the target feature code is set in a header of the target data stream.
Optionally, when the access request is a download request, the processor 901 is further configured to read the computer program and execute the following steps: and storing the data stream of the target file as the target file.
The terminal 900 can implement the processes implemented by the terminal in the foregoing embodiments, and in order to avoid repetition, the descriptions are omitted here.
The terminal 900 of the embodiment of the present invention sends an access request for a target file to a server; receiving a target data stream sent by the server according to the access request, wherein the target data stream comprises a preset target feature code and a data stream of a target file; acquiring the target feature code, and checking the target feature code; and if the target feature code is successfully verified, acquiring the data stream of the target file. Therefore, when the terminal acquires the data stream of the target file, network connection with the server does not need to be reestablished, the communication speed between the terminal and the server is improved, and the loss of the server and the terminal is reduced. And the target data stream contains the target feature code, so that the target file can be prevented from being hijacked.
Referring to fig. 10, fig. 10 is a block diagram of a terminal according to an embodiment of the present invention. Specifically, the terminal 1000 in fig. 10 may be a mobile phone, a tablet computer, a Personal Digital Assistant (PDA), or a vehicle-mounted computer.
As shown in fig. 10, terminal 1000 can include a Radio Frequency (RF) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a processor 1050, an audio circuit 1060, a communication module 1070, and a power supply 1080.
The input unit 1030 may be used, among other things, to receive numeric or character information input by a user and to generate signal inputs related to user settings and function control of the terminal 1000. Specifically, in the embodiment of the present invention, the input unit 1030 may include a touch panel 1031. The touch panel 1031, also referred to as a touch screen, may collect touch operations by a user (e.g., operations of the user on the touch panel 1031 by using any suitable object or accessory such as a finger or a stylus) thereon or nearby, and drive corresponding connection devices according to a preset program. Alternatively, the touch panel 1031 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts it to touch point coordinates, and sends the touch point coordinates to the processor 1050, and can receive and execute commands from the processor 1050. In addition, the touch panel 1031 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1031, the input unit 1030 may also include other input devices 1032, and the other input devices 1032 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, a joystick, etc.
Among other things, display unit 1040 can be used to display information input by a user or information provided to a user, as well as various menu interfaces of terminal 1000. The display unit 1040 may include a display panel 1041, and optionally, the display panel 1041 may be configured in the form of an LCD or an Organic Light-Emitting Diode (OLED).
It should be noted that the touch panel 1031 may cover the display panel 1041 to form a touch display screen, and when the touch display screen detects a touch operation thereon or nearby, the touch display screen is transmitted to the processor 1050 to determine the type of the touch event, and then the processor 1050 provides a corresponding visual output on the touch display screen according to the type of the touch event.
The touch display screen comprises an application program interface display area and a common control display area. The arrangement modes of the application program interface display area and the common control display area are not limited, and can be an arrangement mode which can distinguish two display areas, such as vertical arrangement, left-right arrangement and the like. The application interface display area may be used to display an interface of an application. Each interface may contain at least one interface element such as an icon and/or widget desktop control for an application. The application interface display area may also be an empty interface that does not contain any content. The common control display area is used for displaying controls with high utilization rate, such as application icons like setting buttons, interface numbers, scroll bars, phone book icons and the like. The touch screen is a flexible screen, and the two surfaces of the flexible screen are both pasted with the organic transparent conductive films of the carbon nanotubes.
Wherein the processor 1050 is a control center of the terminal 1000, connects various parts of the entire terminal using various interfaces and lines, and performs various functions of the terminal 1000 and processes data by running or executing software programs and/or modules stored in the first memory 1021 and calling data stored in the second memory 1022, thereby performing overall monitoring of the terminal 1000. Optionally, the processor 1050 may include one or more processing units.
In the embodiment of the present invention, the processor 1050 is configured to, by calling a software program and/or a module stored in the first memory 1021 and/or data stored in the second memory 1022: sending an access request for a target file to a server; receiving a target data stream sent by the server according to the access request, wherein the target data stream comprises a preset target feature code and a data stream of a target file; acquiring the target feature code, and checking the target feature code; and if the target feature code is successfully verified, acquiring the data stream of the target file.
Optionally, the processor 1050 is further configured to: judging whether the target feature code is the same as a preset check code or not; and if the target feature code is the same as the preset check code, determining that the target feature code is checked successfully.
Optionally, the processor 1050 is further configured to: and if the target feature code is failed to be checked, discarding the data stream of the target file.
Optionally, the processor 1050 is further configured to: the target feature code is arranged at the head of the target data stream.
Optionally, when the access request is a download request, the processor 1050 is further configured to: and storing the data stream of the target file as the target file.
Terminal 1000 can implement each process implemented by the terminal in the foregoing embodiments, and details are not described here to avoid repetition.
The terminal 1000 of the embodiment of the present invention sends an access request for a target file to a server; receiving a target data stream sent by the server according to the access request, wherein the target data stream comprises a preset target feature code and a data stream of a target file; acquiring the target feature code, and checking the target feature code; and if the target feature code is successfully verified, acquiring the data stream of the target file. Therefore, when the terminal acquires the data stream of the target file, network connection with the server does not need to be reestablished, the communication speed between the terminal and the server is improved, and the loss of the server and the terminal is reduced. And the target data stream contains the target feature code, so that the target file can be prevented from being hijacked.
Embodiments of the present invention also provide a computer-readable storage medium having stored thereon a computer program (instructions), which when executed by a processor, implement the steps of: receiving an access request of a terminal to a target file; acquiring a target data stream corresponding to the target file according to the access request, wherein the target data stream comprises a preset target feature code and a data stream of the target file; and sending the target data stream to the terminal so that the terminal reads the data stream of the target file after verifying the target feature code.
Optionally, the access request is a download request, and the target feature code is set in the header of the target data stream.
Alternatively, the program (instructions) when executed by a processor implement the steps of: sending an access request for a target file to a server; receiving a target data stream sent by the server according to the access request, wherein the target data stream comprises a preset target feature code and a data stream of a target file; acquiring the target feature code, and checking the target feature code; and if the target feature code is successfully verified, acquiring the data stream of the target file.
Optionally, the program (instructions) when executed by the processor implement the steps of: judging whether the target feature code is the same as a preset check code or not; and if the target feature code is the same as the preset check code, determining that the target feature code is checked successfully.
Optionally, the program (instructions) when executed by the processor implement the steps of: and if the target feature code is failed to be checked, discarding the data stream of the target file.
Optionally, the target feature code is set in a header of the target data stream.
Optionally, when the access request is a download request, the program (instructions) when executed by the processor implement the following steps: and storing the data stream of the target file as the target file.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
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 invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components 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 of the present invention.
In addition, functional units in the embodiments of the present invention 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 functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (17)

1. A data processing method is applied to a server and is characterized by comprising the following steps:
receiving an access request of a terminal to a target file;
acquiring a target data stream corresponding to the target file according to the access request, wherein the target data stream comprises a preset target feature code and a data stream of the target file, and the target feature code is determined by a terminal;
and sending the target data stream to the terminal so that the terminal reads the data stream of the target file after verifying the target feature code.
2. The method of claim 1, wherein the access request is a download request, and the target feature code is provided in a header of the target data stream.
3. A data processing method is applied to a terminal and is characterized by comprising the following steps:
sending an access request for a target file to a server;
receiving a target data stream sent by the server according to the access request, wherein the target data stream comprises a preset target feature code and a data stream of a target file, and the target feature code is determined by a terminal;
acquiring the target feature code, and checking the target feature code;
and if the target feature code is successfully verified, acquiring the data stream of the target file.
4. The method of claim 3, wherein the step of verifying the target signature comprises:
judging whether the target feature code is the same as a preset check code or not;
and if the target feature code is the same as the preset check code, determining that the target feature code is checked successfully.
5. The method of claim 3, wherein after the step of verifying the target signature, the method further comprises:
and if the target feature code is failed to be checked, discarding the data stream of the target file.
6. The method according to any one of claims 3 to 5, wherein the target signature is provided in a header of the target data stream.
7. The method of claim 3, wherein the access request is a download request, and after the step of obtaining the data stream of the target file, the method further comprises:
and storing the data stream of the target file as the target file.
8. A server, comprising:
the receiving module is used for receiving an access request of a terminal to a target file;
an obtaining module, configured to obtain a target data stream corresponding to the target file according to the access request received by the receiving module, where the target data stream includes a preset target feature code and a data stream of the target file, and the target feature code is determined by a terminal;
and the sending module is used for sending the target data stream acquired by the acquiring module to the terminal so as to read the data stream of the target file after the terminal verifies the target feature code.
9. The server according to claim 8, wherein the target feature code is provided in a header of the target data stream, and the access request is a download request.
10. A terminal, comprising:
the sending module is used for sending an access request to the target file to the server;
a receiving module, configured to receive a target data stream sent by the server according to the access request, where the target data stream includes a preset target feature code and a data stream of a target file, and the target feature code is determined by a terminal;
the verification module is used for acquiring the target feature code received by the receiving module and verifying the target feature code;
and the obtaining module is used for obtaining the data stream of the target file if the verification module successfully verifies the target feature code.
11. The terminal of claim 10, wherein the verification module comprises:
the judgment submodule is used for judging whether the target feature code is the same as a preset check code or not;
and the determining submodule is used for determining that the target feature code is successfully verified if the target feature code is the same as the preset verification code.
12. The terminal of claim 10, further comprising:
and the abandoning module is used for abandoning the data stream of the target file if the verification of the target feature code fails.
13. A terminal as claimed in any one of claims 10 to 12, wherein the target signature is provided in a header of the target data stream.
14. The terminal of claim 10, wherein the access request is a download request, the terminal further comprising:
and the storage module is used for storing the data stream of the target file acquired by the acquisition module as the target file.
15. A server, comprising: memory, processor and computer program stored on the memory and executable on the processor, which when executed by the processor implements the steps in the data processing method according to claim 1 or 2.
16. A terminal, comprising: memory, processor and computer program stored on the memory and executable on the processor, which when executed by the processor implements the steps in the data processing method according to any of claims 3 to 7.
17. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps in the data processing method of claim 1 or 2 or carries out the steps in the data processing method of any one of claims 3 to 7.
CN201710624080.1A 2017-07-27 2017-07-27 Data processing method, server, terminal and computer readable storage medium Active CN107277050B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710624080.1A CN107277050B (en) 2017-07-27 2017-07-27 Data processing method, server, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710624080.1A CN107277050B (en) 2017-07-27 2017-07-27 Data processing method, server, terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN107277050A CN107277050A (en) 2017-10-20
CN107277050B true CN107277050B (en) 2021-02-26

Family

ID=60078725

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710624080.1A Active CN107277050B (en) 2017-07-27 2017-07-27 Data processing method, server, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN107277050B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109408751B (en) * 2018-09-27 2022-08-30 腾讯科技(成都)有限公司 Data processing method, terminal, server and storage medium
CN113051443A (en) * 2019-12-26 2021-06-29 北京奇艺世纪科技有限公司 Data processing method and related equipment
CN111241172B (en) * 2019-12-26 2023-05-26 北京航天测控技术有限公司 Data storage method, device, terminal and computer readable medium
CN111338820B (en) * 2020-02-24 2024-04-05 京东科技信息技术有限公司 Operation method, client and storage medium
CN113377710B (en) * 2020-03-10 2023-08-01 中国移动通信集团湖南有限公司 Data acquisition method and device and electronic equipment
CN114021709B (en) * 2021-09-30 2024-01-23 苏州浪潮智能科技有限公司 Multi-FPGA data processing method and device, server and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104767738A (en) * 2015-03-23 2015-07-08 浪潮集团有限公司 Data access method and device
WO2015176284A1 (en) * 2014-05-22 2015-11-26 华为技术有限公司 Data transmission method and apparatus
CN106850743A (en) * 2016-12-21 2017-06-13 腾讯科技(深圳)有限公司 A kind of business authorization method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104954386B (en) * 2015-06-30 2018-10-02 百度在线网络技术(北京)有限公司 A kind of network anti-hijacking method and device
CN105553955B (en) * 2015-12-09 2020-04-03 上海安吉星信息服务有限公司 Data processing method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015176284A1 (en) * 2014-05-22 2015-11-26 华为技术有限公司 Data transmission method and apparatus
CN104767738A (en) * 2015-03-23 2015-07-08 浪潮集团有限公司 Data access method and device
CN106850743A (en) * 2016-12-21 2017-06-13 腾讯科技(深圳)有限公司 A kind of business authorization method and device

Also Published As

Publication number Publication date
CN107277050A (en) 2017-10-20

Similar Documents

Publication Publication Date Title
CN107277050B (en) Data processing method, server, terminal and computer readable storage medium
CN106126077B (en) Display control method of application program icons and mobile terminal
CN107222485B (en) Authorization method and related equipment
US8619046B2 (en) Information processing apparatus, notification method, and program
CN107562345B (en) Information storage method and mobile terminal
JP6584954B2 (en) Using clamping to correct scrolling
US20180232515A1 (en) Client login method and apparatus and storage medium
US9524089B1 (en) Common web component
US10476870B2 (en) Local claim-based security service with cross-browser compatibility
US20210312040A1 (en) Enhancing security using anomaly detection
CN109614798B (en) Safe starting method and device and terminal equipment
CN105868617B (en) Application program encryption method and mobile terminal
US20150341416A1 (en) Cloud management systems and methods for executing applications of android systems
EP2840802A1 (en) Method and apparatus for sharing media content and method and apparatus for displaying media content
WO2015070816A1 (en) Application program push method, apparatus, device and system
CN107479822B (en) Information input method and terminal
CN106775378B (en) Method for determining candidate words of input method and mobile terminal
CN107678813B (en) Desktop icon theme switching method and mobile terminal
CN107124656B (en) Multimedia file playing method and mobile terminal
US20160179312A1 (en) Streamlined hosted applications
US20140022400A1 (en) Ip camera control method
US20140157104A1 (en) Dynamic sharing and updating of a web page
CN105373715A (en) Wearable device based data access method and apparatus
US20150325254A1 (en) Method and apparatus for displaying speech recognition information
EP3327605B1 (en) Electronic device and method of controlling same

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