Data processing method and device

Through the intermediate server, the download request is parsed and the associated SDK is determined, and the materials are obtained concurrently from the specified location, solving the problem of low asynchronous download efficiency and achieving efficient one-click download and concurrent synchronous download.

CN119172439BActive Publication Date: 2025-02-11BEIJING BISCUIT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411676365.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-02-11
Estimated Expiration
2044-11-22

Smart Images

  • Figure CN119172439B_ABST
    Figure CN119172439B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a data processing method and device, wherein the method includes: when the material presented in the enterprise-side web page is selected to trigger a download request, the intermediate server obtains the request, wherein when the web page presented on the enterprise side is triggered by a material upload request, the intermediate server responds to the upload request and stores the uploaded materials in designated locations respectively; the intermediate server parses the request to obtain an identifier; based on the identifier, the SDK associated with it is determined, and the corresponding material is concurrently obtained from the designated location based on the SDK. The access to multiple cloud storages is coordinated by the intermediate server and the integrated SDK to achieve one-click download of the material, and the corresponding SDK is used to concurrently download the picture material according to the storage location of the picture material, thereby achieving concurrent synchronous download.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information processing technology, and in particular to a data processing method and device. Background Art

[0002] When a user performs a download operation on a presented material on a web page, asynchronous download is usually used. This asynchronous download requires a long wait time, and the download efficiency needs to be further improved. Summary of the invention

[0003] The main purpose of the present invention is to provide a data processing method and device to solve the deficiencies existing in the related art.

[0004] In order to achieve the above-mentioned purpose, according to the first aspect of the present invention, a data processing method is provided, comprising: when the material presented in the enterprise-side web page is selected to trigger a download request, the intermediate server obtains the request, wherein when the web page presented on the enterprise side is triggered by a material upload request, the intermediate server responds to the upload request and stores the uploaded materials to designated locations respectively; the intermediate server parses the request to obtain an identifier; determines the SDK associated with it based on the identifier, and concurrently obtains the corresponding material from the designated location based on the SDK.

[0005] Optionally, the method further includes: compressing the acquired material; packaging the compressed material and storing it in a temporary directory; and sending the packaged material to the enterprise end.

[0006] Optionally, the method further includes: the intermediate server sending material status information to the enterprise end through WebSocket, so that the enterprise end web page presents the transmission status of the current material based on the material status information.

[0007] Optionally, after the packaged material is sent to the enterprise end, the data in the temporary directory is deleted.

[0008] Optionally, multiple subdirectories are constructed in the temporary directory, wherein different subdirectories are mapped with different enterprise logos; when the compressed material is packaged and stored in the temporary directory, the target subdirectory is determined based on the logo; and the packaged material is mounted under the target subdirectory.

[0009] Optionally, when deleting the data in the temporary directory, a mapped target subdirectory is determined based on the identifier; and the data mounted under the target subdirectory is deleted.

[0010] Optionally, compressing the materials in the temporary directory includes: compressing using different compression methods based on the amount of the materials.

[0011] According to a second aspect of the present invention, there is provided a data processing device, comprising: a request acquisition unit, for an intermediate server to acquire the request when a material presented in an enterprise-side web page is selected to trigger a download request, wherein when a material upload request is triggered on the web page presented on the enterprise side, the intermediate server responds to the upload request and stores the uploaded materials in designated locations respectively; a request response unit, for the intermediate server to parse the request and obtain identifications of different materials; determine an SDK associated with the material based on the material identification, and concurrently acquire corresponding materials from designated locations based on the SDK.

[0012] According to a third aspect of the present invention, there is provided a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, wherein the computer instructions are used to cause the computer to execute any one of the methods described in the first aspect.

[0013] According to a fourth aspect of the present invention, there is provided an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the method described in any one implementation of the first aspect.

[0014] The data processing method and device of this embodiment include: when the material presented in the enterprise-side web page is selected to trigger a download request, the intermediate server obtains the request, wherein when the web page presented on the enterprise side is triggered by a material upload request, the intermediate server responds to the upload request and stores the uploaded materials in the designated location respectively; the intermediate server parses the request to obtain an identifier; based on the identifier, the SDK associated with it is determined, and the corresponding material is concurrently obtained from the designated location based on the SDK. The access to multiple cloud storages is coordinated through the intermediate server and the integrated SDK to achieve one-click download of the material, and the corresponding SDK is used to concurrently download the picture material according to the storage location of the picture material, thereby achieving concurrent synchronous download. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1 is a flow chart of a data processing method according to an embodiment of the present invention;

[0017] Figure 2 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0018] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0019] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so as to describe the embodiments of the present invention described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0020] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0021] According to an embodiment of the present invention, a data processing method is provided, such as Figure 1 As shown, it includes the following steps 101 to 103:

