CN109361757B - Data transmission method and device and computer readable storage medium - Google Patents
Data transmission method and device and computer readable storage medium Download PDFInfo
- Publication number
- CN109361757B CN109361757B CN201811331571.8A CN201811331571A CN109361757B CN 109361757 B CN109361757 B CN 109361757B CN 201811331571 A CN201811331571 A CN 201811331571A CN 109361757 B CN109361757 B CN 109361757B
- Authority
- CN
- China
- Prior art keywords
- background service
- browser
- data transmission
- task
- transmission
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/03—Protocol definition or specification
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the invention relates to the technical field of communication, and discloses a data transmission method, a data transmission device and a computer readable storage medium. In some embodiments of the present invention, a data transmission method is applied to a background service, and includes: determining a transmission task sent by a browser; wherein the browser determines a transmission task; transmitting the transmission task to the background service according to a preset rule in the registry; executing a transmission task; wherein the background service is browser independent. In the implementation, the background service is independent of the browser, so that the background service can continue to execute the transmission task after the browser is closed. In addition, the background service is independent of the browser, so that a plug-in protocol supported by the browser is not required to be considered when the background service is configured, and the maintenance amount of the background service is reduced.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a data transmission method, an apparatus, and a computer-readable storage medium.
Background
Because of the problems of Client/Server (C/S) architecture, a Browser/Server (Browser/Server) architecture with a three-tier schema has been proposed based on its original architecture. The B/S architecture is an improvement over the C/S architecture with the rise of the internet. The B/S has the greatest advantage that the operation can be carried out at any place without installing any special software, the operation can be carried out only by one computer capable of surfing the Internet, and the client side is subjected to zero installation and zero maintenance. The system is very easy to expand.
However, the inventors found that at least the following problems exist in the prior art: currently, a terminal usually uses a Browser/Server (B/S) mode for file transmission. The plug-in of the traditional browser needs to meet the requirements of directional drainage and support different browser kernels of different platforms. And the plug-in can be installed only by the authorization of a system administrator or security protection software in the installation process, and if the plug-in is a browser, the plug-in needs to be authenticated and automatically started by the authority capable of obtaining the browser. The current inserts suffer from the following problems:
1. the browser plug-in is directed at the whole browser, and after the browser is closed, the plug-in cannot work continuously.
2. Browser plug-ins need to be compatible with different kernels and platforms. Because the plug-in protocols supported by different browsers are different, the plug-in needs to be compatible with different kernels and platforms, and the maintenance amount is large.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
An object of embodiments of the present invention is to provide a data transmission method, an apparatus, and a computer-readable storage medium, so that a background service can continue to execute a transmission task after a browser is closed, thereby reducing the maintenance amount of the background service.
In order to solve the above technical problem, an embodiment of the present invention provides a data transmission method, which is applied to a background service, and includes the following steps: determining a transmission task sent by a browser; wherein the browser determines a transmission task; transmitting the transmission task to the background service according to a preset rule in the registry; executing a transmission task; wherein the background service is browser independent.
The embodiment of the invention also provides a data transmission method, which is applied to a browser and comprises the following steps: determining a transmission task; transmitting the transmission task to the background service according to a preset rule in the registry; the background service determines and executes the transmission task, and the background service is independent of the browser.
An embodiment of the present invention further provides a data transmission apparatus, including: a determining module and an executing module; the determining module is coupled with the executing module, and is configured to execute the data transmission method applied to the background service in the foregoing embodiment.
An embodiment of the present invention further provides a data transmission apparatus, including: a determining module and a transmitting module; the determining module is coupled with the transmitting module and is used for executing the data transmission method applied to the browser mentioned in the above embodiment.
An embodiment of the present invention further provides a data transmission apparatus, including: at least one processor; and a memory communicatively coupled to the at least one processor; and a communication component in communication connection with the browser, the communication component receiving and sending data under control of the processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the data transmission method applied to the background service in the embodiment.
An embodiment of the present invention further provides a data transmission apparatus, including: at least one processor; and a memory communicatively coupled to the at least one processor; the communication component is in communication connection with the background service, and receives and sends data under the control of the processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the data transmission method applied to the browser, which is mentioned in the above embodiments.
The embodiment of the invention also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the data transmission method applied to the background service mentioned in the above embodiment.
The embodiment of the invention also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the data transmission method applied to the browser mentioned in the above embodiment.
Compared with the prior art, the background service is independent of the browser, the transmission task is executed in an asynchronous mode, and a user does not need to stay at the current interface to wait for the completion of transmission. Compared with the browser plug-in, the background service is independent of the browser, so that the background service can continue to execute the transmission task after the browser is closed, and normal business operation cannot be interrupted. Moreover, the background service is independent from the browser, so that a plug-in protocol supported by the browser is not required to be considered when the background service is configured, and the maintenance amount of the background service is reduced.
In addition, the transmission task is determined by the browser according to the transmission instruction, the information of the page needing to be accessed and a command beginning with a custom protocol which is written into the code of the front-end webpage of the browser in advance; the command beginning with the custom protocol is used for carrying information of a transmission instruction and a page. In the implementation, the transmission instruction and the information of the page to be accessed are transmitted to the background service through the custom protocol, so that the information interaction between the browser and the background service is realized.
In addition, the background service is started by a system of the data transmission device installed with the background service, wherein the system of the data transmission device starts the background service after determining that the browser is started. In the implementation, the system of the data transmission device controls the background service to be started, manual triggering of a user is not needed, automatic awakening of the background service is achieved, operation of the user is simplified, and user experience is improved.
In addition, before determining the transmission task sent by the browser, the data transmission method further includes: detecting information of background services; the information of the background service comprises system parameter information of the background service and/or authority information of the background service; and determining that the background service meets the preset running condition according to the information of the background service. In the implementation, the system environment information of the background service is detected, and the transmission task is executed after the system environment of the background service meets the preset running condition, so that the transmission failure caused by the problems of version and/or authority after the transmission task is executed is avoided.
In addition, the transmission instruction is an uploading instruction which comprises data to be uploaded and a target position; executing a transmission task, specifically comprising: determining a server corresponding to the webpage according to the information of the webpage; uploading data to be uploaded to a target position in a server corresponding to the webpage according to the uploading instruction; or the transmission instruction is a downloading instruction which comprises data to be downloaded and a storage position; executing a transmission task, specifically comprising: determining a server corresponding to the webpage according to the information of the webpage; and according to the downloading instruction, acquiring the data to be downloaded from the server corresponding to the webpage and storing the data to the storage position.
In addition, the server communicates with the background service according to a pre-agreed protocol.
In addition, in the process of executing the transmission task, the data transmission method further comprises the following steps: and displaying the progress of the uploading task or the downloading task. In the implementation, the background service provides a visual window, so that a user can conveniently master the completion condition of the transmission task, and the user experience is improved.
In addition, before or after determining the transmission task sent by the browser, the data transmission method further comprises the following steps: intermittently detecting whether the background service normally runs; and restarting the background service after determining that the detection result indicates that the background service does not normally run. In the implementation, the background service is automatically restarted when not normally running, so that the continuous running capability of the background service is improved.
In addition, after the transmission task is executed, the data transmission method further includes: and recording the transmission task.
In addition, determining the transmission task specifically includes: determining a transmission task according to a transmission instruction, information of a page to be accessed and a command beginning with a custom protocol written in a code of a front-end webpage of a browser in advance; the command beginning with the custom protocol is used for carrying information of a transmission instruction and a page.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
Fig. 1 is a flowchart of a data transmission method of a first embodiment of the present invention;
FIG. 2 is a schematic diagram of the interaction of a browser, a background service and a server according to a second embodiment of the present invention;
fig. 3 is a flowchart of a data transmission method of a second embodiment of the present invention;
fig. 4 is a flowchart of a data transmission method according to a third embodiment of the present invention;
fig. 5 is a schematic configuration diagram of a data transmission device according to a fourth embodiment of the present invention;
fig. 6 is a schematic overall architecture diagram of a data transmission device according to a fourth embodiment of the present invention;
fig. 7 is a schematic configuration diagram of a data transmission device according to a fifth embodiment of the present invention;
fig. 8 is a schematic configuration diagram of a data transmission device according to a sixth embodiment of the present invention;
fig. 9 is a schematic configuration diagram of a data transmission device according to a seventh embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
A first embodiment of the present invention relates to a data transmission method applied to a background service, as shown in fig. 1, the data transmission method includes the following steps:
step 101: and determining the transmission task sent by the browser.
Specifically, after determining the transmission task, the browser transmits the transmission task to the background service according to a preset rule in the registry. The background service is independent of the browser, namely the background service is started by a system of the data transmission device provided with the background service, and the background service is not started by the browser. The system of the data transfer device starts the background service after determining that the browser is started, rather than being manually triggered by the user.
The browser in the present embodiment may be a browser that is a standalone application, or may be a browser embedded in an application.
It should be noted that, as can be understood by those skilled in the art, in practical application, a preset rule in the registry may be set as needed, and the preset rule enables the browser to transfer the transmission task to the background service after determining the transmission task.
It is worth mentioning that the system of the data transmission device controls the starting of the background service, manual triggering by a user is not needed, automatic awakening of the background service is realized, the operation of the user is simplified, and the user experience is improved.
In the specific implementation, the transmission task is determined by the browser according to a transmission instruction, information of a page to be accessed and a command beginning with a custom protocol, which is written in a code of a front-end webpage of the browser in advance; the command beginning with the custom protocol is used for carrying information of a transmission instruction and a page.
It should be noted that, as can be understood by those skilled in the art, in practical applications, the command beginning with the custom protocol may be written as needed, so that the command beginning with the custom protocol can carry information of the transmission instruction and the page.
It is worth mentioning that the browser writes the information carrying the transmission instruction and the page into the command beginning with the custom protocol, generates the transmission task, and transmits the transmission task to the background service, thereby realizing the information interaction between the browser and the background service.
In the specific implementation, after the background service is started and before a transmission task sent by a browser is determined, information of the background service is detected; the information of the background service comprises system parameter information of the background service and/or authority information of the background service; and determining that the background service meets the preset running condition according to the information of the background service.
It should be noted that the system parameter information of the background service may include version information of the background service, version information of a system in which the data Transmission device of the background service is installed, Transmission Control Protocol (TCP) port information, User Datagram Protocol (UDP) port information, version information of a browser, and other information.
It should be noted that the information of the background service may include service expiration time of the background service, authority information of the background service, and the like, and the specific content of the information of the background service is not limited in this embodiment.
It should be noted that, as can be understood by those skilled in the art, the preset operating condition may be any one or any combination of the latest version of the background service, the successful authentication of the background service, the non-expiration of the background service, and other conditions, and in actual application, the operating condition of the background service may be set according to needs.
The following illustrates the process of installing the background service and detecting the system environment of the background service. When a user opens a webpage embedded with a plug-in engine function for the first time, the browser automatically scans and prompts the user to download the latest version of background service. The user double-clicks the installation package, in the process of installing the background service, the background service registers a custom protocol (url protocol) in a registry of the system, and a calling parameter is designed in advance, so that the browser can call the background service when data transmission is needed. Specifically, when the webpage is loaded, the browser scans whether the background service is installed in the current system, and if the background service is not installed, the browser prompts a user to download the background service and provides a download address. After the background service is installed, the background service detects the system environment of the background service, and the detection variables can be defined as the version information of the background service, the version information of the system, the version information of the browser, the TCP port information, the UDP port information, the service expiration time and the authentication processing. The background service determines whether the system environment of the background service meets preset operation conditions or not, the judgment result is transmitted to the browser or the user is directly prompted through the tray, and after the browser determines that the background service is installed and the judgment result indicates that the system environment of the background service meets the preset operation conditions, the user is prompted through the tray that the plug-in is installed.
Step 102: the transmission task is executed.
In a specific implementation, an interaction diagram of the browser, the background service, and the server is shown in fig. 2. And the browser determines a transmission task according to a result of the business interaction with the user and sends the transmission task to the background service. And the background service executes the transmission task after passing the authentication. In the process of executing the transmission task, the background service can be directly communicated with the server, or can be communicated with the server through the transfer device to upload or download data. The background service and the transfer device, and the server and the transfer device communicate with each other through a private Protocol, such as a Dynamic relay Protocol (DTP).
In a specific implementation, a user opens a related service webpage in a browser, clicks an upload button, pops up a file browsing selection window on the webpage, and selects data to be uploaded, such as a local file or a local folder, to determine an upload target position. The browser determines an uploading instruction according to the data to be uploaded selected by a user and the determined position of the road sign to be uploaded, determines a transmission task according to the uploading instruction, the information of the page to be accessed and a command beginning with a custom protocol written in a code of a front-end webpage of the browser in advance, and sends the transmission task to the background service. After receiving the transmission task, the background service determines information and an uploading instruction of a webpage in the transmission task, wherein the uploading instruction comprises data to be uploaded and a target position. The background service determines a server corresponding to the webpage according to the information of the webpage; and uploading the data to be uploaded to a target position in a server corresponding to the webpage according to the uploading instruction. After the background service finishes uploading, the server copies the uploaded data to a specified target position, and refreshes a browser page.
In the specific implementation, a user opens a related service webpage in a browser, clicks data to be downloaded, such as a file or a folder, pops up a folder browsing window on the webpage, and selects a position to be stored. The browser determines a downloading instruction according to the data to be downloaded and the storage position selected by the user, determines a transmission task according to the downloading instruction, the information of the page to be accessed and a command which is written in a code of a front-end webpage of the browser in advance and starts with a custom protocol, and sends the transmission task to the background service. After receiving the transmission task, the background service determines information and a downloading instruction of a webpage in the transmission task, wherein the downloading instruction comprises data to be downloaded and a storage position. The background service determines a server corresponding to the webpage according to the information of the webpage; and according to the downloading instruction, acquiring the data to be downloaded from the server corresponding to the webpage and storing the data to the storage position.
It should be noted that, as can be understood by those skilled in the art, in practical application, a protocol between the background service and the server may be set according to needs, so that the background service and the server communicate according to a predetermined protocol, so as to improve a transmission speed between the background service and the server. For example, the background service and the server may communicate based on a protocol modified from UDP.
It should be noted that, in practical applications, the background service may display the progress of the uploading task or the downloading task during the process of executing the transmission task, as will be understood by those skilled in the art. For example, the background service may feed back the current task state through a progress bar and a rate curve of the dynamic feedback transmission process.
It is worth mentioning that the browser provides a visual window, so that the user can conveniently master the completion condition of the transmission task, and the user experience is improved.
The above description is only for illustrative purposes and does not limit the technical aspects of the present invention.
Compared with the prior art, in the data transmission method provided by the embodiment, the background service is independent of the browser, the transmission task is executed in an asynchronous mode, and a user does not need to stay in the current interface to wait for the completion of transmission. Compared with the browser plug-in, the background service is independent of the browser, so that the background service can continue to execute the transmission task after the browser is closed, and normal business operation cannot be interrupted. Moreover, the background service is independent from the browser, so that a plug-in protocol supported by the browser is not required to be considered when the background service is configured, and the maintenance amount of the background service is reduced. In addition, the system of the data transmission device controls the starting of the background service, manual triggering of a user is not needed, automatic awakening of the background service is achieved, operation of the user is simplified, and user experience is improved.
A second embodiment of the present invention relates to a data transmission method, which is further improved on the basis of the first embodiment, and the specific improvements are as follows: after step 102, other related steps are added.
Specifically, as shown in fig. 3, the present embodiment includes steps 201 to 203, where steps 201 and 202 are substantially the same as steps 101 and 102 in the first embodiment, respectively, and are not repeated here. The following mainly introduces the differences:
step 201 and step 202 are performed.
Step 203: and recording the transmission task.
Specifically, after the background service completes the transmission task, the background service saves the relevant information of the transmission task and updates the historical transmission record.
It is worth mentioning that the background service records the executed transmission task, so that the user can conveniently check the download record or the upload record in the later period, and the user experience is improved.
In specific implementation, the background service intermittently detects whether the background service normally operates, and restarts the background service after determining that the detection result indicates that the background service does not normally operate.
It is worth mentioning that the background service is restarted automatically when not running normally, so that the continuous running capability of the background service is improved.
The above description is only for illustrative purposes and does not limit the technical aspects of the present invention.
Compared with the prior art, in the data transmission method provided by the embodiment, the background service is independent of the browser, the transmission task is executed in an asynchronous mode, and a user does not need to stay in the current interface to wait for the completion of transmission. Compared with the browser plug-in, the background service is independent of the browser, so that the background service can continue to execute the transmission task after the browser is closed, and normal business operation cannot be interrupted. Moreover, the background service is independent from the browser, so that a plug-in protocol supported by the browser is not required to be considered when the background service is configured, and the maintenance amount of the background service is reduced. In addition, the background service records the executed transmission task, so that the user can conveniently check the download record or the upload record in the later period, and the user experience is improved. The background service is automatically restarted when not normally running, so that the continuous running capability of the background service is improved.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
A third embodiment of the present invention relates to a data transmission method applied to a browser. As shown in fig. 4, the data transmission method includes the following steps:
step 301: a transmission task is determined.
Specifically, the browser determines a transmission task according to a transmission instruction, information of a page to be accessed and a command beginning with a custom protocol written in a code of a front-end webpage of the browser in advance; the command beginning with the custom protocol is used for carrying information of a transmission instruction and a page.
It should be noted that, as can be understood by those skilled in the art, in practical applications, the command beginning with the custom protocol may be written as needed, so that the command beginning with the custom protocol can carry information of the transmission instruction and the page.
It is worth mentioning that the browser writes the information carrying the transmission instruction and the page into the command beginning with the custom protocol, generates the transmission task, and transmits the transmission task to the background service, thereby realizing the information interaction between the browser and the background service.
Step 302: and transmitting the transmission task to the background service according to a preset rule in the registry.
The background service determines and executes the transmission task, and the background service is independent of the browser.
It should be noted that, as can be understood by those skilled in the art, in practical application, a preset rule in the registry may be set as needed, and the preset rule enables the browser to transfer the transmission task to the background service after determining the transmission task.
It should be noted that, as can be understood by those skilled in the art, in the present embodiment, reference may be made to the relevant description in the first embodiment and the second embodiment for the process of determining the transmission task by the browser, transferring the transmission task, and executing the transmission task by the background service, and details are not described here.
Compared with the prior art, according to the data transmission method provided by the embodiment, when the browser needs to upload or download data, a transmission task is generated, and the transmission task is transmitted to the background service according to the preset rule in the registry. The background service is independent of the browser, and the transmission task is executed in an asynchronous mode without the need that a user stays in the current interface to wait for the completion of transmission. Even if the browser is closed, the background service can continue to execute the transmission task without interrupting normal business operation. Moreover, the background service is independent from the browser, so that a plug-in protocol supported by the browser is not required to be considered when the background service is configured, and the maintenance amount of the background service is reduced. In addition, the system of the data transmission device controls the starting of the background service, manual triggering of a user is not needed, automatic awakening of the background service is achieved, operation of the user is simplified, and user experience is improved.
A fourth embodiment of the present invention relates to a data transmission device, as shown in fig. 5, including: a determination module 401 and an execution module 402; the determining module 401 and the executing module 402 are coupled to execute the data transmission method applied to the background service in the above embodiments.
In a specific implementation, a background service of a system (such as Windows, an operating system of a terminal) of the data transmission apparatus executes the data transmission method mentioned in the first embodiment or the second embodiment. The background service is started by a system of a data transmission device provided with the background service, wherein the system of the data transmission device starts the background service after determining that the browser is started.
In a specific implementation, as shown in fig. 6, the determining module 401 includes a browser communication sub-module and a plug-in engine sub-module, the executing module 402 includes a plug-in agent sub-module, and the background service further includes a process daemon module, and in a process of starting the browser communication sub-module each time, the system detects whether the process daemon module and the plug-in engine sub-module are already running in the background, and if not, the daemon module and the plug-in engine sub-module are started. And the system starts a browser communication submodule after receiving the custom protocol. And after the browser analyzes the parameters of the transmission task sent by the browser, the browser communication submodule transmits the parameters to the plug-in engine submodule in a memory sharing mode. The plug-in engine submodule is used for receiving and processing a business instruction of the browser, namely transmitting a task, and simultaneously feeding back the current task state and speed through the user interface. The plug-in agent sub-module is a data processing layer corresponding to the user interface and is mainly responsible for data transmission and interaction with the server. The process daemon module is used for regularly detecting whether the processes of the plug-in engine submodule and the plug-in agent submodule normally run or not, and automatically restarting the processes of the plug-in engine submodule and the plug-in agent submodule if the processes of the plug-in engine submodule and the plug-in agent submodule normally run. The background service can also comprise a transmission protocol module, and the plug-in agent sub-module is communicated with the server according to a protocol set in the transmission protocol module to accelerate data transmission.
It should be understood that this embodiment is an example of the apparatus corresponding to the first and second embodiments, and may be implemented in cooperation with the first and second embodiments. The related technical details mentioned in the first embodiment and the second embodiment are still valid in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the first embodiment and the second embodiment.
A fifth embodiment of the present invention relates to a data transmission device, as shown in fig. 7, including: a determination module 501 and a transmission module 502; the determining module 501 and the transmitting module 502 are coupled to execute the data transmission method applied to the browser in the above embodiment.
It should be understood that this embodiment is an example of an apparatus corresponding to the third embodiment, and that this embodiment can be implemented in cooperation with the third embodiment. The related technical details mentioned in the third embodiment are still valid in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the third embodiment.
It should be noted that each module referred to in this embodiment is a logical module, and in practical applications, one logical unit may be one physical unit, may be a part of one physical unit, and may be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, elements that are not so closely related to solving the technical problems proposed by the present invention are not introduced in the present embodiment, but this does not indicate that other elements are not present in the present embodiment.
A sixth embodiment of the present invention relates to a data transmission device, as shown in fig. 8, including: at least one processor 601; and a memory 602 communicatively coupled to the at least one processor 601; and a communication component 603 communicatively coupled to the browser, the communication component 603 receiving and transmitting data under control of the processor 601; the memory 602 stores instructions executable by the at least one processor 601, and the instructions are executed by the at least one processor 601 to enable the at least one processor 601 to execute the data transmission method according to the first embodiment or the second embodiment.
A seventh embodiment of the present invention relates to a data transmission device, as shown in fig. 9, including: at least one processor 701; and, a memory 702 communicatively coupled to the at least one processor 701; and a communication component 703 communicatively coupled to the background service, the communication component 703 receiving and transmitting data under the control of the processor 701; the memory 702 stores instructions executable by the at least one processor 701, and the instructions are executed by the at least one processor 701, so that the at least one processor 701 can execute the data transmission method according to the third embodiment.
The sixth and seventh embodiments include: one or more processors and memory, one processor being exemplified in fig. 8 and 9. The processor and the memory may be connected by a bus or other means, and fig. 8 and 9 illustrate the connection by a bus. The memory, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The processor executes various functional applications and data processing of the device by executing nonvolatile software programs, instructions, and modules stored in the memory, that is, the data transmission method described above is implemented.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store a list of options, etc. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the external device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
One or more modules are stored in the memory and, when executed by the one or more processors, perform the data transmission method of any of the method embodiments described above.
The product can execute the method provided by the embodiment of the application, has corresponding functional modules and beneficial effects of the execution method, and can refer to the method provided by the embodiment of the application without detailed technical details in the embodiment.
An eighth embodiment of the present invention relates to a computer-readable storage medium storing a computer program. The computer program, when executed by the processor, implements the data transfer method applied to the background service of the first embodiment or the second embodiment.
A ninth embodiment of the present invention relates to a computer-readable storage medium storing a computer program. The computer program, when executed by a processor, implements the data transfer method applied to the browser of the third embodiment.
That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.
Claims (17)
1. A data transmission method is applied to background services and comprises the following steps:
determining a transmission task sent by a browser; the browser determines a transmission task according to a result of interaction with a user service; transmitting the transmission task to the background service according to a preset rule in a registry; the preset rule enables the browser to transmit the transmission task to the background service after the transmission task is determined;
executing the transmission task;
wherein the background service is independent of the browser.
2. The data transmission method according to claim 1, wherein the transmission task is determined by the browser according to the transmission instruction, the information of the page to be accessed, and the command beginning with the custom protocol pre-written in the code of the front-end webpage of the browser; and the command beginning with the custom protocol is used for carrying the transmission instruction and the information of the page.
3. The data transmission method according to claim 1, wherein the background service is started by a system of a data transmission device that installs the background service, and wherein the system of the data transmission device starts the background service after determining that the browser is started.
4. The data transmission method according to claim 1, wherein before the determining the transmission task sent by the browser, the data transmission method further comprises:
detecting information of the background service; the information of the background service comprises system parameter information of the background service and/or authority information of the background service;
and determining that the background service meets a preset running condition according to the information of the background service.
5. The data transmission method according to claim 2, wherein the transmission instruction is an upload instruction, and the upload instruction includes data to be uploaded and a target location; the executing the transmission task specifically includes: determining a server corresponding to the webpage according to the information of the webpage; uploading the data to be uploaded to the target position in a server corresponding to the webpage according to the uploading instruction; alternatively, the first and second electrodes may be,
the transmission instruction is a downloading instruction which comprises data to be downloaded and a storage position; the executing the transmission task specifically includes: determining a server corresponding to the webpage according to the information of the webpage; and acquiring the data to be downloaded from a server corresponding to the webpage according to the downloading instruction, and storing the data to the storage position.
6. The data transmission method of claim 5, wherein the server and the background service communicate according to a pre-agreed protocol.
7. The data transmission method according to claim 5, wherein during the execution of the transmission task, the data transmission method further comprises:
and displaying the progress of the uploading task or the downloading task.
8. The data transmission method according to any one of claims 1 to 7, wherein before or after the determining of the transmission task sent by the browser, the data transmission method further comprises:
intermittently detecting whether the background service is normally operated;
and restarting the background service after determining that the detection result indicates that the background service does not normally run.
9. The data transmission method according to any one of claims 1 to 7, wherein after the performing the transmission task, the data transmission method further comprises:
and recording the transmission task.
10. A data transmission method is applied to a browser and comprises the following steps:
determining a transmission task according to a result of interaction with the user service;
transmitting the transmission task to a background service according to a preset rule in a registry; the preset rule enables the browser to transmit the transmission task to the background service after the transmission task is determined; the background service determines and executes the transmission task, and the background service is independent of the browser.
11. The data transmission method according to claim 10, wherein the determining of the transmission task specifically includes:
determining the transmission task according to a transmission instruction, information of a page to be accessed and a command beginning with a custom protocol written in a code of a front-end webpage of the browser in advance;
and the command beginning with the custom protocol is used for carrying the transmission instruction and the information of the page.
12. A data transmission apparatus, comprising: a determining module and an executing module; the determining means and the executing means are coupled for executing the data transmission method of any one of claims 1 to 9.
13. A data transmission apparatus, comprising: a determining module and a transmitting module; the determining means is coupled to the transmitting means for performing the data transmission method of claim 10 or 11.
14. A data transmission apparatus, comprising: at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; and the number of the first and second groups,
a communication component in communicative connection with the browser, the communication component receiving and sending data under control of the processor;
wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the data transfer method of any one of claims 1 to 9.
15. A data transmission apparatus, comprising: at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; and the number of the first and second groups,
a communication component in communicative connection with the background service, the communication component receiving and sending data under control of the processor;
wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the data transfer method of any one of claims 10 or 11.
16. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the data transmission method according to any one of claims 1 to 9.
17. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the data transmission method according to claim 10 or 11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811331571.8A CN109361757B (en) | 2018-11-09 | 2018-11-09 | Data transmission method and device and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811331571.8A CN109361757B (en) | 2018-11-09 | 2018-11-09 | Data transmission method and device and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109361757A CN109361757A (en) | 2019-02-19 |
CN109361757B true CN109361757B (en) | 2022-02-25 |
Family
ID=65344641
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811331571.8A Active CN109361757B (en) | 2018-11-09 | 2018-11-09 | Data transmission method and device and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109361757B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112463398A (en) * | 2019-09-09 | 2021-03-09 | 杭州海康机器人技术有限公司 | File transmission method and device, terminal equipment and storage medium |
CN113901356B (en) * | 2021-09-28 | 2022-08-09 | 北京五八信息技术有限公司 | Information processing method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104065678A (en) * | 2013-03-21 | 2014-09-24 | 中国科学院声学研究所 | Dual-mode data reception and access method based on embedded browser |
CN104079649A (en) * | 2014-06-27 | 2014-10-01 | 北京奇虎科技有限公司 | Method for performing downloading in browser and browser |
CN108199925A (en) * | 2018-01-30 | 2018-06-22 | 网宿科技股份有限公司 | A kind of data transmission method for uplink, method of reseptance and device |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1674703A (en) * | 2005-05-17 | 2005-09-28 | 北京立通无限科技有限公司 | Method for downloading Email appendage at mobile pone terminal |
US8601475B2 (en) * | 2005-08-02 | 2013-12-03 | Aol Inc. | Download and upload of email messages using control commands in a client/server web application |
CN101170507B (en) * | 2007-11-14 | 2010-09-29 | 中兴通讯股份有限公司 | Asynchronous concurrent processing method |
US20120078875A1 (en) * | 2010-09-27 | 2012-03-29 | Michael Price | Web browser contacts plug-in |
CN102932390B (en) * | 2011-08-11 | 2015-07-08 | 阿里巴巴集团控股有限公司 | Network request processing method and system, and network service providing device |
CN102938120B (en) * | 2011-08-15 | 2016-08-10 | 徐雷 | IMS trading payment system |
CN103067423B (en) * | 2011-10-20 | 2015-10-14 | 腾讯科技(深圳)有限公司 | The method of browser kernel adaptation and browser |
CN103607422B (en) * | 2013-10-18 | 2017-04-05 | 北京奇虎科技有限公司 | The processing method of cloud service information, browser and system |
CN105204861B (en) * | 2015-09-29 | 2018-07-10 | 上海二三四五网络科技有限公司 | A kind of registration table reorientation method and device |
CN108270803B (en) * | 2016-12-30 | 2021-02-02 | 艾迪普科技股份有限公司 | Method and system for realizing transmission of network file and desktop application through webpage technology |
-
2018
- 2018-11-09 CN CN201811331571.8A patent/CN109361757B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104065678A (en) * | 2013-03-21 | 2014-09-24 | 中国科学院声学研究所 | Dual-mode data reception and access method based on embedded browser |
CN104079649A (en) * | 2014-06-27 | 2014-10-01 | 北京奇虎科技有限公司 | Method for performing downloading in browser and browser |
CN108199925A (en) * | 2018-01-30 | 2018-06-22 | 网宿科技股份有限公司 | A kind of data transmission method for uplink, method of reseptance and device |
Also Published As
Publication number | Publication date |
---|---|
CN109361757A (en) | 2019-02-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109995755B (en) | Login state control method and device based on applet framework | |
EP3179701B1 (en) | File upload and download methods and associated server | |
CN108683679B (en) | Multi-account login method, device, equipment and storage medium of Web APP | |
EP2806357A1 (en) | Method and communication device for updating a web application | |
CN109361757B (en) | Data transmission method and device and computer readable storage medium | |
CN109428773B (en) | Communication method and device | |
CN106789535B (en) | IP access method and device of SSL VPN | |
KR20160054474A (en) | Method and apparatus of downloading and installing a client | |
CN107391193A (en) | A kind of client, the system and method for configuration server | |
US10306050B2 (en) | Controlling the actions of a mobile browser | |
US20170351503A1 (en) | Method and system for installing software | |
CN103873491A (en) | VPN safe browser system and setting method | |
CN110166547A (en) | Terminal remote access control method | |
CN114189559B (en) | Axios-based interface repeated request processing method and system | |
CN110741617B (en) | Resource updating method and device, computer equipment and storage medium | |
CN108287737B (en) | Service Worker starting method and device and electronic equipment | |
CN105071922A (en) | Method of using cryptographic equipment by JAVASCRIPT | |
CN104079540A (en) | Method, device and system of updating application as well as user equipment | |
WO2015021827A1 (en) | Method,device and system for offline reconnection of a web application | |
EP3236635B1 (en) | Data communication method and device | |
CN110688136A (en) | Application program updating method and device | |
CN113765936A (en) | Data transmission method, device, equipment and computer readable storage medium | |
CN107332821B (en) | Method and device for realizing communication between client and server | |
CN109548020B (en) | Compensation method and device after authentication failure, server and storage medium | |
CN107094089B (en) | Network management method, related equipment and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |