CN115914286A - Asynchronous uploading method and system of mass photos, electronic equipment and medium - Google Patents

Asynchronous uploading method and system of mass photos, electronic equipment and medium Download PDF

Info

Publication number
CN115914286A
CN115914286A CN202211367454.3A CN202211367454A CN115914286A CN 115914286 A CN115914286 A CN 115914286A CN 202211367454 A CN202211367454 A CN 202211367454A CN 115914286 A CN115914286 A CN 115914286A
Authority
CN
China
Prior art keywords
uploading
photos
photo
mobile terminal
asynchronous
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211367454.3A
Other languages
Chinese (zh)
Inventor
逯长松
任晓鹏
任喜海
赵洪溢
吴国华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Peoples Insurance Company of China
Original Assignee
Peoples Insurance Company of China
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 Peoples Insurance Company of China filed Critical Peoples Insurance Company of China
Priority to CN202211367454.3A priority Critical patent/CN115914286A/en
Publication of CN115914286A publication Critical patent/CN115914286A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method, a system, electronic equipment and a medium for asynchronously uploading massive photos, which relate to the technical field of data transmission and comprise the following steps: acquiring a claim settlement photo group to be uploaded through a mobile terminal; uploading a plurality of claim photos in the claim photo group to be uploaded to a background server through asynchronous concurrent multithreading by a mobile terminal; the uploading state of each claim settlement photo is sent to the mobile terminal for local storage through the background server; the uploading state comprises uploading failure and uploading success; and uploading the claim photos with uploading failure state to a background server through asynchronous concurrent multithreading by the mobile terminal at regular time. The invention realizes the timely uploading of the photos and solves the problem of the uploading and the loss of the photos.

Description

Asynchronous uploading method and system of mass photos, electronic equipment and medium
Technical Field
The present invention relates to the field of data transmission technologies, and in particular, to a method, a system, an electronic device, and a medium for asynchronously uploading a large number of photos.
Background
The agricultural insurance has the characteristics of multiple points, large quantity and dispersed spatial distribution. In addition, in rural areas, especially in mountain areas, network signals are weak, and the mobile terminal is greatly influenced on-line verification, survey, photographing and uploading. In addition, the number of invested insurance of farmers is large, the number of photos is large during label checking and shooting and risk finding, the photos are uploaded to the server background, if an asynchronous uploading processing mechanism is not adopted, the uploading time is long, the user experience is poor, and if the signals are unstable, the uploading is interrupted, the photos are lost and the like.
When a photo is uploaded at an APP (application) end of a mobile phone, the photo file is large, network bandwidth is occupied, especially in actual agricultural and dangerous business, a large number of on-site photos need to be collected to be reserved as image data in the processes of verification and survey, the current common real-time interface uploading technology is adopted, the problems of photo loss, slow photo uploading and poor user experience are caused frequently due to the influence of factors such as network signals, server performance bottlenecks and the like.
Disclosure of Invention
The invention aims to provide a method, a system, electronic equipment and a medium for asynchronously uploading massive photos, which can realize timely uploading and solve the problem of photo uploading loss.
In order to achieve the purpose, the invention provides the following scheme:
in a first aspect, the present invention provides an asynchronous uploading method of a large number of photos, including:
acquiring a claim settlement photo group to be uploaded through a mobile terminal; the photo group to be uploaded comprises a plurality of photo groups;
uploading the plurality of claim settlement photos in the claim settlement photo group to be uploaded to a background server through the mobile terminal by asynchronous concurrent multithreading;
the uploading state of each claim settlement photo is sent to the mobile terminal through the background server for local storage; the uploading state comprises uploading failure and uploading success;
and uploading the claim settlement photos with uploading failure state to the background server through asynchronous concurrent multithreading at regular time by the mobile terminal.
Optionally, the asynchronous uploading method of a large number of photos further includes:
and storing the uploading state of each claim photo through a local Room database of the mobile terminal.
Optionally, the background server is a head office application server;
uploading the plurality of claim photographs in the claim photograph group to be uploaded to a background server through the mobile terminal by asynchronous concurrent multithreading, and the method specifically comprises the following steps:
and uploading the plurality of claim photos in the claim photo group to be uploaded to the head office application server through asynchronous concurrent multithreading via a firewall isolation area of the head office through the mobile terminal.
Optionally, the background server includes a head office application server, a head office claim settlement service server, and a branch office image server;
the asynchronous uploading method of the massive photos further comprises the following steps:
receiving and storing the claim photos with the uploading states being successful through the head office application server, and simultaneously generating a storage location directory corresponding to the claim photos with the uploading states being successful;
sending the claim settlement photos with the uploading state being successful and the storage location directory to the head office claim settlement service server for photo screening through the head office application server to obtain qualified claim settlement photos;
determining a storage position corresponding to the qualified claim photo through the head office claim settlement service server, and sending the storage position corresponding to the qualified claim photo to the branch office image server;
and acquiring the qualified claim photo by the branch company image server according to the storage position corresponding to the qualified claim photo.
Optionally, the asynchronous uploading method of a large number of photos further includes:
and recording the claim service type, the photo name, the universal unique identification code and the uploading time of each claim photo through the mobile terminal.
In a second aspect, the invention provides an asynchronous uploading system of a large number of photos, which comprises a mobile terminal and a background server;
the mobile terminal is used for:
acquiring a photo group to be uploaded for claim settlement; the photo group to be uploaded comprises a plurality of photo groups;
uploading a plurality of claim photos in the claim photo group to be uploaded to the background server through asynchronous concurrent multithreading;
the background server is used for
Sending the uploading state of each claim settlement photo to the mobile terminal for local storage; the uploading state comprises uploading failure and uploading success;
the mobile terminal is further configured to:
and uploading the claim photos with uploading failure states to the background server through asynchronous concurrent multithreading at regular time.
In a third aspect, the present invention provides an electronic device comprising a memory and a processor;
the memory is used for storing a computer program, and the processor is used for running the computer program to execute the asynchronous uploading method of the mass photos.
In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program;
the computer program, when executed by a processor, implements the steps of a method for asynchronous uploading of a large number of photos.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects:
the invention provides a method, a system, electronic equipment and a medium for asynchronously uploading massive photos, wherein a set of photos to be uploaded and claim settlement photos collected by a mobile terminal is uploaded to a background server in an asynchronous concurrent multithreading mode, so that massive data of the mobile terminal are simultaneously transmitted, uploading time is greatly shortened, and timely uploading is realized. The uploading state of the claim photos is recorded through the background server, the mobile terminal uploads the claim photos with uploading failure state again through asynchronous concurrent multithreading at regular time, and therefore the situation of data loss is avoided. In conclusion, the invention integrates the modes of multithread uploading, asynchronous timed supplementary transmission and local storage of the mobile terminal, and has good experience of timely uploading photos, no sense of users and background silent uploading.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic flow chart of the asynchronous uploading method of the mass photos of the present invention;
FIG. 2 is a schematic flow chart of an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an asynchronous uploading system of mass photos according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides an asynchronous uploading method, system, electronic equipment and medium of a single mass of photos, integrates an APP local database, multithreading uploading and asynchronous timing supplementary transmission modes, and through improvement, a mobile phone end supports interruption continuous transmission of accessing a telephone, answering WeChat language videos, switching operation interfaces and the like, so that the problems of uploading loss and uploading overtime of verification photos and survey photos under the conditions of poor network signals and verification survey peak are solved, and user experience is improved.
The present invention will be described in further detail with reference to the accompanying drawings and detailed description, in order to make the objects, features and advantages thereof more comprehensible.
Example one
As shown in fig. 1, this embodiment provides an asynchronous uploading method of a large number of photos, including:
step 100, obtaining a photo group to be uploaded for claim settlement through a mobile terminal; the photo group to be uploaded comprises a plurality of photo groups.
And 200, uploading the plurality of claim photos in the claim photo group to be uploaded to a background server through asynchronous concurrent multithreading by the mobile terminal.
(1) The background server is a head office application server.
Step 200, specifically comprising:
and uploading the plurality of claim photos in the claim photo group to be uploaded to the head office application server through asynchronous concurrent multithreading via a firewall isolation area of the head office through the mobile terminal.
In a specific application, a mobile application APP is set at a mobile terminal (such as a mobile phone or a tablet), and after the mobile application APP takes a claim photo, the mobile terminal starts a background asynchronous thread to upload the claim photo to a background server, i.e., a head office application server. Because the asynchronous thread of the background is adopted, the operation of the front end of the mobile terminal is not influenced, and the next photo can be continuously shot, so that the shooting efficiency and the data uploading efficiency are improved, and the waiting time is shortened.
The image shot by the mobile application APP can update a local photo path and other service information (including that the image photo is in a state to be uploaded, the image photo is in the uploading state, the image photo is successfully uploaded, the image photo is unsuccessfully uploaded, and the image photo is re-waited to be uploaded) stored in the mobile phone to a local rom database of the mobile application APP in real time.
The above is for a single image photograph, and for multiple image photographs:
after data except image photos collected by the mobile application APP are successfully stored in the background, the mobile application APP can asynchronously start an image photo uploading service thread to support concurrent multithread uploading, and the image uploading service thread can upload the image photos in groups from a global image uploading queue array. After each group of image photos are uploaded successfully, the state corresponding to the image photos in the local database is changed into the uploaded state (the uploading is not performed by default), meanwhile, the uploaded group of image photo information in the global image photo uploading array is removed, and then the uploading of the next group of image photos is continued until the global image photos are uploaded.
If the image photos which are failed to be uploaded exist, temporarily storing the image photos which are failed to be uploaded in a local Room database of the mobile application APP, and collecting a plurality of image photos which are failed to be uploaded to obtain an image group which is failed to be uploaded; and after the global image photo is uploaded, uploading the image data in the uploading failure image group again. And closing the uploading service thread until no image photo data exists in the array.
(2) The mobile terminal and the mobile application APP mentioned in (1) above are mainly responsible for transmitting photos to the central station, and meanwhile record the state of the current photo (including an upload state and a storage state) in the database of the mobile terminal, interrupt and continue transmission in the case of telephone access, and also record the UUID (universal Unique Identifier) of the current claim settlement photo, the claim settlement service type, the photo name, and the upload time.
The main function of the middle platform is to temporarily store claim settlement photo information, wait for the core staff to carry out examination and screening, and send an address for storing the photo information to the branch company image server after the screening is finished; the branch company image server takes the photo information from the temporary storage directory of the mobile terminal according to the address of the photo information and transfers the photo information to a formal directory after the examination and verification pass, so that the sorting of the claim photo is realized, and a data base is provided for the following claim.
Specifically, the background server includes a head office application server, a head office claim settlement service server and a branch office image server.
The asynchronous uploading method of the massive photos further comprises the following steps:
1) And receiving and storing the claim photos with the uploading states of successful uploading through the head office application server, and simultaneously generating a storage location directory corresponding to the claim photos with the uploading states of successful uploading.
2) And sending the claim settlement photos with the uploading state being successful and the storage location directory to the head office claim settlement service server for photo screening through the head office application server to obtain qualified claim settlement photos.
3) And determining the storage position corresponding to the qualified claim photo through the head office claim settlement service server, and sending the storage position corresponding to the qualified claim photo to the branch office image server.
4) And acquiring the qualified claim photos through the branch image server according to the storage positions corresponding to the qualified claim photos.
Step 300, sending the uploading state of each claim settlement photo to the mobile terminal for local storage through the background server; the uploading state comprises uploading failure and uploading success; specifically, the uploading state of each claim photo is stored through a local Room database of the mobile terminal.
And step 400, uploading the claim settlement photos with uploading failure states to the background server through asynchronous concurrent multithreading by the mobile terminal at regular time.
In a specific practical application, as shown in fig. 2, if the claim photos taken by the mobile terminal are in background asynchronization, the failure state is recorded in the local Room database of the APP, the local Room database is scanned by the APP main thread at regular time, and the image photo information in which the background failure is uploaded is added to the global image upload queue array of the mobile application APP to be uploaded again.
If the claim photo shot by the mobile terminal is successfully uploaded in the background asynchronous mode, the uploaded claim photo is subjected to a public network of a head office through a dnat conversion, and then enters the head office application server through a head office firewall isolation zone (DMZ) of the head office application server to be stored in the head office application server.
Then selectively sending the photo containing the claim settlement service data to a head office claim settlement service server, wherein related staff in the head office claim settlement service server performs auditing and screening according to working requirements, and sends a storage address corresponding to the screened photo to a branch office image server. And the branch company image server acquires the corresponding photo from the mobile application APP through the general company application server according to the storage address corresponding to the obtained photo.
All the information such as image photo names and storage paths collected by the mobile application APP can be stored in a timing task table of the background database, a photo pushing task is executed regularly, if the photo pushing task fails, the number of times is recorded, and if the photo pushing task fails for 2 times, the pushing is not continued. And updating the failure times at a fixed time at 0 point every day, and continuing pushing.
In summary, the invention provides an asynchronous uploading mechanism for mass images, the overall architecture adopts a layered and distributed deployment structure, the presentation layer and the service logic are clearly separated, and the consistency, stability, openness, function expandability, micro maintainability and concurrency of the application service logic can be ensured.
Example two
As shown in fig. 3, in order to implement a corresponding method in the foregoing embodiment to achieve corresponding functions and technical effects, the embodiment provides an asynchronous uploading system of a large number of photos, which includes a mobile terminal and a background server.
The mobile terminal is used for:
acquiring a photo group to be uploaded for claim settlement; the photo group to be uploaded comprises a plurality of photo groups;
uploading a plurality of claim photos in the claim photo group to be uploaded to the background server through asynchronous concurrent multithreading;
the background server is used for
Sending the uploading state of each claim settlement photo to the mobile terminal for local storage; the uploading state comprises uploading failure and uploading success;
the mobile terminal is further configured to:
and uploading the claim photos with uploading failure states to the background server through asynchronous concurrent multithreading at regular time.
EXAMPLE III
The embodiment provides an electronic device, which comprises a memory and a processor; the memory is used for storing a computer program, and the processor is used for running the computer program to execute the asynchronous uploading method of the mass photos according to the first embodiment.
Optionally, the electronic device is a server.
In addition, the present embodiment also provides a computer-readable storage medium storing a computer program; the computer program, when executed by a processor, implements the steps of the asynchronous uploading method of mass photos described in the first embodiment.
Compared with the prior art, the invention also has the following advantages:
the asynchronous uploading method, the asynchronous uploading system, the electronic equipment and the medium of the mass photos can achieve silent asynchronous uploading, have relatively low requirement on network speed, occupy relatively low network bandwidth resources and reduce the concurrency pressure of a server.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The principles and embodiments of the present invention have been described herein using specific examples, which are provided only to help understand the method and the core concept of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed. In view of the above, the present disclosure should not be construed as limiting the invention.

