CN112653777A - File downloading method, terminal, server, electronic device and storage medium - Google Patents

File downloading method, terminal, server, electronic device and storage medium Download PDF

Info

Publication number
CN112653777A
CN112653777A CN202110062037.7A CN202110062037A CN112653777A CN 112653777 A CN112653777 A CN 112653777A CN 202110062037 A CN202110062037 A CN 202110062037A CN 112653777 A CN112653777 A CN 112653777A
Authority
CN
China
Prior art keywords
identity information
unique identity
server
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.)
Granted
Application number
CN202110062037.7A
Other languages
Chinese (zh)
Other versions
CN112653777B (en
Inventor
王冠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baijia Technology Group Co ltd
Original Assignee
Beijing Baijia Technology Group Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baijia Technology Group Co ltd filed Critical Beijing Baijia Technology Group Co ltd
Publication of CN112653777A publication Critical patent/CN112653777A/en
Application granted granted Critical
Publication of CN112653777B publication Critical patent/CN112653777B/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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4547Network directories; Name-to-address mapping for personal communications, i.e. using a personal identifier
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K17/00Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure provides a file downloading method, a terminal, a server, an electronic device and a storage medium, wherein the method comprises the following steps: the method comprises the steps that a first terminal generates unique identity information aiming at a downloading task in the process of loading a file downloading page; acquiring and displaying the information code of the unique identity information, so that a second terminal can acquire the unique identity information through the information code and send the unique identity information to a server, and the server can establish the corresponding relation between the unique identity information and the download address of the target file; and after the corresponding relation is established, acquiring the target file at the server according to the unique identity information. In the process of obtaining the target file, the first terminal, the second terminal and the server do not need to show the download address of the target file in a plaintext form, so that the difficulty of obtaining the download address in an unconventional way is improved, and the risk of leakage of the download website is reduced.

Description

File downloading method, terminal, server, electronic device and storage medium
Technical Field
The present disclosure relates to the technical field of file transmission, and in particular, to a file downloading method, a terminal, a server, an electronic device, and a storage medium.
Background
As the personal life of residents is more and more closely linked to the internet, online commerce based on the internet is widely popularized and applied, and some individuals or organizations (such as merchants) start to achieve corresponding purposes (such as drainage, advertising and the like) by organizing online activities.
To attract people to participate in online activities, the host of the online activity typically provides the participant with information as a reward, which the participant can download over the internet. In the related art, the provided data is downloaded in the following manner: the host provides the participant with the website (or link) of the data, and the participant downloads the corresponding data on the terminal through the website.
However, the above-mentioned method of providing data requires a clear text form to provide the download website of the data, so the download website of the data is easily revealed, and people can easily obtain the download website of the data or obtain the data without participating in the event, which reduces the enthusiasm of people for participating in the event, and further leads to the event effect not reaching the expectation of the host. Therefore, on the premise of meeting the requirements of the file downloading scene of the user, how to effectively prevent the data from being acquired by people without downloading qualification becomes a problem which needs to be solved urgently.
Disclosure of Invention
The embodiment of the disclosure at least provides a file downloading method, a terminal, a server, electronic equipment and a storage medium.
In a first aspect, an embodiment of the present disclosure provides a file downloading method, which is applied to a first terminal, and the method includes:
generating unique identity information aiming at a downloading task in the process of loading a file downloading page;
acquiring and displaying the information code of the unique identity information, so that a second terminal can acquire the unique identity information through the information code and send the unique identity information to a server, and the server can establish the corresponding relation between the unique identity information and the download address of the target file;
and after the corresponding relation is established, acquiring the target file at the server according to the unique identity information.
In an optional embodiment, the obtaining, at the server, the target file according to the unique identity information includes:
acquiring a download address having a corresponding relationship with the unique identity information at the server;
and downloading the target file at the server through the download address.
In an optional implementation manner, it is determined that the establishment of the correspondence relationship is completed by:
querying, at the server, a state of the unique identity information;
when the state of the unique identity information is determined to be a preset state, determining that the establishment of the corresponding relation is completed; the preset state of the unique identity information is set by the server after the corresponding relation between the unique identity information and the download address of the target file is established.
In an optional implementation manner, in the process of loading the file download page, generating unique identity information for the download task includes:
loading a file downloading page based on a first website acquired at a server through the second terminal;
and calling an authentication information generating function in the process of loading the file downloading page, and generating unique identity information aiming at the downloading task based on the authentication information generating function.
In a second aspect, an embodiment of the present disclosure provides a file downloading method, which is applied to a second terminal, and the method includes:
obtaining unique identity information aiming at the downloading task through an information code displayed by the first terminal; the unique identity information is generated by the first terminal in the process of loading a file download page;
and sending the unique identity information to a server so that the server establishes a corresponding relation between the unique identity information and a download address of a target file, and the first terminal acquires the target file at the server according to the unique identity information after the first terminal determines that the corresponding relation is established.
In an optional embodiment, the sending the unique identity information to a server includes:
acquiring identification information of the target file at a preset server;
and sending the identification information of the target file and the unique identity information to the server so that the server can determine the download address of the target file according to the identification information of the target file, establish the corresponding relation between the unique identity information and the download address of the target file, and set the state of the unique identity information as a preset state.
In an optional embodiment, the sending the unique identity information to a server includes:
acquiring identity information of a user at a preset server;
and sending the identity information of the user and the unique identity information to a server so that the server establishes the corresponding relation between the unique identity information and the download address of the target file after determining that the user has the download authority according to the identity information of the user.
In an optional implementation manner, before the information code presented by the first terminal obtains the unique identity information for the download task, the method further includes:
after the user is confirmed to finish the preset task, responding to the operation of downloading the target file of the user, and sending a first request for acquiring a first website to the server;
receiving the first website returned by the server for the first request; the first website is used for the first terminal to load the file downloading page so as to call an authentication information generating function in the process of loading the file downloading page, and the unique identity information aiming at the downloading task is generated based on the authentication information generating function.
In a third aspect, an embodiment of the present disclosure provides a file downloading method, which is applied to a server, and the method includes:
receiving unique identity information aiming at the downloading task sent by a second terminal;
and establishing a corresponding relation between the unique identity information and a download address of the target file, so that the first terminal acquires the target file at the server according to the unique identity information after the corresponding relation is established.
In an optional implementation manner, the receiving unique identity information for the download task sent by the second terminal includes:
receiving identification information of a target file and unique identity information aiming at a downloading task, which are sent by the second terminal;
the establishing of the corresponding relationship between the unique identity information and the download address of the target file comprises the following steps:
and determining the download address of the target file according to the identification information of the target file, and establishing the corresponding relation between the unique identity information and the download address of the target file.
In an optional embodiment, after the establishing the correspondence between the unique identity information and the download address of the target file, the method further includes:
and setting the state of the unique identity information as a preset state, so that the first terminal determines that the establishment of the corresponding relation is completed when the state of the unique identity information is determined as the preset state.
In an optional implementation manner, the receiving unique identity information for the download task sent by the second terminal includes:
receiving the identity information of the user and the unique identity information aiming at the downloading task, which are sent by the second terminal;
the establishing of the corresponding relationship between the unique identity information and the download address of the target file comprises the following steps:
and after determining that the user has the downloading authority according to the identity information of the user, establishing a corresponding relation between the unique identity information and the downloading address of the target file.
In an optional implementation manner, before the receiving the unique identity information for the download task sent by the second terminal, the method further includes:
receiving a first request for acquiring a first website sent by the second terminal; the first request is sent by the second terminal in response to the operation of downloading the target file of the user after the second terminal determines that the user completes the preset task;
sending a first website to the second terminal according to the first request; the first website is used for the first terminal to load the file downloading page so as to call an authentication information generating function in the process of loading the file downloading page, and the unique identity information aiming at the downloading task is generated based on the authentication information generating function.
In a fourth aspect, an embodiment of the present disclosure provides a first terminal, where the first terminal includes a unique identity obtaining module, an information code obtaining module, and a target file obtaining module;
the unique identity acquisition module is used for generating unique identity information aiming at a downloading task in the process of loading a file downloading page;
the information code acquisition module is used for acquiring and displaying the information code of the unique identity information so that the second terminal can acquire the unique identity information through the information code and send the unique identity information to the server, and the server can establish the corresponding relation between the unique identity information and the download address of the target file;
and the target file acquisition module is used for acquiring the target file at the server according to the unique identity information after the corresponding relation is established.
In an optional implementation manner, when the target file obtaining module is configured to obtain the target file at the server according to the unique identity information, the target file obtaining module is specifically configured to:
acquiring a download address having a corresponding relationship with the unique identity information at the server;
and downloading the target file at the server through the download address.
In an optional implementation manner, the target file obtaining module determines that the corresponding relationship establishment is completed by:
querying, at the server, a state of the unique identity information;
when the state of the unique identity information is determined to be a preset state, determining that the establishment of the corresponding relation is completed; the preset state of the unique identity information is set by the server after the corresponding relation between the unique identity information and the download address of the target file is established.
In an optional implementation manner, when the unique identity acquiring module is used to generate the unique identity information for the download task in the process of loading the file download page, the unique identity acquiring module is specifically configured to:
loading a file downloading page based on a first website acquired at a server through the second terminal;
and calling an authentication information generating function in the process of loading the file downloading page, and generating unique identity information aiming at the downloading task based on the authentication information generating function.
In a fifth aspect, an embodiment of the present disclosure provides a second terminal, where the second terminal includes a code scanning module, a unique identity sending module, and a request sending module;
the code scanning module is used for obtaining unique identity information aiming at the downloading task through the information code displayed by the first terminal; the unique identity information is generated by the first terminal in the process of loading a file download page;
the unique identity sending module is used for sending the unique identity information to a server so that the server can establish a corresponding relation between the unique identity information and a download address of a target file, and the first terminal can obtain the target file at the server according to the unique identity information after the corresponding relation is established.
In an optional implementation manner, when the unique identity sending module is configured to send the unique identity information to the server, the unique identity sending module is specifically configured to:
acquiring identification information of the target file at a preset server;
and sending the identification information of the target file and the unique identity information to the server so that the server can determine the download address of the target file according to the identification information of the target file, establish the corresponding relation between the unique identity information and the download address of the target file, and set the state of the unique identity information as a preset state.
In an optional implementation manner, when the unique identity sending module is configured to send the unique identity information to the server, the unique identity sending module is specifically configured to:
acquiring identity information of a user at a preset server;
and sending the identity information of the user and the unique identity information to a server so that the server establishes the corresponding relation between the unique identity information and the download address of the target file after determining that the user has the download authority according to the identity information of the user.
In an optional implementation manner, the second terminal further includes a request sending module; the request sending module is used for:
after the user is confirmed to finish the preset task, responding to the operation of downloading the target file of the user, and sending a first request for acquiring a first website to the server;
receiving the first website returned by the server for the first request; the first website is used for the first terminal to load the file downloading page so as to call an authentication information generating function in the process of loading the file downloading page, and the unique identity information aiming at the downloading task is generated based on the authentication information generating function.
In a sixth aspect, an embodiment of the present disclosure provides a server, where the server includes an information receiving module and a relationship establishing module;
the information receiving module is used for receiving the unique identity information aiming at the downloading task and sent by the second terminal;
the relation establishing module is used for establishing a corresponding relation between the unique identity information and a download address of the target file, so that the first terminal acquires the target file at the server according to the unique identity information after the corresponding relation is established.
In an optional implementation manner, when the information receiving module is configured to receive unique identity information for a download task sent by a second terminal, the information receiving module is specifically configured to: receiving identification information of a target file and unique identity information aiming at a downloading task, which are sent by the second terminal;
the relationship establishing module, when configured to establish a corresponding relationship between the unique identity information and a download address of the target file, is specifically configured to: and determining the download address of the target file according to the identification information of the target file, and establishing the corresponding relation between the unique identity information and the download address of the target file.
In an optional embodiment, after the relationship establishing module is configured to establish the correspondence between the unique identity information and the download address of the target file, the relationship establishing module is further configured to:
and setting the state of the unique identity information as a preset state, so that the first terminal determines that the establishment of the corresponding relation is completed when the state of the unique identity information is determined as the preset state.
In an optional implementation manner, when the information receiving module is configured to receive unique identity information for a download task sent by a second terminal, the information receiving module is specifically configured to: receiving the identity information of the user and the unique identity information aiming at the downloading task, which are sent by the second terminal;
the relationship establishing module, when configured to establish a corresponding relationship between the unique identity information and a download address of the target file, is specifically configured to: and after determining that the user has the downloading authority according to the identity information of the user, establishing a corresponding relation between the unique identity information and the downloading address of the target file.
In an optional embodiment, the server further comprises a request receiving module; the request receiving module is used for:
receiving a first request for acquiring a first website sent by the second terminal; the first request is sent by the second terminal in response to the operation of downloading the target file of the user after the second terminal determines that the user completes the preset task;
sending a first website to the second terminal according to the first request; the first website is used for the first terminal to load the file downloading page so as to call an authentication information generating function in the process of loading the file downloading page, and the unique identity information aiming at the downloading task is generated based on the authentication information generating function.
In a seventh aspect, an embodiment of the present disclosure provides an electronic device, including: a processor, a memory and a bus, the memory storing machine readable instructions executable by the processor, the processor and the memory communicating via the bus when the server is running, the machine readable instructions being executed by the processor to perform the steps of any one of the file download methods of the first aspect, or the steps of any one of the file download methods of the second aspect, or the steps of any one of the file download methods of the third aspect.
In an eighth aspect, the present disclosure provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the steps of any one of the file downloading methods in the first aspect, or the steps of any one of the file downloading methods in the second aspect, or the steps of any one of the file downloading methods in the third aspect.
According to the file downloading method, the terminal, the server, the electronic device and the storage medium provided by the embodiment of the disclosure, the first terminal can generate the unique identity information for the downloading task and display the corresponding information code in the process of loading the file downloading page based on the website provided by the event host, the second terminal can obtain the unique identity information through the information code and send the unique identity information to the server, and the server can establish the corresponding relation between the unique identity information and the downloading address of the target file, so that the first terminal can determine the corresponding downloading address at the server based on the unique identity information and obtain the target file through the downloading address. In the process of obtaining the target file, the first terminal, the second terminal and the server do not need to show the download address of the target file in a plaintext form, so that the difficulty of obtaining the download address in an unconventional way is improved, and the risk of leakage of the download website is reduced.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly described below, and the drawings herein incorporated in and forming a part of the specification illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the technical solutions of the present disclosure. It is appreciated that the following drawings depict only certain embodiments of the disclosure and are therefore not to be considered limiting of its scope, for those skilled in the art will be able to derive additional related drawings therefrom without the benefit of the inventive faculty.
Fig. 1 is an architecture diagram of a file download system according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a file downloading method according to an embodiment of the present disclosure;
fig. 3 is a flowchart of file downloading in an actual scenario according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a first terminal according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a second terminal according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a server according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. The components of the embodiments of the present disclosure, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure, presented in the figures, is not intended to limit the scope of the claimed disclosure, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the disclosure without making creative efforts, shall fall within the protection scope of the disclosure.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The term "and/or" herein merely describes an associative relationship, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
It has been found that in some existing online activities, the host of the online activity typically provides some information to the participants as a reward, and the participants can obtain the information by downloading the information through the internet. In the related art, the provided data is downloaded in the following manner: the host provides the participant with the website (or link) of the data, and the participant downloads the corresponding data on the terminal through the website.
However, the above-mentioned method of providing data requires a clear text form to provide the download website of the data, so the download website of the data is easily revealed, and people can easily obtain the download website of the data or obtain the data without participating in the event, which reduces the enthusiasm of people for participating in the event, and further leads to the event effect not reaching the expectation of the host. Therefore, on the premise of meeting the requirements of the file downloading scene of the user, how to effectively prevent the data from being acquired by people without downloading qualification becomes a problem which needs to be solved urgently.
Based on the research, the present disclosure provides a file downloading method, where a first terminal may generate unique identity information for a downloading task and display a corresponding information code in a process of loading a file downloading page based on a website provided by an event host, a second terminal may obtain the unique identity information through the information code and send the unique identity information to a server, and the server may establish a correspondence between the unique identity information and a downloading address of a target file, so that the first terminal may determine the corresponding downloading address at the server based on the unique identity information and obtain the target file through the downloading address. In the process of acquiring the target file, the first terminal, the second terminal and the server do not need to display the download address of the target file in a plaintext form, so that the difficulty of acquiring the download address in an unconventional way is improved, the risk of leakage of the download website is reduced, the enthusiasm of people for participating in online activities for acquiring the target file is promoted, and the online activities are ensured to achieve the expected effect to a greater extent.
To facilitate understanding of the present embodiment, a detailed description will be first given of a file downloading method disclosed in the embodiments of the present disclosure. The execution main body of the file downloading method provided by the embodiment of the disclosure is a file downloading system. Referring to fig. 1, an architecture diagram of a file downloading system provided in an embodiment of the present disclosure is shown, where the file downloading system includes a first terminal, a second terminal, and a server, and the first terminal and the second terminal are respectively in communication connection with the server.
The first terminal and the second terminal are typically computer terminals with certain computing capabilities, the computer terminals for example comprising: a terminal device, which may be a User Equipment (UE), a mobile terminal, a User terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld terminal, a computing terminal, a vehicle-mounted terminal, a wearable terminal, or a server or other processing terminal. In some possible implementations, the file download method may be implemented by a processor calling computer readable instructions stored in a memory.
Referring to fig. 2, a flowchart of a file downloading method provided in the embodiment of the present disclosure is shown, where the method includes steps S210 to S270, where:
s210: and the first terminal generates unique identity information aiming at the downloading task in the process of loading the file downloading page.
The unique identity information may be a random sequence, such as a random number sequence, a random letter sequence, or a mixture of both, and the random sequence is unique. Of course, the unique identity information may be other information having uniqueness. When the first terminal loads the file and executes the download page, the first terminal can call an authentication information generation function and generate unique identity information based on the authentication information generation function.
It is understood that the first terminal may load the file download page based on a website, and taking a scene that the user participates in the online activity as an example, the host of the online activity may provide the user with a website, the user inputs the website into the browser of the first terminal, and the first terminal loads the file download page based on the website.
In an alternative embodiment, a first website for loading the file download page may be acquired at the server by the second terminal, the first terminal loads the file download page based on the first website acquired at the server by the second terminal, calls the authentication information generation function in the process of loading the file download page, and generates unique identity information for the download task based on the authentication information generation function.
Taking the unique identity information as a digital sequence as an example, the first terminal may call a random number generation function in the process of loading the file download page, generate a random number sequence based on the random number generation function, and use the random number sequence as the unique identity information.
S220: and the first terminal acquires the information code of the unique identity information and displays the information code.
The information code may be a bar code, a two-dimensional code, a three-dimensional code, or the like, and it can be understood that the other device may acquire the unique identity information corresponding to the information code by scanning the information code displayed by the first terminal.
Alternatively, the first terminal may call an information code generating function, and generate an information code of the unique identity information based on the information code generating function.
Optionally, the first terminal may send the unique identity information to the server, the server generates an information code of the unique identity information, and returns the information code to the first terminal, and the first terminal receives and displays the information code generated according to the unique identity information and returned by the server. It is to be understood that the server may generate the information code of the unique identity information based on the information code generating function.
S230: and the second terminal obtains the unique identity information aiming at the downloading task through the information code displayed by the first terminal.
As described above, the information code may be a barcode, a two-dimensional code, a three-dimensional code, or the like, and it can be understood that the second terminal may acquire the unique identity information corresponding to the information code by scanning the information code displayed by the first terminal.
Under the condition that the first terminal and the second terminal do not need communication connection, the second terminal can obtain the unique identity information in a mode of scanning the information code, so that the requirement on the first terminal is reduced, and an application program capable of communicating with the second terminal does not need to be installed on the first terminal, so that a user can select one first terminal to download the target file according to the requirement.
The second terminal can respond to the code scanning operation of the user, and the code scanning function of the second terminal is triggered to scan the information code displayed by the first terminal. For example, the second terminal may run an application for participating in an online activity, a code scanning control may be displayed on a page of the application, and when it is detected that the user clicks the code scanning control, a code scanning function of the second terminal may be triggered. The application of the online activity can be an independently developed application, and can also be an application developed based on other instant messaging applications, such as a public program and an applet developed based on WeChat; a program or applet based on a baccarat pay treasure or the like.
Taking a public number program developed based on the WeChat as an example, the public number program may include a plurality of pages, a code scanning control is displayed on one page, when it is detected that a user clicks the code scanning control, a code scanning function of the WeChat is called to display a code scanning frame, and the user may align a camera of the second terminal with an information code displayed by the first terminal at the moment, so that an image of the information code is located in the code scanning frame, and the second terminal scans the information code to acquire unique identity information corresponding to the information code.
In an optional implementation manner, before the second terminal obtains the unique identity information for the downloading task through the information code displayed by the first terminal, the second terminal may obtain a first website for loading the file downloading page at the server, so that the first terminal loads the file downloading page based on the first website. Specifically, after determining that the user completes the preset task, the second terminal may send a first request for obtaining the first website to the server in response to an operation of downloading the target file by the user, and then receive the first website returned by the server in response to the first request.
Taking a scene that the user participates in the online activity as an example, the user downloads and runs the application for participating in the online activity through the first terminal, and the preset task is completed based on the application. These tasks may be at least one of: completing registration on the application, recommending a link to the friend to download the application, joining a specified chat group based on an interface provided by the application, purchasing a specified item based on the application, and the like. For example, the application for participating in the online activity is a public program developed based on WeChat, and the preset task may specifically be: paying attention to the public number, joining a specified WeChat chat group based on an interface provided by the public number interface, posting a link to the public number to a circle of friends, purchasing a specified item based on a shopping page of the public number, and the like.
As described above, the second terminal may run an application for participating in an online activity, and the public program may include a plurality of pages, taking the application as a public program developed based on the WeChat as an example. The second terminal may send a first request for acquiring a first website to the server when detecting that the user clicks a download control corresponding to the file displayed on the page after determining that the user completes a preset task, and then receive the first website returned by the server in response to the first request.
S240: the second terminal sends the unique identity information to the server.
The unique identity information sent by the second terminal may be used to establish a corresponding relationship with the target file, where the target file is a file that the user desires to download. And after the corresponding relation between the unique identity information and the target file is established, the first terminal acquires the target file at the server according to the unique identity information.
After the second terminal obtains the unique identity information through the information code, the unique identity information can be immediately sent to the server, other information can be continuously obtained, and the unique identity information and the other information are sent to the server together.
In an optional implementation manner, after obtaining the unique identity information through the information code, the second terminal obtains the identification information of the target file at the preset server, and sends the identification information of the target file and the unique identity information to the server.
The preset server may be the server shown in fig. 1, or may be another server other than the server shown in fig. 1. Taking a scene in which the user participates in the online activity as an example, the user downloads and runs the application for participating in the online activity through the first terminal. In one scenario, the server shown in fig. 1 may be used for both maintaining applications and providing a download service of the target file, where the server stores identification information of the target file, and the second terminal may obtain the identification information of the target file at the server. In one scenario, the server shown in fig. 1 is used to provide a download service of the target file, and other servers than the server shown in fig. 1 are used to maintain the application, and the other servers store identification information of the target file, and the second terminal may obtain the identification information of the target file at the other servers.
Here, the identification information of the target file may be a name or a number of the target file, or may be other information capable of representing the target file, the identification information of the target file has a corresponding relationship with the download address of the target file, and in the subsequent step, the server may determine the download address of the target file according to the identification information of the target file.
In an optional implementation manner, after obtaining the unique identity information through the information code, the second terminal obtains the identity information of the user at a preset server, and sends the identity information of the user and the unique identity information to the server.
The preset server may be the server shown in fig. 1, or may be another server other than the server shown in fig. 1.
Taking a scene in which the user participates in the online activity as an example, the user downloads and runs the application for participating in the online activity through the first terminal. In one scenario, the server shown in fig. 1 may be used for both maintaining an application and providing a download service of a target file, where the server stores the identity information of a user, and the second terminal may obtain the identity information of the user at the server. In one scenario, the server shown in fig. 1 is used to provide a download service of the target file, and other servers than the server shown in fig. 1 are used to maintain the application, and the other servers store the identity information of the user, and the second terminal may obtain the identity information of the user at the other servers.
Here, the identity information of the user may be an account number or a user name registered in the application, or may be other information that can represent the identity of the user. In the subsequent step, the server can determine whether the user has the downloading authority according to the identity information of the user.
In an optional implementation manner, after obtaining the unique identity information through the information code, the second terminal obtains the identification information of the target file and the identity information of the user at the preset server, and sends the identification information of the target file, the identity information of the user and the unique identity information to the server. Here, the description of the identification information of the target file and the identity information of the user may refer to the foregoing contents, and will not be described herein again.
S250: and the server receives the unique identity information aiming at the downloading task sent by the second terminal.
The server can receive other information sent by the second terminal besides the unique identity information sent by the second terminal.
In an alternative embodiment, the server may receive the identification information of the target file and the unique identity information for the download task, which are sent by the second terminal.
The identification information of the target file may be the name or number of the target file, or may be other information capable of characterizing the target file. The identification information of the target file has a corresponding relation with the download address of the target file, and in the subsequent steps, the server can determine the download address of the target file according to the identification information of the target file.
In an alternative embodiment, the server receives the identity information of the user and the unique identity information for the download task, which can be sent by the second terminal.
The identity information of the user may be an account number or a user name registered in an application for participating in an online activity, or may be other information capable of characterizing the identity of the user. In the subsequent step, the server can determine whether the user has the downloading authority according to the identity information of the user.
In an alternative embodiment, the server receives the identification information of the target file, the identity information of the user and the unique identity information, which can be sent by the second terminal. Here, the description of the identification information of the target file and the identity information of the user may refer to the foregoing contents, and will not be described herein again.
S260: the server establishes a corresponding relation between the unique identity information and the download address of the target file.
In this step, the server may store the unique identity information and the download address of the target file in a preset database in an associated manner, thereby establishing a correspondence between the unique identity information and the download address of the target file.
Taking the preset database as Redis as an example, it should be noted herein that Redis provided in the embodiment of the present disclosure is a key-value storage system. In Redis, the unique identity information is used as a key value, and the download address of the target file is used as a value corresponding to the key value, so that the corresponding relation between the unique identity information and the download address of the target file is established.
As described above, the server receives the identification information of the target file that can be transmitted by the second terminal and the unique identification information for the download task. In an optional implementation manner, the server may determine a download address of the target file according to the identification information of the target file, and then establish a corresponding relationship between the unique identity information and the download address of the target file.
It should be noted that the server may store download addresses of one or more files. It can be understood that, when the server only stores the download address of one file, the download address of one file can be used as the download address of the target file; when the server only stores the download addresses of the multiple files, the download addresses of the multiple files can all be used as the download addresses of the target file, of course, only a part of the download addresses of the multiple files are the download addresses of the target file, and in this case, the server needs to determine the download addresses of the target file at the download addresses of the multiple files according to the identification information of the target file.
As described above, the server may receive the user's identity information and the unique identity information for the download task, which may be transmitted by the second terminal. In an optional implementation manner, after determining that the user has the download authority according to the identity information of the user, the server needs to establish a corresponding relationship between the unique identity information and the download address of the target file.
Optionally, the server may record authority information of each user, and the server may query the authority information of the user according to the identity information of the user, and determine whether the user has the download authority based on the authority information. Specifically, the permission information may include a completion condition of the user for the preset task, and when the user is not completing the preset task, it is determined that the user does not have the download permission; and when the user finishes the preset task, determining that the user has the downloading authority.
In the subsequent steps, after the first terminal determines that the corresponding relationship is established, the target file can be obtained at the server according to the unique identity information. In order to ensure that the first terminal can acquire the target file in time, the server may set indication information or actively send an indication message to the first terminal, where the indication information and the indication message are used to indicate the first terminal to start acquiring the target file.
In an optional implementation manner, after the server establishes the correspondence between the unique identity information and the download address of the target file, the state of the unique identity information may be set to a preset state, and the preset state of the unique identity information may instruct the first terminal to start acquiring the target file. In the subsequent steps, when the first terminal determines that the state of the unique identity information is a preset state, the first terminal can determine that the establishment of the corresponding relation between the unique identity information and the download address of the target file is completed, and starts to acquire the target file.
In an optional implementation manner, after determining that the user has the download permission according to the identity information of the user, the server determines the download address of the target file according to the identification information of the target file, and then establishes a corresponding relationship between the unique identity information and the download address of the target file.
S270: and after the establishment of the corresponding relation is determined, the first terminal acquires the target file at the server according to the unique identity information.
The first terminal inquires whether the server has the indication information or not, and when the indication information is inquired, the establishment of the corresponding relation between the unique identity information and the download address of the target file is determined to be completed. Or, when receiving the indication message sent by the server, the first terminal determines that the establishment of the corresponding relationship between the unique identity information and the download address of the target file is completed.
In an optional implementation manner, the first terminal may query the state of the unique identity information at the server, determine that the establishment of the corresponding relationship is completed when it is determined that the state of the unique identity information is a preset state, then may obtain, at the server, a download address having a corresponding relationship with the unique identity information, and download the target file at the server through the download address. It is to be understood that the preset state of the unique identity information may be the indication information, and the preset state of the unique identity information is set by the server after establishing the corresponding relationship between the unique identity information and the download address of the target file.
Optionally, after acquiring the information code of the unique identity information, the first terminal may periodically query the server for the status of the unique identity information. The time interval between two adjacent queries for the status of the unique identity information may depend on actual design requirements, for example, the time interval may be set to 0.05 second or 0.1 second, etc.
Optionally, after the first terminal acquires the information code of the unique identity information, the first terminal may periodically send an inquiry request for the state of the unique identity information to the server, and each time the server receives an inquiry request, the server returns the state information of the unique identity information to the first terminal once.
As described above, the first terminal may download the page based on the first web site loading file, wherein the first web site may be provided by the server. In an optional implementation manner, before receiving the unique identity information for the download task sent by the second terminal, the server may receive a first request for obtaining the first website sent by the second terminal, and send the first website to the second terminal according to the first request.
As described above, the second terminal obtains the unique identity information for the download task through the information code presented by the first terminal, and the information code may be generated by the server. In an optional implementation manner, before receiving the unique identity information for the download task sent by the second terminal, the server may receive the unique identity information sent by the first terminal, generate an information code according to the unique identity information, and then send the information code to the first terminal.
In an alternative embodiment, after receiving the unique identity information sent by the first terminal, the server may set the state of the unique identity information to the first state; and after the server establishes the corresponding relation between the unique identity information and the download address of the target file, setting the state of the unique identity information as a second state. The first state of the unique identity information is used for indicating that the first terminal cannot acquire the target file currently; the second state of the unique identity information is the preset state of the unique identity information and is used for indicating the first terminal to start acquiring the target file.
After the first terminal acquires the information code of the unique identity information, the first terminal can send a query request aiming at the state of the unique identity information to the server, and after the server receives the query request, the server returns the state information of the unique identity information to the first terminal once; when the first terminal determines that the state of the unique identity information is the first state according to the state information of the unique identity information, the first terminal sends a query request aiming at the state of the unique identity information to the server again; and when the first terminal determines that the state of the unique identity information is the second state according to the state information of the unique identity information, the establishment of the corresponding relation between the unique identity information and the download address of the target file is completed, the sending of an inquiry request aiming at the state of the unique identity information to the server is stopped, the download address corresponding to the unique identity information is obtained at the server, and the target file is downloaded at the server through the download address.
The first terminal can timely know that the corresponding relation between the unique identity information and the download address of the target file is established and completed by inquiring the state of the unique identity information, so that the download aiming at the target file can be quickly started, the file download efficiency can be improved, the download period of the whole file can be shortened, and the user experience can be improved.
Taking a certain actual scene as an example, a file downloading flow in the actual scene is described below. In the actual scene, the first terminal is a personal computer, the second terminal is a mobile phone, the user a pays attention to the micro-messaging public number of the event host through a personal micro-messaging account on the mobile phone, a specified task is completed in the micro-messaging public number, and a file provided by the event host is expected to be downloaded to the personal computer.
Referring to fig. 3, a flowchart of file downloading in an actual scenario provided by the embodiment of the present disclosure is shown, where the flowchart includes steps 301 to S314, where:
s301: after determining that the user a completes the preset task, the mobile phone sends a first request to the server when detecting that the user a clicks a download control of the file b in a page of the WeChat public number.
S302: the server receives a first request sent by the mobile phone, and sends a website c to the mobile phone according to the first request.
S303: and the mobile phone receives and displays the website c.
After step S203, the user a may manually input the website c to the website bar of the browser of the personal computer, and then may perform step S204.
Certainly, the mobile phone end can also directly open the website without using a computer or other equipment, which is not limited herein.
S304: the personal computer loads a file downloading page based on the website c, calls an authentication information generation function in the process of loading the file downloading page, and generates a random number sequence aiming at a downloading task based on the authentication information generation function.
S305: the personal computer sends the random number sequence to the server.
S306: the server receives the random number sequence sent by the personal computer, generates a two-dimensional code according to the random number sequence, and sets the random number sequence to be in a first state.
S307: and the server sends the two-dimensional code to the personal computer. When the mobile phone is obtained through webpage access, the two-dimensional code can also be sent to the mobile phone, and a user can directly scan the two-dimensional code through the mobile phone or firstly store the two-dimensional code and then scan the two-dimensional code, which is not described in detail.
S308: and the personal computer receives and displays the two-dimensional code returned by the server, and periodically inquires the state of the random number sequence. The personal computer may also be other electronic devices, such as a terminal device, a computing device, or an intelligent device such as a mobile phone, which is specially used for displaying information codes, and details thereof are not described herein. Of course, it could also be the current handset itself.
S309: when the mobile phone detects that a user a clicks a code scanning control on a page of the WeChat public number, a scanning function is started, and a two-dimensional code displayed by a personal computer is scanned to obtain a random number sequence.
S310: and the mobile phone acquires the number of the file b and the WeChat account of the user a at the server.
S311: and the mobile phone sends the serial number of the file b, the WeChat account number of the user a and the random number sequence to the server.
S312: and after the server determines that the user a finishes the preset task according to the WeChat account of the user a, the server determines the download address of the file b according to the serial number of the file b.
S313: the server sets the random number sequence to a key value in Redis, sets the download address of the file b to a value corresponding to the key value, and sets the random number sequence to a second state.
S314: when the personal computer inquires that the state of the random number sequence is the second state at the server, a downloading address corresponding to the random number sequence is obtained in the Redis, and the file b is downloaded at the server through the downloading address.
Based on the same inventive concept, the embodiment of the present disclosure further provides a first terminal, and since the principle of the first terminal in the embodiment of the present disclosure for solving the problem is similar to the file downloading method in the embodiment of the present disclosure, the implementation of the first terminal may refer to the implementation of the method, and repeated parts are not described again.
Referring to fig. 4, which is a schematic diagram of a first terminal provided in the embodiment of the present disclosure, the first terminal includes a unique identity obtaining module 401, an information code obtaining module 402, and a target file obtaining module 403.
The unique identity acquisition module 401 is configured to generate unique identity information for a download task in the process of loading a file download page;
the information code obtaining module 402 is configured to obtain and display an information code of the unique identity information, so that the second terminal obtains the unique identity information through the information code and sends the unique identity information to the server, so that the server establishes a corresponding relationship between the unique identity information and a download address of the target file;
the target file obtaining module 403 is configured to obtain the target file at the server according to the unique identity information after the corresponding relationship is determined to be established.
In an optional implementation manner, the target file obtaining module 403, when configured to obtain the target file at the server according to the unique identity information, is specifically configured to:
acquiring a download address corresponding to the unique identity information at the server;
and downloading the target file at the server through the downloading address.
In an optional implementation manner, the target file obtaining module 403 may determine that the corresponding relationship is completely established by:
querying, at a server, a status of the unique identity information;
when the state of the unique identity information is determined to be a preset state, determining that the establishment of the corresponding relation is completed; the preset state of the unique identity information is set by the server after the corresponding relation between the unique identity information and the download address of the target file is established.
In an optional embodiment, when the unique identity obtaining module 401 is configured to generate the unique identity information for the download task in the process of loading the file download page, specifically, it is configured to:
loading a file downloading page based on a first website acquired at a server through a second terminal;
and calling an authentication information generating function in the process of loading the file downloading page, and generating unique identity information aiming at the downloading task based on the authentication information generating function.
The description of the processing flow of each module in the first terminal and the interaction flow between each module may refer to the related description in the above method embodiments, and will not be described in detail here.
Based on the same inventive concept, the embodiment of the present disclosure further provides a second terminal, and since the principle of the second terminal in the embodiment of the present disclosure for solving the problem is similar to the file downloading method in the embodiment of the present disclosure, the implementation of the second terminal may refer to the implementation of the method, and repeated parts are not described again.
Referring to fig. 5, a schematic diagram of a second terminal provided in the embodiment of the present disclosure is shown, where the second terminal includes a code scanning module 501 and a unique identity sending module 502.
The code scanning module 501 is configured to obtain unique identity information for the download task through an information code displayed by the first terminal; the unique identity information is generated by the first terminal in the process of loading a file downloading page;
the unique identity sending module 502 is configured to send the unique identity information to the server, so that the server establishes a corresponding relationship between the unique identity information and the download address of the target file, so that the first terminal obtains the target file at the server according to the unique identity information after the establishment of the corresponding relationship is determined.
In an alternative embodiment, the unique identity sending module 502, when configured to send the unique identity information to the server, is specifically configured to:
acquiring identification information of a target file at a preset server;
and sending the identification information and the unique identity information of the target file to a server so that the server can determine the download address of the target file according to the identification information of the target file, establish the corresponding relation between the unique identity information and the download address of the target file, and set the state of the unique identity information as a preset state.
In an alternative embodiment, the unique identity sending module 502, when configured to send the unique identity information to the server, is specifically configured to:
acquiring identity information of a user at a preset server;
and sending the identity information and the unique identity information of the user to the server so that the server establishes the corresponding relation between the unique identity information and the download address of the target file after determining that the user has the download authority according to the identity information of the user.
In an optional implementation manner, the second terminal further includes a request sending module 503; the request sending module 503 is configured to:
after determining that the user completes the preset task, responding to the operation of downloading the target file of the user, and sending a first request for acquiring a first website to a server;
receiving a first website returned by the server aiming at the first request; the first website is used for the first terminal to load a file downloading page so as to call an authentication information generating function in the process of loading the file downloading page, and the unique identity information aiming at the downloading task is generated based on the authentication information generating function.
The description of the processing flow of each module in the second terminal and the interaction flow between each module may refer to the related description in the above method embodiments, and will not be described in detail here.
Based on the same inventive concept, the embodiment of the present disclosure further provides a server, and since the principle of solving the problem of the server in the embodiment of the present disclosure is similar to the file downloading method in the embodiment of the present disclosure, the implementation of the server may refer to the implementation of the method, and repeated details are not repeated.
Referring to fig. 6, a schematic diagram of a server provided in the embodiment of the present disclosure is shown, where the server includes an information receiving module 601 and a relationship establishing module 602.
The information receiving module 601 is configured to receive unique identity information for a download task sent by a second terminal;
the relationship establishing module 602 is configured to establish a corresponding relationship between the unique identity information and the download address of the target file, so that the first terminal obtains the target file at the server according to the unique identity information after the first terminal determines that the corresponding relationship is established.
In an optional implementation manner, when the information receiving module 601 is configured to receive the unique identity information for the download task sent by the second terminal, specifically, to: receiving identification information of a target file and unique identity information aiming at a downloading task, which are sent by a second terminal;
the relationship establishing module 602, when configured to establish a corresponding relationship between the unique identity information and the download address of the target file, is specifically configured to: and determining the download address of the target file according to the identification information of the target file, and establishing the corresponding relation between the unique identity information and the download address of the target file.
In an optional embodiment, after the relationship establishing module 602 is configured to establish the correspondence between the unique identity information and the download address of the target file, further configured to:
and setting the state of the unique identity information to be a preset state so that the first terminal determines that the establishment of the corresponding relation is completed when the state of the unique identity information is determined to be the preset state.
In an optional implementation manner, when the information receiving module 601 is configured to receive the unique identity information for the download task sent by the second terminal, specifically, to: receiving the identity information of the user and the unique identity information aiming at the downloading task, which are sent by the second terminal;
the relationship establishing module 602, when configured to establish a corresponding relationship between the unique identity information and the download address of the target file, is specifically configured to: after the user is determined to have the downloading authority according to the identity information of the user, the corresponding relation between the unique identity information and the downloading address of the target file is established.
In an optional embodiment, the server further comprises a request receiving module 603; the request receiving module 603 is configured to:
receiving a first request for acquiring a first website sent by a second terminal; the first request is sent by the second terminal in response to the operation of downloading the target file of the user after the second terminal determines that the user completes the preset task;
sending a first website to a second terminal according to the first request; the first website is used for the first terminal to load a file downloading page so as to call an authentication information generating function in the process of loading the file downloading page, and the unique identity information aiming at the downloading task is generated based on the authentication information generating function.
In an alternative embodiment, the 60-server further includes an information code generation module 604; the information code generating module 604 is configured to:
receiving unique identity information sent by a first terminal, and generating an information code according to the unique identity information;
and sending the information code to the first terminal so that the first terminal can display the information code and the second terminal can obtain the unique identity information through the information code.
The description of the processing flow of each module in the server and the interaction flow between each module may refer to the related description in the above method embodiments, and will not be described in detail here.
Based on the same inventive concept, an embodiment of the present disclosure further provides an electronic device, as shown in fig. 7, which is a schematic structural diagram of the electronic device provided in the embodiment of the present disclosure, and the electronic device includes a processor, a memory, and a bus. The memory 72 is used for storing instructions for execution and includes a memory 721 and an external memory 722. The memory 721 is also referred to as an internal memory, and temporarily stores operation data in the processor 71 and data exchanged with an external memory 722 such as a hard disk, and the processor 71 exchanges data with the external memory 722 through the memory 721.
In an alternative embodiment, when the electronic device is operating, the processor 71 communicates with the memory 72 via the bus 73, so that the processor 71 executes the following instructions:
generating unique identity information aiming at a downloading task in the process of loading a file downloading page;
acquiring and displaying the information code of the unique identity information, so that the second terminal can acquire the unique identity information through the information code and send the unique identity information to the server, and the server can establish the corresponding relation between the unique identity information and the download address of the target file;
and after the corresponding relation is established, acquiring the target file at the server according to the unique identity information.
In an alternative embodiment, when the electronic device is operating, the processor 71 communicates with the memory 72 via the bus 73, so that the processor 71 executes the following instructions:
obtaining unique identity information aiming at the downloading task through an information code displayed by the first terminal; the unique identity information is generated by the first terminal in the process of loading a file downloading page;
and sending the unique identity information to the server so that the server establishes a corresponding relation between the unique identity information and the download address of the target file, and obtaining the target file at the server according to the unique identity information after the first terminal determines that the corresponding relation is established.
In an alternative embodiment, when the electronic device is operating, the processor 71 communicates with the memory 72 via the bus 73, so that the processor 71 executes the following instructions:
receiving unique identity information aiming at the downloading task sent by a second terminal;
and establishing a corresponding relation between the unique identity information and the download address of the target file, so that the first terminal acquires the target file at the server according to the unique identity information after the establishment of the corresponding relation is determined.
The disclosed embodiments also provide a computer-readable storage medium having stored thereon a computer program, which, when executed by a processor, performs the steps of the file downloading method performed by the first terminal, or the steps of the file downloading method performed by the second terminal, or the steps of the file downloading method performed by the server in the above-described method embodiments. The storage medium may be a volatile or non-volatile computer-readable storage medium.
The embodiments of the present disclosure also provide a computer program product, where the computer program product carries a program code, where instructions included in the program code may be used to execute steps of the file downloading method executed by the first terminal, steps of the file downloading method executed by the second terminal, or steps of the file downloading method executed by the server in the foregoing method embodiments, which may be referred to specifically for the foregoing method embodiments, and are not described herein again.
The computer program product may be implemented by hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the terminal and the server described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed method, terminal and server may be implemented in other ways. The above-described embodiments of the terminal and the server are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and 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 of devices or units through some communication interfaces, 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 disclosure 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 non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several 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 disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are merely specific embodiments of the present disclosure, which are used for illustrating the technical solutions of the present disclosure and not for limiting the same, and the scope of the present disclosure is not limited thereto, and although the present disclosure is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive of the technical solutions described in the foregoing embodiments or equivalent technical features thereof within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present disclosure, and should be construed as being included therein. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (18)

1. A file downloading method is applied to a first terminal, and comprises the following steps:
generating unique identity information aiming at a downloading task in the process of loading a file downloading page;
acquiring and displaying the information code of the unique identity information, so that a second terminal can acquire the unique identity information through the information code and send the unique identity information to a server, and the server can establish the corresponding relation between the unique identity information and the download address of the target file;
and after the corresponding relation is established, acquiring the target file at the server according to the unique identity information.
2. The method of claim 1, wherein obtaining the target file at the server according to the unique identity information comprises:
acquiring a download address having a corresponding relationship with the unique identity information at the server;
and downloading the target file at the server through the download address.
3. The method of claim 1, wherein the correspondence establishment is determined to be complete by:
querying, at the server, a state of the unique identity information;
when the state of the unique identity information is determined to be a preset state, determining that the establishment of the corresponding relation is completed; the preset state of the unique identity information is set by the server after the corresponding relation between the unique identity information and the download address of the target file is established.
4. The method according to claim 1, wherein during the process of loading the file download page, generating unique identity information for the download task comprises:
loading a file downloading page based on a first website acquired at a server through the second terminal;
and calling an authentication information generating function in the process of loading the file downloading page, and generating unique identity information aiming at the downloading task based on the authentication information generating function.
5. A file downloading method is applied to a second terminal, and comprises the following steps:
obtaining unique identity information aiming at the downloading task through an information code displayed by the first terminal; the unique identity information is generated by the first terminal in the process of loading a file download page;
and sending the unique identity information to a server so that the server establishes a corresponding relation between the unique identity information and a download address of a target file, and the first terminal acquires the target file at the server according to the unique identity information after the first terminal determines that the corresponding relation is established.
6. The method of claim 5, wherein sending the unique identity information to a server comprises:
acquiring identification information of the target file at a preset server;
and sending the identification information of the target file and the unique identity information to the server so that the server can determine the download address of the target file according to the identification information of the target file, establish the corresponding relation between the unique identity information and the download address of the target file, and set the state of the unique identity information as a preset state.
7. The method according to claim 5 or 6, wherein the sending the unique identity information to a server comprises:
acquiring identity information of a user at a preset server;
and sending the identity information of the user and the unique identity information to a server so that the server establishes the corresponding relation between the unique identity information and the download address of the target file after determining that the user has the download authority according to the identity information of the user.
8. The method of claim 5, wherein before the information code presented by the first terminal obtains the unique identity information for the download task, the method further comprises:
after the user is confirmed to finish the preset task, responding to the operation of downloading the target file of the user, and sending a first request for acquiring a first website to the server;
receiving the first website returned by the server for the first request; the first website is used for the first terminal to load the file downloading page so as to call an authentication information generating function in the process of loading the file downloading page, and the unique identity information aiming at the downloading task is generated based on the authentication information generating function.
9. A file downloading method is applied to a server, and comprises the following steps:
receiving unique identity information aiming at the downloading task sent by a second terminal;
and establishing a corresponding relation between the unique identity information and a download address of the target file, so that the first terminal acquires the target file at the server according to the unique identity information after the corresponding relation is established.
10. The method of claim 9,
the receiving of the unique identity information for the download task sent by the second terminal includes:
receiving identification information of a target file and unique identity information aiming at a downloading task, which are sent by the second terminal;
the establishing of the corresponding relationship between the unique identity information and the download address of the target file comprises the following steps:
and determining the download address of the target file according to the identification information of the target file, and establishing the corresponding relation between the unique identity information and the download address of the target file.
11. The method according to claim 9, wherein after said establishing the correspondence between the unique identity information and the download address of the target file, the method further comprises:
and setting the state of the unique identity information as a preset state, so that the first terminal determines that the establishment of the corresponding relation is completed when the state of the unique identity information is determined as the preset state.
12. The method according to any one of claims 9 to 11,
the receiving of the unique identity information for the download task sent by the second terminal includes:
receiving the identity information of the user and the unique identity information aiming at the downloading task, which are sent by the second terminal;
the establishing of the corresponding relationship between the unique identity information and the download address of the target file comprises the following steps:
and after determining that the user has the downloading authority according to the identity information of the user, establishing a corresponding relation between the unique identity information and the downloading address of the target file.
13. The method according to claim 9, wherein before said receiving the unique identity information for the download task sent by the second terminal, the method further comprises:
receiving a first request for acquiring a first website sent by the second terminal; the first request is sent by the second terminal in response to the operation of downloading the target file of the user after the second terminal determines that the user completes the preset task;
sending a first website to the second terminal according to the first request; the first website is used for the first terminal to load the file downloading page so as to call an authentication information generating function in the process of loading the file downloading page, and the unique identity information aiming at the downloading task is generated based on the authentication information generating function.
14. A first terminal, comprising:
the unique identity acquisition module is used for generating unique identity information aiming at a downloading task in the process of loading a file downloading page;
the information code acquisition module is used for acquiring and displaying the information code of the unique identity information so that the second terminal can acquire the unique identity information through the information code and send the unique identity information to the server, and the server can establish the corresponding relation between the unique identity information and the download address of the target file;
and the target file acquisition module is used for acquiring the target file at the server according to the unique identity information after the corresponding relation is established.
15. A second terminal, comprising:
the code scanning module is used for obtaining unique identity information aiming at the downloading task through the information code displayed by the first terminal; the unique identity information is generated by the first terminal in the process of loading a file download page;
and the unique identity sending module is used for sending the unique identity information to a server so that the server establishes a corresponding relation between the unique identity information and a download address of a target file, and the first terminal acquires the target file at the server according to the unique identity information after the establishment of the corresponding relation is determined.
16. A server, comprising:
the information receiving module is used for receiving the unique identity information aiming at the downloading task and sent by the second terminal;
and the relationship establishing module is used for establishing a corresponding relationship between the unique identity information and a download address of the target file, so that the first terminal acquires the target file at the server according to the unique identity information after the corresponding relationship is established.
17. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine readable instructions executable by the processor, the processor and the memory communicating over the bus when the server is running, the machine readable instructions when executed by the processor performing the steps of the file download method of any of claims 1 to 4, or the steps of the file download method of any of claims 5 to 8, or the steps of the file download method of any of claims 9 to 13.
18. A computer-readable storage medium, characterized in that a computer program is stored thereon, which, when being executed by a processor, performs the steps of the file download method according to any one of claims 1 to 4, or the steps of the file download method according to any one of claims 5 to 8, or the steps of the file download method according to any one of claims 9 to 13.
CN202110062037.7A 2020-12-18 2021-01-18 File downloading method, terminal, server, electronic equipment and storage medium Active CN112653777B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011502581 2020-12-18
CN2020115025810 2020-12-18

Publications (2)

Publication Number Publication Date
CN112653777A true CN112653777A (en) 2021-04-13
CN112653777B CN112653777B (en) 2023-05-16

Family

ID=75368197

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110062037.7A Active CN112653777B (en) 2020-12-18 2021-01-18 File downloading method, terminal, server, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112653777B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103475480A (en) * 2013-09-05 2013-12-25 北京星网锐捷网络技术有限公司 Certificate authority method and device
CN103701891A (en) * 2013-12-20 2014-04-02 贝壳网际(北京)安全技术有限公司 Cross-terminal downloading method, system, server, mobile terminal and fixed terminal
CN106204028A (en) * 2016-07-28 2016-12-07 深圳市安贝信息技术有限公司 Issue installation method, system and the device of a kind of charging software
CN107241364A (en) * 2017-08-10 2017-10-10 广州杰之良软件有限公司 Document down loading method and device
CN107809438A (en) * 2017-11-16 2018-03-16 广东工业大学 A kind of network authentication method, system and its user agent device used
US20200084211A1 (en) * 2016-12-12 2020-03-12 Nokia Technologies Oy Methods and devices for authentication

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103475480A (en) * 2013-09-05 2013-12-25 北京星网锐捷网络技术有限公司 Certificate authority method and device
CN103701891A (en) * 2013-12-20 2014-04-02 贝壳网际(北京)安全技术有限公司 Cross-terminal downloading method, system, server, mobile terminal and fixed terminal
CN106204028A (en) * 2016-07-28 2016-12-07 深圳市安贝信息技术有限公司 Issue installation method, system and the device of a kind of charging software
US20200084211A1 (en) * 2016-12-12 2020-03-12 Nokia Technologies Oy Methods and devices for authentication
CN107241364A (en) * 2017-08-10 2017-10-10 广州杰之良软件有限公司 Document down loading method and device
CN107809438A (en) * 2017-11-16 2018-03-16 广东工业大学 A kind of network authentication method, system and its user agent device used

Also Published As

Publication number Publication date
CN112653777B (en) 2023-05-16

Similar Documents

Publication Publication Date Title
CN113052663B (en) Social application-based bill spelling method, client, server and system
CN110166427B (en) Security processing method, device and system used by merchant management equipment
US11165584B2 (en) Method for transmitting personal information
CN106648688B (en) Information display method and device
US20190370846A1 (en) Service processing method, storage medium, and terminal
US20170054814A1 (en) Communication Establishment Method, Device, and System
CN101645856A (en) Contact person information processing method and mobile terminal
CN106997372B (en) Method and device for realizing business operation based on picture
JP2019160062A (en) Business support method for store and server
JP2019086920A (en) Short message transmission server, short message transmission system, short message transmission method, and short message transmission program
US20170154297A1 (en) Purchase support
CN112653777A (en) File downloading method, terminal, server, electronic device and storage medium
CN108632387B (en) Method, device and terminal for generating game reservation message
CN102333051A (en) Method for obtaining contact information based on network
CN106708446A (en) Cloud printing method and cloud printing server
CN113159908A (en) Service recommendation method and device and readable storage medium
CN111752885B (en) Method and device for processing reading authority in reading material
CN111914170B (en) Coupon issuing method, coupon issuing system, terminal device and computer readable storage medium
CN108512946B (en) Identity information display method and device and terminal
CN109462859B (en) Application management method and server
CN110555593A (en) method and device for processing issue of credit contract system
CN117574348B (en) Management method of graphic identification code
CN104717121A (en) Business card exchanging method and system
CN111833070A (en) After-sale processing method and device and electronic equipment
CN102333147A (en) Method for exchanging personal related information based on ID (identification) information and verification information

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