[0022] Step 101: When the material presented in the enterprise-side web page is selected to trigger a download request, the intermediate server obtains the request. When the web page presented on the enterprise side is triggered by a material upload request, the intermediate server responds to the upload request and stores the uploaded materials in designated locations respectively.

[0023] In this step, the user logs in through the corporate account. After logging in, the materials under it can be presented on the web page. After presentation, a selected component is provided for the user to perform a selection operation, and a download request is generated after the selection operation is performed, and the download request is sent to the intermediate server.

[0024] The material is uploaded in advance on the web page. When uploading, the upload request can be triggered by the component. The intermediate server determines the enterprise identity indicated by the request based on the upload request. Different enterprise identities are associated with different SDKs. Based on the SDK, the selected material is uploaded to different locations, and the designated locations are different clouds.

[0025] Furthermore, the intermediate server may adopt Node.js (Express.js framework) and use Express.js to create an API endpoint to receive download requests.

[0026] Step 102: The intermediate server parses the request to obtain identifiers of different materials.

[0027] Step 103: Determine the SDK associated with the identifier based on the identifier, and concurrently obtain corresponding materials from a specified location based on the SDK.

[0028] In this step, different cloud vendor SDKs can be pre-integrated to meet the different storage needs of different enterprises. The intermediate server can parse the request to obtain the enterprise ID corresponding to the request and the different material IDs corresponding to the material. The corresponding SDK is determined based on the enterprise ID, and different materials are obtained through the corresponding SDK based on the material ID.

[0029] This embodiment coordinates access to multiple cloud storages through an intermediate server and an integrated SDK to achieve one-click downloading of materials. According to the storage location of the image materials, the corresponding SDK is used to concurrently download the image materials, thereby achieving concurrent synchronous downloading.

[0030] As an optional implementation manner of this embodiment, the method also includes: compressing the acquired material; packaging the compressed material and storing it in a temporary directory; and sending the packaged material to the enterprise end.

[0031] In this optional implementation, a temporary directory is created to store the downloaded image material, and the material is compressed. The compressed material is then packaged, the packaged files are stored in the temporary directory, and the packaged material is sent to the enterprise end. This implementation realizes online compression and packaging of the material.

[0032] As an optional implementation of this embodiment, the method further includes: the intermediate server sends material status information to the enterprise end through WebSocket, so that the enterprise end web page presents the transmission status of the current material based on the material status information.

[0033] In this optional implementation, the enterprise side can establish a WebSocket with the intermediate server for real-time status updates. Through the WebSocket connection, real-time information such as download progress is received, and the enterprise side can update the UI based on this information.

[0034] As an optional implementation method of this embodiment, after the packaged material is sent to the enterprise end, the data in the temporary directory is deleted.

[0035] In this optional implementation, after the packaged data is downloaded, the packaged data in the temporary directory is deleted to release storage space.

[0036] As an optional implementation method of this embodiment, multiple sub-directories are constructed in the temporary directory, where different sub-directories are mapped with different enterprise logos; when the compressed materials are packaged and stored in the temporary directory, the target sub-directory is determined based on the logo; and the packaged materials are mounted under the target sub-directory.

[0037] In this optional implementation, different subdirectories are distinguished by different corporate identifiers, and the target subdirectory to be mounted is determined based on the corporate identifier corresponding to the packaged material, and the packaged material is mounted under the target subdirectory. Furthermore, different packaged materials under the same subdirectory are associated with different material identifiers.

[0038] As an optional implementation of this embodiment, when deleting data in the temporary directory, the mapped current subdirectory is determined based on the identifier; and the data mounted under the current subdirectory is deleted.

[0039] In this optional implementation, after the sending is completed, the corresponding target subdirectory is determined based on the identifier, and the data under the subdirectory is deleted. It is ensured that temporary files and directories are cleaned up in time after the data download is completed to avoid taking up too much storage space.

[0040] Furthermore, if there are multiple users requesting to download different sets of materials under the same enterprise ID, when deleting, the subdirectory is determined based on the enterprise ID, and the corresponding packaged material is further determined based on the material ID of the sent material in the subdirectory, and the packaged material is deleted.

[0041] Real-time communication information is determined through websocket, and the material currently requested for download is cleaned up in time after completion, thus laying the foundation for the next efficient response of different users under the enterprise.

[0042] As an optional implementation method of this embodiment, compressing the materials in the temporary directory includes: compressing using different compression methods based on the different amounts of materials.

[0043] In this optional implementation, for downloading and compressing a large number of image materials, it is necessary to consider using more efficient algorithms or parallel processing technologies to optimize performance. According to the number of materials obtained in each request, a suitable compression method can be automatically selected from the specified compression methods to compress the materials, such as a lossy compression method or a lossless compression method.