Claims (8)

1. A method for asynchronously uploading a mass of photos is characterized by comprising the following steps:
acquiring a claim photo group to be uploaded through a mobile terminal; the photo group to be uploaded comprises a plurality of photo groups;
uploading the plurality of claim settlement photos in the claim settlement photo group to be uploaded to a background server through the mobile terminal by asynchronous concurrent multithreading;
the uploading state of each claim settlement photo is sent to the mobile terminal for local storage through the background server; the uploading state comprises uploading failure and uploading success;
and uploading the claim settlement photos with uploading failure state to the background server through asynchronous concurrent multithreading at regular time by the mobile terminal.
2. The method for asynchronously uploading a huge amount of photos according to claim 1, wherein the method for asynchronously uploading a huge amount of photos further comprises:
and storing the uploading state of each claim photo through a local rom database of the mobile terminal.
3. The asynchronous uploading method of mass photos of claim 1, wherein the background server is a head office application server;
uploading the plurality of claim photos in the claim photo group to be uploaded to a background server through asynchronous concurrent multithreading by the mobile terminal, and the method specifically comprises the following steps:
and uploading the plurality of claim photos in the claim photo group to be uploaded to the head office application server through asynchronous concurrent multithreading via a firewall isolation area of the head office through the mobile terminal.
4. The asynchronous uploading method of mass photos of claim 1, wherein the background server comprises a head office application server, a head office claim settlement service server and a branch office image server;
the asynchronous uploading method of the massive photos further comprises the following steps:
receiving and storing the claim photos with the uploading states being successful through the head office application server, and simultaneously generating a storage location directory corresponding to the claim photos with the uploading states being successful;
sending the claim settlement photos with the uploading state being successful and the storage location directory to the head office claim settlement service server for photo screening through the head office application server to obtain qualified claim settlement photos;
determining a storage position corresponding to the qualified claim photo through the head office claim settlement service server, and sending the storage position corresponding to the qualified claim photo to the branch company image server;
and acquiring the qualified claim photo by the branch company image server according to the storage position corresponding to the qualified claim photo.
5. The asynchronous uploading method of a huge amount of photos according to claim 1, further comprising:
and recording the claim service type, the photo name, the universal unique identification code and the uploading time of each claim photo through the mobile terminal.
6. The asynchronous uploading system of the massive photos is characterized by comprising a mobile terminal and a background server;
the mobile terminal is used for:
acquiring a photo group to be uploaded for claim settlement; the photo group to be uploaded comprises a plurality of photo groups;
uploading a plurality of claim photos in the claim photo group to be uploaded to the background server through asynchronous concurrent multithreading;
the background server is used for
Sending the uploading state of each claim settlement photo to the mobile terminal for local storage; the uploading state comprises uploading failure and uploading success;
the mobile terminal is further configured to:
and uploading the claim photos with uploading failure states to the background server at regular time through asynchronous concurrent multithreading.
7. An electronic device, wherein the electronic device comprises a memory and a processor;
the memory is used for storing a computer program, and the processor is used for running the computer program to execute the asynchronous uploading method of the massive photos in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program;
the computer program when executed by a processor implements the steps of the asynchronous uploading method of mass photographs of any of claims 1 to 5.
CN202211367454.3A 2022-11-03 2022-11-03 Asynchronous uploading method and system of mass photos, electronic equipment and medium Pending CN115914286A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211367454.3A CN115914286A (en) 2022-11-03 2022-11-03 Asynchronous uploading method and system of mass photos, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211367454.3A CN115914286A (en) 2022-11-03 2022-11-03 Asynchronous uploading method and system of mass photos, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN115914286A true CN115914286A (en) 2023-04-04