[0044] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0045] According to an embodiment of the present invention, a data processing device is also provided, including a request acquisition unit, which is used for an intermediate server to obtain the request after the material presented in the enterprise-side web page is selected to trigger a download request, wherein when the web page presented on the enterprise side is triggered by a material upload request, the intermediate server responds to the upload request and stores the uploaded materials to designated locations respectively; a request response unit, the intermediate server parses the request to obtain the identification of different materials; determines the SDK associated with it based on the material identification, and concurrently obtains the corresponding material from the designated location based on the SDK.

[0046] As an optional implementation method of this embodiment, the device also includes: a processing unit, compressing the acquired material; packaging the compressed material and storing it in a temporary directory; and sending the packaged material to the enterprise end.

[0047] As an optional implementation of this embodiment, the intermediate server sends material status information to the enterprise end through WebSocket, so that the enterprise end web page presents the transmission status of the current material based on the material status information.

[0048] As an optional implementation method of this embodiment, after the packaged material is sent to the enterprise end, the data in the temporary directory is deleted.

[0049] As an optional implementation method of this embodiment, multiple sub-directories are constructed in the temporary directory, where different sub-directories are mapped with different enterprise logos; when the compressed materials are packaged and stored in the temporary directory, the target sub-directory is determined based on the logo; and the packaged materials are mounted under the target sub-directory.

[0050] As an optional implementation of this embodiment, when deleting the data in the temporary directory, the mapped target subdirectory is determined based on the identifier; and the data mounted under the target subdirectory is deleted.

[0051] As an optional implementation of this embodiment, compressing the materials in the temporary directory includes: compressing using different compression methods based on the amount of materials.

[0052] According to an embodiment of the present invention, the present invention also provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can implement the method described in any of the above embodiments when executing.

[0053] According to an embodiment of the present invention, the present invention further provides a readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to implement the method described in any of the above embodiments when executed.

[0054] According to an embodiment of the present invention, the present invention further provides a computer program product, which can implement the method described in any of the above embodiments when executed by a processor.

[0055] Figure 2 A schematic block diagram of an example electronic device 300 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices.

[0056] like Figure 2 As shown, the electronic device 300 includes a computing unit 301, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 302 or a computer program loaded from a storage unit 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 can also be stored. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0057] A number of components in the electronic device 300 are connected to the I / O interface 305, including: an input unit 306, such as a keyboard, a mouse, etc.; an output unit 307, such as various types of displays, speakers, etc.; a storage unit 308, such as a disk, an optical disk, etc.; and a communication unit 309, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 309 allows the electronic device 300 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0058] The computing unit 301 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 301 performs the various methods and processes described above, such as the object matching method. For example, in some embodiments, the object matching method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 308. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 300 via the ROM 302 and / or the communication unit 309. When the computer program is loaded into the RAM 303 and executed by the computing unit 301, one or more steps of the method described above may be performed.

[0059] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0060] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0061] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

Claims

1. A data processing method, characterized in that: include: When the material presented in the enterprise-side web page is selected to trigger a download request, the intermediate server obtains the request, wherein, when the web page presented on the enterprise side is triggered to trigger a material upload request, the intermediate server responds to the upload request and stores the uploaded materials in the designated locations respectively; The intermediate server parses the request and obtains an identifier; Determine the SDK associated with the identifier based on the identifier, and concurrently obtain the corresponding material from the specified location based on the SDK; The method also includes: compressing the acquired material; packaging the compressed material and storing it in a temporary directory; sending the packaged material to the enterprise end; Wherein, multiple sub-directories are constructed in the temporary directory, and different sub-directories are mapped with different enterprise logos; when the compressed material is packaged and stored in the temporary directory, the target sub-directory is determined based on the logo; the packaged material is mounted under the target sub-directory; After the packaged material is sent to the enterprise end, the data in the temporary directory is deleted. When deleting the data in the temporary directory, the mapped target subdirectory is determined based on the identifier; and the data mounted under the target subdirectory is deleted.

2. The data processing method according to claim 1, characterized in that: The method also includes: The intermediate server sends the material status information to the enterprise end through WebSocket, so that the enterprise end web page presents the transmission status of the current material based on the material status information.

3. The data processing method according to claim 1, characterized in that: Compressing the materials in the temporary directory includes: compressing with different compression methods based on the different amounts of materials.

4. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method according to any one of claims 1 to 3.

5. An electronic device, characterized in that: include: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the method described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Material receiving method, device and system

    CN109214855A

  • Customized label printing method and device and storage medium

    CN114371762A