Family

ID=86494275

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211367454.3A Pending CN115914286A (en) 2022-11-03 2022-11-03 Asynchronous uploading method and system of mass photos, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN115914286A (en)

Similar Documents

Publication Publication Date Title
CN111723160B (en) Multi-source heterogeneous incremental data synchronization method and system
CN109756366B (en) Intelligent network SCP cloud service implementation system based on CAAS
CN108418862A (en) Micro services management method and system based on artificial intelligence service cloud platform
WO2018166415A1 (en) Cloud storage system, media data storage method and system
US7366945B2 (en) Method of setting backup of home location register
CN106021327B (en) A kind of Dropbox system for supporting multi-user to read while write and its read document method, written document method
CN111209467A (en) Data real-time query system under multi-concurrency multi-channel environment
CN111694791B (en) Data access method and device in distributed basic framework
CN110309231A (en) A kind of method of data synchronization and system across computer room
CN110083524A (en) Upload data test method, apparatus, computer equipment and storage medium
CN112417042A (en) Method and device for processing service request
US20160308871A1 (en) Network element data access method and apparatus, and network management system
CN110188118A (en) A kind of method of data synchronization, device
CN113259408B (en) Data transmission method and system
CN113382071B (en) Link creation method and device based on hybrid cloud architecture
CN115914286A (en) Asynchronous uploading method and system of mass photos, electronic equipment and medium
CN109639665A (en) Method based on more communication medias extension distribution subscription system transport protocol
CN109274774A (en) A kind of date storage method, device and computer readable storage medium
CN110457279A (en) Off-line data scan method, device, server and readable storage medium storing program for executing
CN109299048A (en) The method for handling data and issuing data
CN113392081A (en) Data processing system and method
CN112804313A (en) Data synchronization method, device, equipment and medium based on cross-domain edge node
JPH1141588A (en) Access history managing system for video server system
CN112596752B (en) Internet of things method and system for electronic evidence obtaining equipment
CN114629937B (en) Computer screen intercepting device and method

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