CN111858749A - Bottom library synchronization method, device and electronic system - Google Patents

Bottom library synchronization method, device and electronic system Download PDF

Info

Publication number
CN111858749A
CN111858749A CN202010546660.5A CN202010546660A CN111858749A CN 111858749 A CN111858749 A CN 111858749A CN 202010546660 A CN202010546660 A CN 202010546660A CN 111858749 A CN111858749 A CN 111858749A
Authority
CN
China
Prior art keywords
library
picture
base
server
synchronization
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
CN202010546660.5A
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.)
Wuhan Kuangshi Jinzhi Technology Co ltd
Beijing Kuangshi Technology Co Ltd
Beijing Megvii Technology Co Ltd
Original Assignee
Wuhan Kuangshi Jinzhi Technology Co ltd
Beijing Kuangshi Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Kuangshi Jinzhi Technology Co ltd, Beijing Kuangshi Technology Co Ltd filed Critical Wuhan Kuangshi Jinzhi Technology Co ltd
Priority to CN202010546660.5A priority Critical patent/CN111858749A/en
Publication of CN111858749A publication Critical patent/CN111858749A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2358Change logging, detection, and notification

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method and a device for synchronizing a base library and an electronic system. Wherein, the method comprises the following steps: a synchronous server of an external network receives a first Oplog file issued by a gateway; the gateway is a gatekeeper used for isolating an internal network and an external network, and the first Oplog file is a file generated by a business server in the internal network based on a first bottom library set updating operation in the internal network; updating a second bottom library set in the synchronization server by applying the first Oplog file; updating a third base library set on the portable equipment based on the updated second base library set in response to a base library synchronization request of the portable equipment; wherein the synchronization server and the portable device are communicatively connected via ICE technology. The invention realizes the synchronization of the business server and the portable equipment by the synchronization server, relieves the problem of update lag of the portable equipment base, simplifies the update operation of the portable equipment and is convenient for popularization and implementation.

Description

Bottom library synchronization method, device and electronic system
Technical Field
The invention relates to the technical field of database synchronization, in particular to a method, a device and an electronic system for synchronizing a base library.
Background
With the development of deep learning algorithms and artificial neural network theories, the accuracy rate of face recognition is higher and higher. With the optimization of the algorithm and the enhancement of the calculation power of the edge and end equipment, the base library can be stored in the portable equipment, and face comparison is carried out on the portable equipment. Portable devices are commonly used in a variety of different locations, such as: in a railway station, a long-distance bus station, an airport or a subway station, for safety reasons, the portable equipment cannot be connected with an internal network where the bottom library is located in the places, so that the bottom library of the portable equipment can be usually copied from a U disk or other third-party storage devices, the mode is inconvenient to use, and the problem of delay in updating the bottom library exists.
Disclosure of Invention
In view of the above, the present invention provides a method, an apparatus and an electronic system for synchronizing a base library, so as to alleviate the above problems, simplify the updating operation of a portable device, and facilitate popularization and implementation.
In a first aspect, an embodiment of the present invention provides a method for synchronizing a base library, where the method is applied to a synchronization server disposed in an external network, and the method includes: receiving a first Oplog file issued by a gateway; the gateway is a gatekeeper used for isolating an intranet from an extranet, and the first Oplog file is a file generated by updating operation of a business server in the intranet on a first bottom library set in the intranet; updating a second bottom library set in the external network by applying the first Oplog file; and updating the third base library set on the portable device based on the updated second base library set in response to the base library synchronization request of the portable device.
With reference to the first aspect, an embodiment of the present invention provides a first possible implementation manner of the first aspect, where a url field of the first Oplog file encodes a base64 of a target picture modified or added by a service server; the step of updating the second bottom library set in the external network by applying the first Oplog file comprises the following steps: analyzing the first Oplog file to obtain a target picture; determining whether the target picture is a newly added picture according to the identification of the target picture; if yes, adding a target picture in a second bottom library set of the external network; and if not, replacing the picture corresponding to the identifier in the second base library set by the target picture.
With reference to the first possible implementation manner of the first aspect, an embodiment of the present invention provides a second possible implementation manner of the first aspect, where the parsing the first Oplog file to obtain the target picture includes: analyzing the first Oplog file through a MongoShake service to obtain a base64 code in a url field of the first Oplog file; and generating a target picture based on base64 coding.
With reference to the first aspect, an embodiment of the present invention provides a third possible implementation manner of the first aspect, where the base library synchronization request carries base library list information corresponding to a third base library set on the portable device; updating a third set of repositories on the portable device based on the updated second set of repositories, comprising: determining a target base corresponding to the portable equipment according to the service requirement; checking whether the bottom library list information contains a bottom library mark of the target bottom library; if yes, updating the target base library on the portable equipment based on the picture sets in the respective target base libraries on the portable equipment and the synchronous server; and if not, sending the target base library or the characteristic information corresponding to each picture in the target base library to the portable equipment so as to add the target base library or the characteristic information corresponding to each picture in the target base library in a third base library set.
With reference to the third possible implementation manner of the first aspect, an embodiment of the present invention provides a fourth possible implementation manner of the first aspect, where the updating the target base library on the portable device based on the picture sets in the respective target base libraries on the portable device and the synchronization server includes: comparing whether the number of the pictures in the picture sets in the respective target base libraries on the portable equipment and the synchronous server is equal or not; if not, sending the bottom library identification of the target bottom library on the synchronization server and the picture identification set of the pictures in the target bottom library on the synchronization server to the portable equipment; receiving a picture identification set to be added returned by the portable equipment based on the bottom library identification and the picture identification set; searching a picture set to be added corresponding to the picture identification set to be added in a target base of the synchronous server; and sending the found characteristic information of the picture set to be added or each picture in the picture set to be added to the portable equipment so as to add the characteristic information of the picture set to be added or each picture in the picture set to be added to a target base library of the portable equipment.
With reference to the first aspect, an embodiment of the present invention provides a fifth possible implementation manner of the first aspect, where the method further includes: if picture updating information sent by the portable equipment is received, analyzing a newly added picture and an updating base identification corresponding to the newly added picture from the picture updating information, and updating a first base corresponding to the updating base identification of the second base set based on the updating picture; and generating a second Oplog file based on the updated first base library, and sending the second Oplog file to the service server through the gateway so as to update the base library corresponding to the updated base library identifier in the first base library set.
With reference to the fifth possible implementation manner of the first aspect, an embodiment of the present invention provides a sixth possible implementation manner of the first aspect, where the step of generating a second Oplog file based on the updated first base library includes: generating base64 encoding based on the updated pictures in the updated first base library, encoding as the content of the url field with base64, and generating a second Oplog file, wherein the second Oplog file contains the url field.
With reference to the first aspect, an embodiment of the present invention provides a seventh possible implementation manner of the first aspect, where the method further includes: if picture deletion information sent by the portable equipment is received, analyzing a deleted picture identifier and a deleted base identifier corresponding to the deleted picture identifier from the picture deletion information, and deleting a picture corresponding to the deleted picture identifier in a second base corresponding to the deleted base identifier of the second base set; and generating a third Oplog file based on the deleted second base library, and sending the third Oplog file to the service server through the gateway, so as to delete the picture corresponding to the deleted picture identifier in the base library corresponding to the deleted base library identifier in the first base library set.
With reference to the first aspect, an embodiment of the present invention provides an eighth possible implementation manner of the first aspect, where an operating system of the synchronization server is different from an operating system of the portable device, and the synchronization server and the portable device are communicatively connected through ICE technology.
In a second aspect, an embodiment of the present invention further provides a method for synchronizing a base library, where the method is applied to a portable device installed in an external network, and the method includes: sending a bottom library synchronization request to a synchronization server; the synchronous server is arranged in an external network, a second bottom library set is stored in the external network, and a bottom library in the second bottom library set is synchronous with a bottom library in a first bottom library set of a business server in the internal network; receiving a synchronization request of the synchronization server based on the bottom library and picture updating information returned by the second bottom library set; the third set of repositories on the portable device is updated based on the picture update information.
With reference to the second aspect, an embodiment of the present invention provides a first possible implementation manner of the second aspect, where the base library synchronization request carries base library list information corresponding to a third base library set on the portable device; the step of receiving the picture update information returned by the synchronization server based on the bottom library synchronization request and the second bottom library set comprises the following steps: receiving a bottom library identification of a target bottom library and a picture identification set of pictures in the target bottom library, which are returned by the synchronization server based on the bottom library synchronization request and the second bottom library set; the bottom library identification is contained in the bottom library list information; determining a picture identification set to be added based on the bottom library identification and the picture identification set; returning a picture identification set to be added to the synchronous server; receiving a picture set to be added corresponding to a picture identification set to be added sent by a synchronous server or characteristic information of each picture in the picture set to be added; adding a picture set to be added or characteristic information of each picture in the picture set to be added in a target base identified by a base of the portable equipment.
With reference to the second aspect, an embodiment of the present invention provides a second possible implementation manner of the second aspect, where the base library synchronization request carries base library list information corresponding to a third base library set on the portable device; the step of receiving the picture update information returned by the synchronization server based on the bottom library synchronization request and the second bottom library set comprises the following steps: receiving a bottom library synchronization request and feature information corresponding to each picture in a target bottom library or the target bottom library returned by the synchronization server based on the second bottom library set; the bottom library identification of the target bottom library is not contained in the bottom library list information; and adding feature information corresponding to each picture in the target base library or the target base library in a third base library set on the portable equipment.
With reference to the second aspect, an embodiment of the present invention provides a third possible implementation manner of the second aspect, where the method further includes: if the picture is updated, sending picture updating information to the synchronization server so that the synchronization server updates the second base library set based on the picture updating information; the image updating information carries an updating image and an updating base identification corresponding to the updating image; if the picture is deleted, sending picture deletion information to the synchronization server so that the synchronization server updates the second base library set based on the picture deletion information; the picture deleting information carries a deleted picture identifier and a deleted base identifier corresponding to the deleted picture identifier.
In a third aspect, an embodiment of the present invention further provides a method for synchronizing a base library, where the method is applied to a service server installed in an intranet, and the method includes: generating a first Oplog file based on the updating operation of the first bottom library set of the business server;
issuing a first Oplog file to a synchronization server through a gateway so that the synchronization server updates a second bottom library set in an external network by applying the first Oplog file, and updating a third bottom library set on the portable equipment based on the updated second bottom library set in response to a bottom library synchronization request of the portable equipment; the gateway is a gateway for isolating an internal network from an external network, and the synchronization server is arranged in the external network.
With reference to the third aspect, an embodiment of the present invention provides a first possible implementation manner of the third aspect, where the step of generating a first Oplog file based on an update operation of a first base library set of a service server includes: generating base64 codes of the target pictures when the target pictures are added or modified; base64 is encoded as the content of the url field, generating a first Oplog file, which contains the url field.
With reference to the third aspect, an embodiment of the present invention provides a second possible implementation manner of the third aspect, where the method further includes: receiving a second Oplog file sent by the synchronous server through the gateway; the second Oplog file is generated by the synchronization server based on the updated picture of the portable device; and updating the target base library of the first base library set based on the second Oplog file.
With reference to the third aspect, an embodiment of the present invention provides a third possible implementation manner of the third aspect, where the method further includes: receiving a third Oplog file sent by the synchronous server through the gateway; a third Oplog file is generated by the synchronization server based on the deleted pictures of the portable equipment; and deleting the deleted pictures in the target bottom library of the first bottom library set based on the third Oplog file.
In a fourth aspect, an embodiment of the present invention further provides a bottom library synchronization apparatus, where the apparatus is applied to a synchronization server disposed in an external network, and the apparatus includes: the first receiving module is used for receiving a first Oplog file issued by the gateway; the gateway is a gatekeeper used for isolating an intranet from an extranet, and the first Oplog file is a file generated by updating operation of a business server in the intranet on a first bottom library set in the intranet; the first updating module is used for applying the first Oplog file to update the second bottom library set in the external network; and the second updating module is used for responding to the bottom library synchronization request of the portable equipment and updating the third bottom library set on the portable equipment based on the updated second bottom library set.
In a fifth aspect, an embodiment of the present invention further provides a bottom library synchronization apparatus, where the apparatus is applied to a portable device installed in an external network, and the apparatus includes: the request sending module is used for sending a bottom library synchronization request to the synchronization server; the synchronous server is arranged in an external network, a second bottom library set is stored in the external network, and a bottom library in the second bottom library set is synchronous with a bottom library in a first bottom library set of a business server in the internal network; the second receiving module is used for receiving the picture updating information returned by the synchronization server based on the bottom library synchronization request and the second bottom library set; and the third updating module is used for updating a third base library set on the portable equipment based on the picture updating information.
In a sixth aspect, an embodiment of the present invention further provides a bottom library synchronization apparatus, where the apparatus is applied to a service server installed in an intranet, and the apparatus includes: the file generation module is used for generating a first Oplog file based on the updating operation of the first bottom library set of the business server; the file sending module is used for issuing a first Oplog file to the synchronization server through the gateway so that the synchronization server updates a second bottom library set in the external network by applying the first Oplog file, and responds to a bottom library synchronization request of the portable equipment and updates a third bottom library set on the portable equipment based on the updated second bottom library set; the gateway is a gateway used for isolating an internal network and an external network, and the synchronous server is arranged on the external network.
In a seventh aspect, an embodiment of the present invention further provides an electronic system, where the electronic system includes: the system comprises portable equipment, a synchronization server and a service server; the business server comprises a first storage device and a first processing device, wherein the first storage device is used for storing a first base library set and a first computer program; the synchronization server comprises a second storage device for storing a second set of underlying libraries and a second computer program, and a second processing device; the portable device comprises a third storage means for storing a third set of repositories and a third computer program, and a third processing device; the first computer program, when executed by the first processing device, performs the method of base synchronization of the third aspect described above; the second computer program, when executed by the second processing device, performs the method of base synchronization of the first aspect; the third computer program, when executed by the third processing device, performs the base synchronization method of the second aspect.
In an eighth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processing device, the steps of the method for synchronizing the base libraries are performed.
The embodiment of the invention has the following beneficial effects:
the embodiment of the invention provides a bottom library synchronization method, a device and an electronic system, wherein a synchronization server arranged in an external network receives a first Oplog file issued by a service server through a gateway, the first Oplog file is a file generated by the service server based on the updating operation of a first bottom library set in an internal network, the synchronization server updates a second bottom library set in the external network by using the first Oplog file, realizes the timely synchronization of the first bottom library set in the internal network and the second bottom library set in the external network, responds to a bottom library synchronization request of portable equipment, updates a third bottom library set on the portable equipment based on the updated second bottom library set, realizes the synchronization of the third bottom library set and the second bottom library set in the external network, and further equivalently realizes the synchronization between the third bottom library set on the portable equipment and the first bottom library set on the service server in the internal network, the synchronization mode can quickly realize the synchronization of the base libraries in the mode that the portable equipment sends the synchronization request without configuring additional storage hardware (such as a U disk and the like) and a third-party storage device on the portable equipment, thereby relieving the problem of lag in updating the base libraries of the portable equipment, simplifying the updating operation of the portable equipment and being convenient for popularization and implementation.
Additional features and advantages of the disclosure will be set forth in the description which follows, or in part may be learned by the practice of the above-described techniques of the disclosure, or may be learned by practice of the disclosure.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic structural diagram of an electronic system according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for synchronizing a base library according to an embodiment of the present invention;
fig. 3 is a schematic view of a base synchronization application scenario provided in an embodiment of the present invention;
fig. 4 is a schematic diagram of a registration method according to an embodiment of the present invention;
FIG. 5 is a flowchart of another method for synchronizing a base library according to an embodiment of the present invention;
fig. 6 is a schematic diagram of transmission of a first Oplog file according to an embodiment of the present invention;
FIG. 7 is a flowchart of another method for synchronizing a base library according to an embodiment of the present invention;
FIG. 8 is a diagram illustrating a method for synchronizing a base library according to an embodiment of the present invention;
FIG. 9 is a flowchart of another method for synchronizing a base library according to an embodiment of the present invention;
FIG. 10 is a flowchart of another method for synchronizing a base library according to an embodiment of the present invention;
FIG. 11 is a flowchart of another method for synchronizing a base library according to an embodiment of the present invention;
fig. 12 is a schematic diagram of a base library synchronization apparatus according to an embodiment of the present invention;
FIG. 13 is a diagram illustrating another exemplary embodiment of a base library synchronization apparatus;
FIG. 14 is a diagram illustrating another exemplary embodiment of a base library synchronization apparatus;
fig. 15 is a schematic view of an electronic device according to an embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In practical applications, the portable device is inconvenient to use because the base library of the portable device is usually copied from a U disk or other third-party storage device, and the updating of the base library has a delay problem. Similarly, in field use of the base library of the portable device, a certain base library picture may be temporarily added, and it is necessary to search for a target corresponding to the base library picture in an image acquired by a camera associated with the portable device, and synchronize the base library picture added in the portable device into a business system of an intranet, so as to perform a large-scale search in an image acquired by a camera associated with the business system (the number of cameras associated with the business system is usually more than that of cameras associated with the portable device) through the business system. Therefore, there is a need for a device that can synchronize the portrait data of the base library of the business system and the base library of the portable device in real time.
Based on this, the embodiment of the invention provides a method, a device and an electronic system for synchronizing an underlying library, which realize the underlying library synchronization of a service system and a portable device through a synchronization server, relieve the problem of the underlying library update lag of the portable device, simplify the update operation of the portable device, and facilitate the popularization and implementation.
To facilitate understanding of the embodiment, a method for synchronizing the base libraries disclosed in the embodiment of the present invention will be described in detail first.
First, refer to the schematic structure of the electronic system shown in fig. 1. The electronic system can be used for realizing the method, the device and the electronic system for synchronizing the base libraries of the embodiment of the invention.
As shown in fig. 1, the electronic system includes a portable device 30, a synchronization server 20, and a service server 10.
Therein, the business server 10 comprises a first storage means 101 for storing a first set of underlying libraries and a first computer program, and a first processing device 102.
The synchronization server 20 comprises a second storage 201 for storing a second set of underlying libraries and a second computer program, and a second processing device 202.
The portable device 30 comprises a third storage means 301 for storing a third set of repositories and a third computer program, and a third processing device 302.
The service server 10, the synchronization server 20 and the portable device 30 include a storage device and a processing device, and the service server 10 further includes: one or more first input and output devices 103 and one or more first image capturing devices 104, which are interconnected by a bus system and/or other form of connection mechanism (not shown). The synchronization server 20 further includes: one or more second input and output devices 203; the portable device 30 includes: one or more third input and output means 303 and one or more third image acquisition devices 304.
It should be noted that the components and configuration of the electronic system shown in fig. 1 are exemplary only, and not limiting, and that the electronic system may have other components and configurations as desired.
The first processing device 102, the second processing device 202, and the third processing device 302 may each be one or more processors, which may be a server, an intelligent terminal, or a device or apparatus including a Central Processing Unit (CPU) or other form of processing unit with data processing capability and/or instruction execution capability, which can process data of other components in the electronic system, and can control other components in the electronic system to perform the function of base synchronization.
The first storage 101, the second storage 201, and the third storage 301 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. Volatile memory can include, for example, Random Access Memory (RAM), cache memory (or the like). The non-volatile memory may include, for example, Read Only Memory (ROM), a hard disk, flash memory, and the like. One or more computer program instructions may be stored on a computer-readable storage medium and executed by a processing device corresponding to the storage means to implement the client functionality (implemented by the processing device) and/or other desired functionality in embodiments of the invention described below. Various applications and various data, such as various data used and/or generated by the applications, may also be stored in the computer-readable storage medium. For example: the first computer program, when executed by the first processing device, executes the method for synchronizing the base library on the service server 10 side in the following embodiments of the present invention; the second computer program, when executed by the second processing device, performs the method for synchronizing the base library on the side of the synchronization server in the following embodiments of the present invention; the third computer program, when executed by the third processing device, performs the method for synchronizing the base on the portable device side in the following embodiments of the present invention.
The first input and output device 103, the second input and output device 203, and the third input and output device 303 may be an input component and an output component, the input component may be a device used by a user to input instructions, and may include one or more of a keyboard, a mouse, a microphone, a touch screen, and the like, and may also be a data input interface.
The output means may include one or more of a display, a speaker, and the like, and may also be a data output interface for outputting various information (e.g., images or sounds) to the outside (e.g., a user).
The first image capturing device 104 and the third image capturing device 304 may capture the image of the basement and the image to be detected, and store the captured images in corresponding storage devices for use by other components.
The portable devices 30 in the electronic system are multiple, and the multiple portable devices 30 can jointly maintain the base library set on the service server 10. Of course, the electronic system may include a network device (not shown in fig. 1) such as a gateway besides the service server 10, the synchronization server 20, and the portable device 30, so as to implement information transmission to the corresponding device via the network.
For example, the devices used for implementing the method, apparatus and electronic system for synchronizing an image library according to the embodiment of the present invention may be integrally arranged or dispersedly arranged, such as the processing device, the storage device, and the input and output device on each device of the service server 10, the synchronization server 20, and the portable device 30 may be integrally arranged, and the image capturing device may be arranged at a specific position where an image can be captured. When the above-mentioned devices in the service server 10, the synchronization server 20, and the portable device 30 are integrally provided, the service server 10, the synchronization server 20, and the portable device 30 may be implemented as a smart terminal such as a camera, a smart phone, a tablet computer, a vehicle-mounted terminal, and the like.
An embodiment of the present invention provides a method for synchronizing a base library, where an execution main body of the method is a synchronization server arranged in an external network, and the synchronization server is in communication connection with a gatekeeper (also referred to as a gateway) of a service server, see a flowchart of the base library synchronization method shown in fig. 2, where the method includes the following steps:
step S202, receiving a first Oplog file issued by a gateway; the gateway is a gatekeeper used for isolating an intranet from an extranet, and the first Oplog file is a file generated by updating operation of a business server in the intranet on a first bottom library set in the intranet.
The first Oplog file is a log file, which is generated based on the update operation of the first base library set, and therefore includes information related to the picture corresponding to the update operation of the first base library set, for example, encoding information of a newly added picture or encoding information of a modified picture.
As shown in the schematic diagram of the base-side synchronization application scenario in fig. 3, the service server of the intranet is connected to the synchronization server of the extranet through the gateway in a communication manner, the portable devices a, B, and C of the extranet are connected to the synchronization server, and the portable devices a, B, and C are mobile portable devices distributed in various locations. In practical application, the number of the portable devices may be set according to practical application scenarios, which is not limited to be described in the embodiment of the present invention.
For convenience of description, in the embodiment of the present invention, the base library set on the service server side is referred to as a first base library set, the base library set in the external network is referred to as a second base library set, and all base library sets on the portable device are referred to as a third base library set. The first base library set, the second base library set, and the third base library set in the embodiment of the present invention may include a plurality of base libraries of different types, for example: the primary library of the collection of the pictures of the class of the related to the poison is the primary library of the related to the poison, and the primary library of the collection of the pictures of the class of the related to the gambling is the primary library of the related to the gambling. The pictures in one type of base library and the pictures in other types of base libraries may or may not have partial overlapping pictures.
When the service server generates a first Oplog file based on a first bottom library set updating operation in the intranet, the service server sends the first Oplog file to the synchronization server through the gateway, namely the synchronization server receives the first Oplog file sent by the gateway.
And step S204, updating the second bottom library set in the external network by applying the first Oplog file.
After receiving the first Oplog file, the synchronization server may analyze the first Oplog file to obtain picture information corresponding to the update operation, and then update the second base library set in the external network based on the picture information, where the updated second base library set and the base library of the corresponding first base library set in the service server achieve quasi-real-time synchronization.
And step S206, responding to the bottom library synchronization request of the portable device, and updating a third bottom library set on the portable device based on the updated second bottom library set.
The portable device is a mobile device, in practical application, the portable device is not in a continuous power-on state, the portable device is powered on only when needed, and after being powered on every time, the portable device sends a bottom library synchronization request to the synchronization server so as to update the third bottom library set.
In practical applications, the operating system of the synchronization server is different from that of the portable device, and since the portable device is generally written in python language and deployed on the windows operating system, and the synchronization server is written in java language and deployed on the linux operating system, the portable device and the synchronization server cannot achieve communication connection. Based on this, considering that an ICE (Interactive Connectivity Establishment) is a full-function RPC (Remote Procedure Call Protocol) framework, which may support languages such as C + +, C #, Java, javascript, and Python, in this embodiment of the present invention, the portable device and the synchronization server implement communication connection through an ICE technique, specifically, a communication interface between each portable device and the synchronization server is written into a service.
When the synchronization server receives a bottom library synchronization request of the portable device, the synchronization server updates a third bottom library set on the portable device based on the updated second bottom library set, so that the updated third bottom library set in the portable device and the bottom library information of the updated second bottom library set are synchronized in time.
In the above-mentioned base synchronization method provided in the embodiment of the present invention, the synchronization server disposed in the external network receives the first Oplog file issued by the service server through the gateway, where the first Oplog file is a file generated by the service server based on the update operation of the first base set in the internal network, the synchronization server updates the second base set in the external network by using the first Oplog file, so as to implement the timely synchronization between the first base set in the internal network and the second base set in the external network, and the synchronization server responds to the base synchronization request of the portable device and then updates the third base set on the portable device based on the updated second base set, so as to implement the synchronization between the third base set in the external network and the second base set, which is equivalent to implement the synchronization between the third base set on the portable device and the first base set on the internal network service server, the synchronization mode can quickly realize the synchronization of the base libraries in the mode that the portable equipment sends the synchronization request without configuring additional storage hardware (such as a U disk and the like) and a third-party storage device on the portable equipment, thereby relieving the problem of lag in updating the base libraries of the portable equipment, simplifying the updating operation of the portable equipment and being convenient for popularization and implementation.
In practical applications, the portable devices distributed in various locations also implement registration in the synchronization server through the ICE technology, specifically, as shown in the schematic diagram of the registration method shown in fig. 4, each portable device sends registration information to the synchronization server through the ICE technology, where the registration information includes, but is not limited to, an IP (Internet Protocol), a port (interface communicatively connected to the synchronization server), a repository list, the number of repository pictures, and model version information of an application algorithm of each portable device, so that the synchronization server completes registration of the portable device according to the received registration information. In particular, if a certain portable device has completed registration, the synchronization server also updates the received registration information to the database so that the user inquires the registration information of a certain portable device in the synchronization server.
It should be noted that, since the portable device may have a situation where the operator updates the base list in the case of network outage, the portable device needs to send the base list to the synchronization server after being powered on every time, where the base list is the base list in the third base set.
On the basis of fig. 2, another base library synchronization method is further provided in the embodiment of the present invention, where the execution subject is a synchronization server, and the method focuses on describing a specific process in which the synchronization server updates a second base library set in an external network by applying a first Oplog file. Wherein, the url field of the first Oplog file is encoded for the base64 of the target picture modified or added by the service server, as shown in fig. 5, the method includes the following steps:
Step S502, receiving a first Oplog file issued by a gateway; the gateway is a gatekeeper used for isolating an intranet from an extranet, and the first Oplog file is a file generated by updating operation of a business server in the intranet on a first bottom library set in the intranet.
And step S504, analyzing the first Oplog file to obtain a target picture.
Specifically, a service server and a synchronization server are both provided with a Mongodb database, wherein a base library in the service server is stored in the Mongodb database, and can be directly accessed through a url (uniform resource locator) field of picture information in the Mongodb database. In practical application, the pictures in the Mongodb database can be stored in the data set in groups to form a base library of a type corresponding to each set. Each picture stored in the montodb database may also be provided with a unique identification, which may be characterized by a base64 code.
As shown in fig. 6, in a schematic transmission diagram of a first Oplog file, when the service server updates the first base library set, for example, modifies or adds a target picture, at this time, the update operation is recorded in an Oplog log, and is saved in an ftp (file transfer protocol) directory of the service server. The service server analyzes the Oplog log through the MongoShake service to obtain the url of the target picture, downloads the target picture according to the url, changes the downloaded target picture into a corresponding base64 code, replaces the url of the target picture in the Oplog log by using a base64 code to obtain a first Oplog file, and sends the first Oplog file to the ftp directory of the synchronization server through the gateway.
After the synchronization server receives the first Oplog file, the synchronization server analyzes the first Oplog file through the mongosharke service to obtain a base64 code in a url field of the first Oplog file, and a target picture is generated based on the base64 code.
The MongoShake service is a general platform service written in the golang language, and copies data stored by the Mongodb by reading an Oplog operation log of a Mongodb database, so that specific requirements are realized by analyzing the operation log. Therefore, the synchronization server analyzes the operation log in the first Oplog file through the mongosharke service, so that the base64 code in the url field of the first Oplog file can be obtained, and the target picture can be generated according to the base64 code.
Step S506, determining whether the target picture is a new added picture according to the identifier of the target picture. If yes, go to step S508; if not, step S510 is performed.
The identifier of the target picture in this embodiment may include two parts, i.e., a base library ID and a picture ID, for example: and taking the first 16 bits in the base64 code in the url field as the identification of the target picture, wherein the codes of the 1 st to 8 th bits in the first 16 bit code are bottom library IDs, and the codes of the 8 th to 16 th bits are picture IDs.
After the synchronization server obtains the target picture, whether the target picture is a newly added picture can be judged according to the identification of the target picture, specifically, a target base corresponding to the identification of the target picture is searched in the second base set, whether the picture ID of the target picture exists is checked in the target base, and if the picture ID exists, the picture is not the newly added picture and is modified on the basis of the original picture; if not, the instruction book is a new added picture.
Of course, other picture identification manners may also be adopted, for example, the target base library ID and the picture ID are carried in other fields of the first Oplog file except for the url field, and the base64 in the url field may be encoded only for the picture. Alternatively, the target base library ID is carried in other fields of the first Oplog file except the url field, and the base64 code in the url field may only contain the picture ID and not the base library ID.
And step S508, adding the target picture in a second base library set of the extranet.
At this time, because the target picture is a newly added picture, the synchronization server adds the target picture to the base library corresponding to the second base library set, so that the updated second base library set and the updated first base library set in the service server realize quasi-real-time synchronization. The quasi-real-time condition here means that a gatekeeper exists between the synchronization server and the service server, so that data transmission has a certain delay through the gatekeeper, but the base information of the finally updated second base set and the updated first base set in the service server is kept consistent.
Step S510, replacing the corresponding picture identified in the second base library set with the target picture.
When the target picture is the modification of the original picture by the service server, at the moment, the synchronization server replaces the picture corresponding to the identifier in the second base library set by the application target picture, so that the updated second base library set and the updated first base library set in the service server are synchronized in a quasi-real-time manner.
Step S512, responding to the bottom library synchronization request of the portable device, and updating a third bottom library set on the portable device based on the updated second bottom library set.
According to the method, the base64 coding mode of the target picture is carried in the url field of the first Oplog file, so that the synchronization server can generate the target picture based on the base64 coding, the target picture is updated in the second base set, the second base set and the first base set can be synchronized in time, and the timeliness and the accuracy of base synchronization operation of subsequent portable equipment are guaranteed.
On the basis of fig. 2, another base library synchronization method is further provided in the embodiment of the present invention, where the execution subject is a synchronization server, and the method focuses on a specific process of updating a third base library set on a portable device based on an updated second base library set. As shown in fig. 7, the method comprises the steps of:
Step S702, receiving a first Oplog file issued by a gateway; the gateway is a gatekeeper used for isolating an intranet from an extranet, and the first Oplog file is a file generated by updating operation of a business server in the intranet on a first bottom library set in the intranet.
Step S704, update the second bottom library set in the extranet with the first Oplog file.
The steps S702 to S704 can refer to the steps S202 to S204, and the embodiment of the present invention is not described in detail herein.
Step S706, responding to the bottom library synchronization request of the portable equipment, and determining a target bottom library corresponding to the portable equipment according to the service requirement; and the bottom library synchronous request carries bottom library list information corresponding to a third bottom library set on the portable equipment.
Specifically, when the portable device is in communication connection with the synchronization server through the ICE technology, that is, the default synchronization server receives a base synchronization request of the portable device, where the base synchronization request carries base list information corresponding to a third base set on the portable device, where the base list information includes a base list identifier and the number of base pictures, so that the synchronization server determines a target base corresponding to the portable device according to a service requirement. For example, the portable device a sends a base library synchronization request to the synchronization server, and the service requirement of the portable device a is a picture set of the virus-involved person, the synchronization server determines a target base library corresponding to the portable device a according to the service requirement. It should be noted that, here, the service requirement may be set by an operator of the portable device according to an actual application scenario of the portable device.
Step S708, checking whether the information of the base library list includes a base library identifier of the target base library, and if so, executing step S710; if not, step S712 is performed.
After the synchronization server determines the target base library of the portable device, the synchronization server searches whether the base library list information contains the identifier of the target base library according to base library list information corresponding to a third base library set on the portable device carried by the base library synchronization request. For example, assuming that the identifier of the target underlying library is A3, and the underlying library list information corresponding to the third underlying library set on the portable device includes the underlying library identifiers a1 and a2, it indicates that the underlying library list information does not include the underlying library identifier of the target underlying library. If the bottom library list information corresponding to the third bottom library set on the portable device includes bottom library identifiers a1, a2, and A3, it indicates that the bottom library list information includes the bottom library identifier of the target bottom library.
Step S710, updating the target base library on the portable device based on the picture sets in the respective target base libraries on the portable device and the synchronization server.
When the bottom library list information corresponding to the third bottom library set has the identifier of the target bottom library of the portable device, at this time, the synchronization server also updates the target bottom library in the portable server according to the picture set of the target bottom library in the synchronization server. Specifically, the synchronization server compares whether the number of pictures in the picture sets in the respective target base libraries on the portable device and the synchronization server is equal or not; if not, the synchronous server sends the bottom library identification of the target bottom library on the synchronous server and the picture identification set of the picture in the target bottom library on the synchronous server to the portable equipment so as to receive the picture identification set to be added, which is returned by the portable equipment based on the bottom library identification and the picture identification set; searching a picture set to be added corresponding to the picture identification set to be added in a target base library of the synchronous server; and sending the found characteristic information of the picture set to be added or each picture in the picture set to be added to the portable equipment so as to add the characteristic information of the picture set to be added or each picture in the picture set to be added to the target base library of the portable equipment, thereby realizing the timely synchronization of the target base library of the portable equipment and the corresponding target base library in the synchronization server.
In the foregoing manner, in consideration that the type of the object stored in the third base library set of the portable device may be a picture or picture feature information, if the type of the object is the picture feature information, it is described that the base library in the third base library set of the portable device stores feature information corresponding to each picture, rather than a specific picture, in this application scenario, the feature information of each picture in the picture set to be added may be sent to the portable device, so as to implement synchronization between the third base library set and the first base library set. And if the pictures stored in the third base library set of the portable equipment are stored, directly sending the picture set to be added.
Step S712, sending the target base library or the feature information corresponding to each picture in the target base library to the portable device, so as to add the target base library or the feature information corresponding to each picture in the target base library to the third base library set.
If the identification of the target base library does not exist in the base library list information, the third base library set of the portable equipment does not exist in the target base library, at the moment, the synchronization server sends the feature information corresponding to each picture in the target base library or the target base library to the portable equipment, so that the portable equipment adds the feature information corresponding to each picture in the target base library or the target base library in the third base library set, and the target base library of the portable equipment and the corresponding target base library in the synchronization server are synchronized in time. The sending of the feature information corresponding to each picture in the target base is also determined based on the type of the object stored in the third base set of the portable device, if the type of the object stored in the third base set is a picture, the target base is sent, and if the type of the object stored in the third base set is picture feature information, the feature information corresponding to each picture in the target base is sent.
According to the synchronization method, whether the target base exists in the third base set is judged by taking the base list information corresponding to the third base set on the portable equipment as a reference, and then the picture set needing to be updated in the target base or the target base is sent in a targeted manner, so that the network resource consumption can be reduced as much as possible, the synchronization operation of the third base set can be completed quickly, and the synchronization efficiency of the bases is further improved on the basis of simple and easy operation.
In one possible embodiment, a synchronization operation is also required when the portable device's underlying library is updated (e.g., pictures are added or deleted). Taking the example of adding pictures to the portable device, when adding pictures to the portable device, the portable device sends picture update information to the synchronization server, where the picture update information includes an update picture and an update base identifier corresponding to the update picture. After receiving the picture updating information sent by the portable equipment, the synchronous server analyzes the updating picture and the updating base identification corresponding to the updating picture from the picture updating information, and adds the updating picture to the first base corresponding to the updating base identification of the second base set; and the synchronous server searches the corresponding first base library in the second base library set according to the updated base library identifier, and adds the updated picture to the first base library to obtain an updated second base library set.
In the updating operation, the synchronization server further generates a second Oplog file based on the added first base library, and sends the second Oplog file to the service server through the gateway, so as to increase the updated picture in the base library corresponding to the updated base library identifier in the first base library set.
The second Oplog file includes a url field, and specifically, the synchronization server generates a base64 code based on the added updated picture in the first base library, and encodes the base64 code as the content of the url field, thereby generating the second Oplog file. After receiving the second Oplog file, the service server further analyzes the second Oplog file through the mongosharke service to obtain a base64 code in a url field in the second Oplog file; and generating an updated picture based on the base64 code, so that the updated picture is added in the base corresponding to the updated base identifier in the first base set, and the quasi-real-time synchronization of the portable device and the base corresponding to the updated base identifier of the synchronization server and the service server is realized.
Similar to the service server, the synchronization server may also read the Oplog generated by updating the second base library set through the mongoShake service to obtain a url of a newly added picture recorded in the Oplog, download the newly added picture according to the url, change the downloaded newly added picture into a corresponding base64 code, replace the url to obtain a second Oplog file, and send the second Oplog file to the ftp target of the service server through the gateway, so that the service server analyzes the second Oplog file through the mongoShake service, thereby realizing the base library quasi-real-time synchronization of the service server and the synchronization server.
In another possible implementation manner, when the base library of the portable device deletes a picture, at this time, after the synchronization server receives picture deletion information sent by the portable device, the synchronization server analyzes the deleted picture identifier and the deleted base library identifier corresponding to the deleted picture identifier from the picture deletion information, and deletes the picture corresponding to the deleted picture identifier in the second base library corresponding to the deleted base library identifier of the second base library set. After the deleting operation is completed, the synchronization server further generates a third Oplog file based on the deleted second base, and sends the third Oplog file to the business server through the gateway, so that the business server analyzes the third Oplog file through the mongosharke service, and the picture corresponding to the deleted picture identifier is deleted from the base corresponding to the deleted base identifier in the first base set, thereby realizing the timely synchronization of the portable device and the bases corresponding to the updated base identifiers of the synchronization server and the business server.
In practical application, the synchronization server may communicate with a plurality of portable devices through an ICE technology, and support the plurality of portable devices to send library information, picture information, or feature values (i.e., the feature information), and if the feature values are the feature values, the picture information may be converted into model version information of an application algorithm of the corresponding portable devices, and the model version information of the application algorithm may be reported to the synchronization server.
For convenience of understanding, the storage objects in the third library set on the portable device are taken as pictures for illustration. The synchronization method as shown in fig. 8 is a schematic diagram, and the method includes the following steps:
(1) after the portable device A, the portable device B and the portable device C are started, synchronization requests are respectively sent to a synchronization server, the base database synchronization requests sent by the portable device A and the portable device B both carry base database list information, and the base database list information comprises base database list identification and base database picture quantity.
Suppose the bottom library list information a of the portable device a is the bottom library a 2; the number of base library pictures of base library a2 is 200. Suppose the bottom library list information B of the portable device B is the bottom library a 3; the number of base library pictures of base library a3 is 300. The bottom library list information C of the portable device C is the bottom library a1, and the number of bottom libraries of the bottom library a1 is 100.
(2) And after receiving the synchronization requests of the portable equipment A, the portable equipment B and the portable equipment C, the synchronization server analyzes the base list information A, the base list information B and the base list information C.
(3) And determining the target base library of the portable device A as the base library A2 according to the service requirement of the portable device A, determining the target base library of the portable device B as the base library A3 according to the service requirement of the portable device B, and determining the target base library of the portable device C as the base library A1 and the base library A3 according to the service requirement of the portable device C.
For the portable device a, the synchronization server determines that the base library list information a includes the base library identifier of the target base library (i.e., the base library a2), and further determines whether the number of pictures in the base library a2 of the synchronization server is the same as the number of pictures in the base library a2 in the base library list information a, if the number of base library pictures in the base library a2 of the synchronization server is also 200, the two are the same, and if the number of base library pictures is the same, it is inferred that the base library a2 of the portable device and the base library a2 of the synchronization server side should be the same, and then no subsequent synchronization operation is required.
For the portable device B, the synchronization server determines that the base library list information B includes the base library identifier of the target base library (i.e., the base library A3), and then further determines whether the number of pictures in the base library A3 of the synchronization server is the same as the number of pictures in the base library A3 in the base library list information B, and if the number of base library pictures in the base library A3 of the synchronization server is 350, it indicates that the picture set of the base library A3 in the synchronization server is different from the picture set of the base library A3 in the portable device B, and the synchronization operation of the base library A3 is required.
For the portable device C, the synchronization server determines that the base library list information C includes the base library a1 in the target base library and does not include the base library A3, and further determines whether the number of pictures in the base library a1 of the synchronization server is the same as the number of pictures in the base library a1 in the base library list information C, and if the number of base library pictures in the base library a1 of the synchronization server is also 100, it indicates that the picture set of the base library a1 in the synchronization server is the same as the picture set of the base library a1 in the portable device C, and it is not necessary to synchronize the base library a 1. Since the bottom library list information C does not include the bottom library A3, and the bottom library A3 is the target bottom library of the portable device C, the synchronization server needs to issue the bottom library A3 to the portable device C.
(4) The synchronization server issues to the portable device B a picture ID set M of the full base library pictures of the base library A3 and the base library A3 identification. The full-amount library picture of the library a3 is issued to the portable device C.
(5) After receiving the identification and the set M of the bottom library A3, the portable device B searches the bottom library A3 of the device to obtain a picture ID set N of the full-quantity bottom library pictures of the bottom library A3 of the device; for picture ID in sets M and N, if the picture ID belongs to N and the picture ID belongs to N
Figure BDA0002540278110000221
It means that the picture is in the set N but not in the set M, and the portable device B deletes the picture of the ID. If the figure isID of a slice ∈ M and
Figure BDA0002540278110000231
it means that the picture is in the set M but not in the set N, and the ID of the picture is added to the set S to which the picture ID is to be added.
After the portable device B completes the comparison between the set M and the set N, the identity of the base repository a3 and the set S are sent to the synchronization server.
And after receiving the bottom library A3 sent by the synchronization server, the portable device C stores the bottom library A3.
(6) After receiving the identifier of the base repository A3 and the set S sent by the portable device B, the synchronization server searches the base repository set (e.g., service database mongoddb) of the synchronization server for the pictures corresponding to the picture IDs included in the set S to obtain a picture set T, and then sends the identifier of the base repository A3 and the picture set T to the portable device B through ICE.
(7) After receiving the identification of the base library A3 and the picture set T, the portable device B stores the picture set T in the base library A3.
It should be noted that, when the third base library set of a certain portable device is updated, including adding, modifying and deleting pictures, at this time, the update operation of the first base library set in the service server is realized through the synchronization server; after the updating operation of the service server is completed, the updating operation of the other portable equipment is realized through the synchronization server, so that the timely synchronization between each portable equipment and the service server is ensured.
On the basis of the above embodiment, the embodiment of the present invention further provides another method for synchronizing a base library, where the execution main body is a portable device installed in an external network. As shown in fig. 9, the method includes the steps of:
step S902, sending a bottom library synchronization request to a synchronization server; the synchronous server is arranged in an external network, a second bottom library set is stored in the external network, and bottom libraries in the second bottom library set are synchronous with bottom libraries in a first bottom library set of the service server in the internal network.
Specifically, when the portable device is powered on, the portable device realizes communication connection with the synchronization server through an ICE technology, and at this time, the portable device sends an inventory synchronization request to the synchronization server to update and perfect inventory information in the portable device.
Step S904, receiving the picture update information returned by the synchronization server based on the bottom library synchronization request and the second bottom library set.
After the synchronization server receives the bottom library synchronization request of the portable device, the synchronization server generates picture updating information according to the bottom library synchronization request and the second bottom library set, and sends the picture updating information to the portable device, so that the portable device updates a third bottom library set on the portable device based on the picture updating information.
Step S906, updating the third base library set on the portable device based on the picture update information.
According to the method for synchronizing the bases, provided by the embodiment of the invention, the portable device sends the base synchronization request to the synchronization server, so that the synchronization server can return the picture updating information based on the request and the second base set on the synchronization server, and the third base set on the portable device is updated based on the picture updating information because the base in the second base set is synchronized with the base in the first base set of the business server in the intranet, so that the synchronization between the first base set and the third base set can be realized.
On the basis of fig. 9, another base library synchronization method is further provided in the embodiments of the present invention, where the main execution body is a portable device, and the method mainly describes a specific process of the portable device receiving the picture update information returned by the synchronization server based on the base library synchronization request and the second base library set. As shown in fig. 10, the method comprises the steps of:
step S1002, sending a bottom library synchronization request to a synchronization server; the synchronous server is arranged in an external network, a second bottom library set is stored in the external network, bottom libraries in the second bottom library set are synchronous with bottom libraries in a first bottom library set of a service server in the internal network, and bottom library synchronous requests carry bottom library list information corresponding to a third bottom library set on the portable equipment.
Step S1004, receiving a bottom library identifier of the target bottom library and a picture identifier set of pictures in the target bottom library, which are returned by the synchronization server based on the bottom library synchronization request and the second bottom library set; in this embodiment, the base library identifier of the target base library is included in the base library list information.
Specifically, after receiving a library synchronization request, a synchronization server determines a target library corresponding to a portable device according to a service requirement, then, according to library list information corresponding to a third library set on the portable device carried by the library synchronization request, searches whether the library list information includes an identifier of the target library, and when the library list information includes the identifier of the target library and the number of library pictures in a picture set in the target library in the synchronization server is different from that in the picture set in the target library in the portable device, the synchronization server sends the library identifier of the target library and the picture identifier set of the pictures in the target library to the portable device.
In addition, if the base library identifier of the target base library is not included in the base library list information, the synchronization server sends the base library identifier of the target base library and the picture identifier set of the picture in the target base library to the portable device at the moment, so that the target base library is added to the third base library set on the portable device, and the quasi-real-time synchronization of the target base library of the portable device and the corresponding target base library in the synchronization server is realized.
Step S1006, determining a to-be-added picture identification set based on the base library identification and the picture identification set.
The specific determination manner of the to-be-added picture identifier set may refer to the description of the set S in the above embodiment, and is not described herein again.
Step S1008 returns the to-be-added picture identifier set to the synchronization server.
Step S1010, receiving a to-be-added picture set corresponding to the to-be-added picture identifier set sent by the synchronization server.
Step S1012, adding the to-be-added picture set to the target base identified by the base of the portable device, and updating the third base set on the portable device.
In one possible implementation, if the image in the base library of the portable device is updated, the portable device sends image updating information to the synchronization server, so that the synchronization server updates the second base library set based on the image updating information; the picture updating information carries the updating picture and the updating base identification corresponding to the updating picture. Optionally, the updated picture includes a modified picture and/or a newly added picture, and the corresponding updated base identifier includes a modified base identifier and/or a newly added base identifier.
In another possible implementation, if there is a picture deletion in the base library of the portable device, the portable device sends picture deletion information to the synchronization server, so that the synchronization server updates the second base library set based on the picture deletion information; the picture deleting information carries a deleted picture identifier and a deleted base identifier corresponding to the deleted picture identifier.
After the synchronization server updates the second base library set according to the updated pictures or the deleted pictures of the portable equipment, the first base library set of the service server is enabled to complete corresponding updating operation through the gateway, so that the quasi-real-time synchronization of the base library information of the portable equipment and the service server is realized.
On the basis of the above embodiment, the embodiment of the present invention further provides another method for synchronizing a base library, where the execution main body is a service server installed in an intranet. As shown in fig. 11, the method comprises the steps of:
step S1102, generate a first Oplog file based on the update operation of the first base library set of the service server.
In practical application, a business server arranged in an intranet is widely applied to the field of face recognition, meanwhile, a large number of image acquisition devices (such as cameras) can be controlled, an algorithm model subjected to deep learning is utilized, real-time data acquired by the cameras in key control areas such as railway stations, airports and bus stations are analyzed, characteristics are extracted, comparison recognition and alarm are carried out, and retrieval and identity confirmation in a human image library are realized in a mode of searching images by images, so that a first bottom library set of the business server is a bottom library source of portable equipment, and the realization of quasi-real-time synchronization of bottom library information of the portable equipment and the business server has important practical significance.
Step S1104, issuing a first Oplog file to the synchronization server through the gateway, so that the synchronization server updates a second bottom library set in the external network by applying the first Oplog file, and in response to a bottom library synchronization request of the portable device, updating a third bottom library set on the portable device based on the updated second bottom library set; the gateway is a gateway used for isolating an internal network and an external network, and the synchronous server is arranged on the external network.
In the method for synchronizing the bases provided by the embodiment of the invention, when the first base set has an updating operation, the service server generates a first Oplog file, and sends the first Oplog file to the synchronization server through the gateway, so that the synchronization server updates the second base set in the external network by applying the first Oplog file, responds to the base synchronization request of the portable device, and updates the third base set on the portable device based on the updated second base set.
In one possible implementation, when a target picture is added or modified in the first bottom library set of the service server, a base64 encoding of the target picture is generated, and the base64 encoding is used as the content of a url field to generate a first Oplog file, where the first Oplog file contains the url field, so that the service server parses the first Oplog file through the mongosake service to obtain a base64 encoding in the url field of the first Oplog file, and obtains the target picture based on the base64 encoding.
In one possible implementation, when the service server receives the second Oplog file sent by the synchronization server through the gateway; the second Oplog file is generated by the synchronization server based on the updated picture of the portable equipment; and updating the target base library of the first base library set based on the second Oplog file, so that the base library information of the portable equipment and the service server is synchronized in quasi-real time. In addition, when the business server receives a third Oplog file sent by the synchronous server through the gateway; here, the third Oplog file is generated by the synchronization server based on the deleted pictures of the portable device; and deleting the deleted pictures in the target base of the first base set based on the third Oplog file so as to realize the quasi-real-time synchronization of the base information of the portable equipment and the service server.
Corresponding to the bottom library synchronization method shown in fig. 2, an embodiment of the present invention further provides a bottom library synchronization apparatus, which is applied to a synchronization server installed in an external network. As shown in fig. 12, the apparatus includes a first receiving module 1202, a first updating module 1204 and a second updating module 1206 connected in sequence, wherein the functions of the modules are as follows:
A first receiving module 1202, configured to receive a first Oplog file sent by a gateway; the gateway is a gatekeeper used for isolating an intranet from an extranet, and the first Oplog file is a file generated by updating operation of a business server in the intranet on a first bottom library set in the intranet.
A first updating module 1204, configured to update the second set of base libraries in the extranet with the first Oplog file.
A second updating module 1206 is configured to update a third underlying library set on the portable device based on the updated second underlying library set when responding to an underlying library synchronization request of the portable device.
The synchronization device of the base library provided in the embodiment of the present invention is configured such that a synchronization server disposed in an external network receives a first Oplog file issued by a service server through a gateway, where the first Oplog file is a file generated by the service server based on an update operation of a first base library set in an internal network, the synchronization server updates a second base library set in the external network by using the first Oplog file, so as to implement a timely synchronization between the first base library set in the internal network and the second base library set in the external network, and the synchronization server responds to a base library synchronization request of a portable device and updates a third base library set on the portable device based on the updated second base library set, so as to implement a synchronization between the third base library set and the second base library set in the external network, which is equivalent to implement a synchronization between the third base library set on the portable device and the first base library set on the internal network service server, the synchronization mode can quickly realize the synchronization of the base libraries in the mode that the portable equipment sends the synchronization request without configuring additional storage hardware (such as a U disk and the like) and a third-party storage device on the portable equipment, thereby relieving the problem of lag in updating the base libraries of the portable equipment, simplifying the updating operation of the portable equipment and being convenient for popularization and implementation.
In one possible implementation, the url field of the first Oplog file encodes a base64 of a target picture modified or added by the service server, and the first updating module 1204 is further configured to: analyzing the first Oplog file to obtain a target picture; determining whether the target picture is a newly added picture according to the identification of the target picture; if yes, adding a target picture in a second bottom library set of the external network; and if not, replacing the corresponding picture identified in the second base library set by the application target picture.
In another possible implementation, the first updating module 1204 is further configured to: analyzing the first Oplog file through a MongoShake service to obtain a base64 code in a url field of the first Oplog file; a target picture is generated based on the base64 encoding.
In another possible implementation manner, the base library synchronization request carries base library list information corresponding to a third base library set on the portable device, and the second updating module 1206 is further configured to: determining a target base corresponding to the portable equipment according to the service requirement; checking whether the bottom library list information contains a bottom library mark of a target bottom library; if yes, updating the target base library on the portable equipment based on the picture sets in the respective target base libraries on the portable equipment and the synchronous server; and if not, sending the target base library or the characteristic information corresponding to each picture in the target base library to the portable equipment so as to add the target base library or the characteristic information corresponding to each picture in the target base library in a third base library set.
In another possible implementation, the second updating module 1206 is further configured to: comparing whether the number of the pictures in the picture sets in the respective target base libraries on the portable equipment and the synchronous server is equal or not; if not, sending the bottom library identification of the target bottom library on the synchronization server and the picture identification set of the pictures in the target bottom library on the synchronization server to the portable equipment; receiving a picture identification set to be added returned by the portable equipment based on the bottom library identification and the picture identification set; searching a picture set to be added corresponding to the picture identification set to be added in a target base of the synchronous server; and sending the found characteristic information of the picture set to be added or each picture in the picture set to be added to the portable equipment so as to add the characteristic information of the picture set to be added or each picture in the picture set to be added to a target base library of the portable equipment.
In another possible implementation, the second updating module 1206 is further configured to: if picture updating information sent by the portable equipment is received, analyzing an updating picture and an updating base identification corresponding to the updating picture from the picture updating information, and updating a first base corresponding to the updating base identification of the second base set based on the updating picture; and generating a second Oplog file based on the updated first base library, and sending the second Oplog file to the service server through the gateway so as to update the base library corresponding to the updated base library identifier in the first base library set.
In another possible implementation, the second updating module 1206 is further configured to: generating base64 encoding based on the updated pictures in the updated first base library, encoding content serving as a url field by base64, and generating a second Oplog file, wherein the second Oplog file contains the url field.
In another possible implementation, the second updating module 1206 is further configured to: if picture deletion information sent by the portable equipment is received, analyzing a deleted picture identifier and a deleted base identifier corresponding to the deleted picture identifier from the picture deletion information, and deleting a picture corresponding to the deleted picture identifier in a second base corresponding to the deleted base identifier of the second base set; and generating a third Oplog file based on the deleted second base library, and sending the third Oplog file to the service server through the gateway, so as to delete the picture corresponding to the deleted picture identifier in the base library corresponding to the deleted base library identifier in the first base library set.
In another possible embodiment, the operating system of the synchronization server is different from the operating system of the portable device, and the synchronization server and the portable device are communicatively connected by ICE technology.
Corresponding to the method for synchronizing the base library shown in fig. 9, an embodiment of the present invention further provides a base library synchronizing apparatus, which is applied to a portable device installed in an external network. As shown in fig. 13, the apparatus includes a request sending module 1302, a second receiving module 1304, and a third updating module 1306, which are connected in sequence, wherein the functions of the modules are as follows:
A request sending module 1302, configured to send a base library synchronization request to a synchronization server; the synchronous server is arranged in an external network, a second bottom library set is stored in the external network, and bottom libraries in the second bottom library set are synchronous with bottom libraries in a first bottom library set of the service server in the internal network.
A second receiving module 1304, configured to receive the picture update information returned by the synchronization server based on the base library synchronization request and the second base library set.
A third updating module 1306, configured to update a third underlying library set on the portable device based on the picture update information.
In one possible implementation manner, the base library synchronization request carries base library list information corresponding to a third base library set on the portable device, and the second receiving module 1304 is further configured to: receiving a bottom library identification of a target bottom library and a picture identification set of pictures in the target bottom library, which are returned by the synchronization server based on the bottom library synchronization request and the second bottom library set; the bottom library identification is contained in the bottom library list information; determining a picture identification set to be added based on the bottom library identification and the picture identification set; returning a picture identification set to be added to the synchronous server; receiving a picture set to be added corresponding to the picture identification set to be added sent by the synchronous server; and adding a picture set to be added in a target base library identified by the base library of the portable equipment.
In another possible implementation manner, the base library synchronization request carries base library list information corresponding to a third base library set on the portable device, and the second receiving module 1304 is further configured to: receiving a target base library returned by the synchronization server based on the base library synchronization request and the second base library set; the bottom library identification of the target bottom library is not contained in the bottom library list information; adding the target base library to a third base library set on the portable device.
In another possible implementation, the third updating module 1306 is further configured to: if the picture is updated, sending picture updating information to the synchronization server so that the synchronization server updates the second base library set based on the picture updating information; the image updating information carries an updating image and an updating base identification corresponding to the updating image; if the picture is deleted, sending picture deletion information to the synchronization server so that the synchronization server updates the second base library set based on the picture deletion information; the picture deleting information carries a deleted picture identifier and a deleted base identifier corresponding to the deleted picture identifier.
Corresponding to the bottom library synchronizing method shown in fig. 11, an embodiment of the present invention further provides a bottom library synchronizing apparatus, which is applied to a service server installed in an intranet. As shown in fig. 14, the apparatus includes a file generation module 1402 and a file transmission module 1404 connected in sequence, where functions of the respective modules are as follows:
A file generating module 1402, configured to generate a first Oplog file based on an update operation of a first base library set of the service server;
a file sending module 1404, configured to issue the first Oplog file to the synchronization server through the gateway, so that the synchronization server updates the second base library set in the external network by using the first Oplog file, and updates, in response to a base library synchronization request of the portable device, the third base library set on the portable device based on the updated second base library set; the gateway is a gateway used for isolating an internal network and an external network, and the synchronous server is arranged on the external network.
In one possible implementation manner, the file generation module 1402 is further configured to: generating base64 codes of the target pictures when the target pictures are added or modified; base64 is encoded as the content of the url field, generating a first Oplog file, which contains the url field.
In another possible embodiment, the above apparatus further comprises: the picture adding module is used for receiving a second Oplog file sent by the synchronous server through the gateway; the second Oplog file is generated by the synchronization server based on the updated picture of the portable device; the target base library of the first base library set is updated based on the second Oplog file.
In another possible embodiment, the above apparatus further comprises: the picture deleting module is used for receiving a third Oplog file sent by the synchronous server through the gateway; a third Oplog file is generated by the synchronization server based on the deleted pictures of the portable equipment; and deleting the deleted pictures in the target bottom library of the first bottom library set based on the third Oplog file.
The implementation principle and the generated technical effect of the base library synchronization device provided by the embodiment of the present invention are the same as those of the base library synchronization method embodiment, and for brief description, reference may be made to corresponding contents in the base library synchronization method embodiment for a part not mentioned in the embodiment of the base library synchronization device.
An embodiment of the present invention further provides an electronic device, as shown in fig. 15, which is a schematic structural diagram of the electronic device, where the electronic device includes a processor 151 and a memory 152, the memory 152 stores machine executable instructions that can be executed by the processor 151, and the processor 151 executes the machine executable instructions to implement the base synchronization method.
In the embodiment shown in fig. 15, the electronic device further comprises a bus 153 and a communication interface 154, wherein the processor 151, the communication interface 154 and the memory 152 are connected by the bus.
The Memory 152 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is implemented through at least one communication interface 154 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, etc. may be used. The bus may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 15, but that does not indicate only one bus or one type of bus.
Processor 151 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 151. The Processor 151 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and the processor 151 reads information in the memory 152, and completes the steps of the base library synchronization method of the foregoing embodiment in combination with hardware thereof.
The embodiment of the present invention further provides a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the base synchronization method, and specific implementation may refer to the foregoing method embodiment, and is not described herein again.
The method for synchronizing the base library, the device for synchronizing the base library, and the computer program product of the electronic system provided by the embodiments of the present invention include a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute the method for synchronizing the base library described in the foregoing method embodiments, and specific implementations may refer to the method embodiments and are not described herein again.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: 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.
In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In the description of the present invention, it should be noted that the terms "first", "second", and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (22)

1. A method for synchronizing a base library is applied to a synchronization server arranged on an external network, and comprises the following steps:
receiving a first Oplog file issued by a gateway; the gateway is a gatekeeper used for isolating an internal network and an external network, and the first Oplog file is a file generated by updating operation of a business server in the internal network on a first bottom library set in the internal network;
updating a second set of base libraries in the extranet with the first Oplog file;
and updating a third base library set on the portable device based on the updated second base library set in response to a base library synchronization request of the portable device.
2. The method as claimed in claim 1, wherein the url field of the first Oplog file encodes base64 of the target picture modified or added by the service server;
the step of applying the first Oplog file to update a second set of base libraries in the extranet includes:
analyzing the first Oplog file to obtain the target picture;
determining whether the target picture is a newly added picture according to the identification of the target picture;
if yes, adding the target picture in a second bottom library set of the extranet;
And if not, replacing the picture corresponding to the identifier in the second base library set by the target picture.
3. The method of claim 2, wherein parsing the first Oplog file to obtain the target picture comprises:
analyzing the first Oplog file through a MongoShake service to obtain the base64 codes in the url field of the first Oplog file;
and generating the target picture based on the base64 coding.
4. The method according to claim 1, wherein the base library synchronization request carries base library list information corresponding to a third base library set on the portable device;
updating a third base library set on the portable device based on the updated second base library set, comprising:
determining a target base corresponding to the portable equipment according to business requirements;
checking whether the bottom library list information contains a bottom library identifier of the target bottom library;
if yes, updating the target base library on the portable equipment based on the picture sets in the target base libraries on the portable equipment and the synchronous server respectively;
if not, sending the feature information corresponding to the target base library or each picture in the target base library to the portable equipment so as to add the feature information corresponding to the target base library or each picture in the target base library in the third base library set.
5. The method of claim 4, wherein the step of updating the target base library on the portable device based on the picture sets in the respective target base libraries on the portable device and the synchronization server comprises:
comparing whether the number of pictures in the picture sets in the respective target base libraries on the portable equipment and the synchronous server is equal or not;
if not, sending the bottom library identification of the target bottom library on the synchronous server and the picture identification set of the pictures in the target bottom library on the synchronous server to the portable equipment;
receiving a to-be-added picture identification set returned by the portable equipment based on the bottom library identification and the picture identification set;
searching a picture set to be added corresponding to the picture identification set to be added in a target base library of the synchronous server;
and sending the found feature information of the picture set to be added or each picture in the picture set to be added to the portable equipment so as to add the feature information of the picture set to be added or each picture in the picture set to be added to a target base library of the portable equipment.
6. The method of claim 1, further comprising:
If picture updating information sent by the portable equipment is received, analyzing an updating picture and an updating base identification corresponding to the updating picture from the picture updating information, and updating a first base corresponding to the updating base identification of the second base set based on the updating picture;
and generating a second Oplog file based on the updated first base library, and sending the second Oplog file to the service server through the gateway so as to update the base library corresponding to the updated base library identifier in the first base library set.
7. The method of claim 6, wherein generating a second Oplog file based on the updated first base library comprises:
generating a base64 encoding based on the updated pictures in the first base library after updating, encoding the content as a url field with the base64, and generating a second Oplog file containing the url field.
8. The method of claim 1, further comprising:
if picture deletion information sent by the portable equipment is received, analyzing a deleted picture identifier and a deleted base identifier corresponding to the deleted picture identifier from the picture deletion information, and deleting a picture corresponding to the deleted picture identifier in a second base corresponding to the deleted base identifier of the second base set;
And generating a third Oplog file based on the deleted second base library, and sending the third Oplog file to the service server through the gateway, so as to delete the picture corresponding to the deleted picture identifier in the base library corresponding to the deleted base library identifier in the first base library set.
9. The method of claim 1, wherein an operating system of the synchronization server is different from an operating system of the portable device, and wherein the synchronization server is communicatively coupled with the portable device via ICE technology.
10. A method for synchronizing a base store, which is applied to a portable device installed in an external network, the method comprising:
sending a bottom library synchronization request to a synchronization server; the synchronous server is arranged in the external network, a second bottom library set is stored in the external network, and a bottom library in the second bottom library set is synchronous with a bottom library in a first bottom library set of a business server in the internal network;
receiving picture updating information returned by the synchronization server based on the bottom library synchronization request and the second bottom library set;
updating a third underlying library set on the portable device based on the picture update information.
11. The method according to claim 10, wherein the base library synchronization request carries base library list information corresponding to a third base library set on the portable device;
the step of receiving the picture update information returned by the synchronization server based on the bottom library synchronization request and the second bottom library set includes:
receiving a bottom library identifier of a target bottom library and a picture identifier set of pictures in the target bottom library, which are returned by the synchronization server based on the bottom library synchronization request and the second bottom library set; the bottom library identification is contained in the bottom library list information;
determining a picture identification set to be added based on the bottom library identification and the picture identification set;
returning the picture identification set to be added to the synchronous server;
receiving a picture set to be added corresponding to the picture identification set to be added sent by the synchronous server or characteristic information of each picture in the picture set to be added;
and adding the picture set to be added or the characteristic information of each picture in the picture set to be added in a target base of the base identification of the portable equipment.
12. The method according to claim 10, wherein the base library synchronization request carries base library list information corresponding to a third base library set on the portable device;
The step of receiving the picture update information returned by the synchronization server based on the bottom library synchronization request and the second bottom library set includes:
receiving the base library synchronization request and the characteristic information corresponding to each picture in the target base library or the target base library returned by the synchronization server based on the base library synchronization request and the second base library set; the bottom library identification of the target bottom library is not contained in the bottom library list information;
and adding the target base library or the characteristic information corresponding to each picture in the target base library in the third base library set on the portable equipment.
13. The method of claim 10, further comprising:
if the picture is updated, sending picture updating information to the synchronization server so that the synchronization server updates the second base library set based on the picture updating information; the picture updating information carries an updating picture and an updating base identification corresponding to the updating picture;
if the picture is deleted, sending picture deletion information to the synchronization server so that the synchronization server updates the second base library set based on the picture deletion information; the picture deleting information carries a deleted picture identifier and a deleted base identifier corresponding to the deleted picture identifier.
14. A method for synchronizing a base library is applied to a service server arranged in an intranet, and comprises the following steps:
generating a first Oplog file based on an updating operation of the first bottom library set of the business server;
issuing the first Oplog file to a synchronization server through a gateway so that the synchronization server updates a second bottom library set in an external network by applying the first Oplog file, and updating a third bottom library set on the portable device based on the updated second bottom library set in response to a bottom library synchronization request of the portable device; the gateway is a gatekeeper used for isolating the internal network and the external network, and the synchronous server is arranged on the external network.
15. The method of claim 14, wherein the step of generating a first Oplog file based on the update operation of the first base set of the business server comprises:
when a target picture is added or modified, generating base64 codes of the target picture;
encoding the base64 as the content of the url field, generating a first Oplog file, the first Oplog file containing the url field.
16. The method of claim 14, further comprising:
Receiving a second Oplog file sent by the synchronization server through the gateway; the second Oplog file is generated by the synchronization server based on an updated picture of the portable device;
updating a target base of the first set of base bases based on the second Oplog file.
17. The method of claim 14, further comprising:
receiving a third Oplog file sent by the synchronization server through the gateway; the third Oplog file is generated by the synchronization server based on a deleted picture of the portable device;
deleting the deletion picture in a target base library of the first base library set based on the third Oplog file.
18. A bottom library synchronization device is applied to a synchronization server arranged in an external network, and comprises:
the first receiving module is used for receiving a first Oplog file issued by the gateway; the gateway is a gatekeeper used for isolating an internal network and an external network, and the first Oplog file is a file generated by updating operation of a business server in the internal network on a first bottom library set in the internal network;
a first updating module, configured to apply the first Oplog file to update a second base library set in the extranet;
And the second updating module is used for responding to a bottom library synchronization request of the portable equipment and updating a third bottom library set on the portable equipment based on the updated second bottom library set.
19. An under garage synchronization apparatus, wherein the apparatus is applied to a portable device installed in an external network, the apparatus comprising:
the request sending module is used for sending a bottom library synchronization request to the synchronization server; the synchronous server is arranged in the external network, a second bottom library set is stored in the external network, and a bottom library in the second bottom library set is synchronous with a bottom library in a first bottom library set of a business server in the internal network;
a second receiving module, configured to receive picture update information returned by the synchronization server based on the bottom library synchronization request and the second bottom library set;
and the third updating module is used for updating a third base library set on the portable equipment based on the picture updating information.
20. The utility model provides a bottom storehouse synchronizer, its characterized in that, the device is applied to the business server who sets up in the intranet, the device includes:
the file generation module is used for generating a first Oplog file based on the updating operation of the first bottom library set of the business server;
A file sending module, configured to issue the first Oplog file to a synchronization server through a gateway, so that the synchronization server updates a second base library set in an external network by applying the first Oplog file, and in response to a base library synchronization request of a portable device, updates a third base library set on the portable device based on the updated second base library set; the gateway is a gatekeeper used for isolating the internal network and the external network, and the synchronous server is arranged on the external network.
21. An electronic system, characterized in that the electronic system comprises: the system comprises portable equipment, a synchronization server and a service server;
the business server comprises a first storage device and a first processing device, wherein the first storage device is used for storing a first base library set and a first computer program;
the synchronization server comprises a second storage device for storing a second set of underlying libraries and a second computer program, and a second processing device;
the portable device comprises a third storage means for storing a third set of repositories and a third computer program, and a third processing device;
the first computer program, when executed by the first processing device, performs the base library synchronization method of any of claims 14 to 17;
The second computer program, when executed by the second processing device, performing the base synchronization method of any of claims 1 to 9;
the third computer program, when executed by the third processing device, performs the base synchronization method of any of claims 10 to 13.
22. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processing device, carries out the steps of the base synchronization method according to any one of claims 1 to 17.
CN202010546660.5A 2020-06-15 2020-06-15 Bottom library synchronization method, device and electronic system Pending CN111858749A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010546660.5A CN111858749A (en) 2020-06-15 2020-06-15 Bottom library synchronization method, device and electronic system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010546660.5A CN111858749A (en) 2020-06-15 2020-06-15 Bottom library synchronization method, device and electronic system

Publications (1)

Publication Number Publication Date
CN111858749A true CN111858749A (en) 2020-10-30

Family

ID=72987802

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010546660.5A Pending CN111858749A (en) 2020-06-15 2020-06-15 Bottom library synchronization method, device and electronic system

Country Status (1)

Country Link
CN (1) CN111858749A (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060106881A1 (en) * 2004-10-25 2006-05-18 Empower Technologies System and method for global data synchronization
CN101510217A (en) * 2009-03-09 2009-08-19 阿里巴巴集团控股有限公司 Image updating method in image database, server and system
WO2013067681A1 (en) * 2011-11-08 2013-05-16 Qualcomm Incorporated Synchronizing forwarding databases in a network device background
CN104699760A (en) * 2015-02-11 2015-06-10 安徽继远电网技术有限责任公司 Data synchronization method used for heterogeneous system and based on safety isolation
CN104750808A (en) * 2015-03-27 2015-07-01 安徽四创电子股份有限公司 Crossroad data border-crossing implementation method based on Hadoop big data platform
US20150293764A1 (en) * 2014-04-10 2015-10-15 Omprakash VISVANATHAN Method and system to compose and execute business rules
CN106060065A (en) * 2016-06-28 2016-10-26 山东中磁视讯股份有限公司 Communication system and method for use in restricted network environment
CN106254456A (en) * 2016-08-03 2016-12-21 深圳市商汤科技有限公司 A kind of method of data synchronization and data synchronous system
CN106888245A (en) * 2016-06-07 2017-06-23 阿里巴巴集团控股有限公司 A kind of data processing method, apparatus and system
CN108809686A (en) * 2017-07-11 2018-11-13 北京视联动力国际信息技术有限公司 Resource synchronization method, device, electronic equipment and computer readable storage medium
CN110209642A (en) * 2018-02-05 2019-09-06 北京智明星通科技股份有限公司 Method, apparatus, server and the computer-readable medium of information processing
CN110413690A (en) * 2019-07-03 2019-11-05 杭州数梦工场科技有限公司 Method of data synchronization, server, electronic equipment, the storage medium of database
CN110719307A (en) * 2018-07-12 2020-01-21 深圳云天励飞技术有限公司 Data transmission method, client, server and computer readable storage medium
CN110795443A (en) * 2019-10-08 2020-02-14 中国建设银行股份有限公司 Method, device, equipment and computer readable medium for data synchronization
CN110941621A (en) * 2018-09-25 2020-03-31 北京国双科技有限公司 Method and device for synchronizing databases between internal network and external network

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060106881A1 (en) * 2004-10-25 2006-05-18 Empower Technologies System and method for global data synchronization
CN101510217A (en) * 2009-03-09 2009-08-19 阿里巴巴集团控股有限公司 Image updating method in image database, server and system
WO2013067681A1 (en) * 2011-11-08 2013-05-16 Qualcomm Incorporated Synchronizing forwarding databases in a network device background
US20150293764A1 (en) * 2014-04-10 2015-10-15 Omprakash VISVANATHAN Method and system to compose and execute business rules
CN104699760A (en) * 2015-02-11 2015-06-10 安徽继远电网技术有限责任公司 Data synchronization method used for heterogeneous system and based on safety isolation
CN104750808A (en) * 2015-03-27 2015-07-01 安徽四创电子股份有限公司 Crossroad data border-crossing implementation method based on Hadoop big data platform
CN106888245A (en) * 2016-06-07 2017-06-23 阿里巴巴集团控股有限公司 A kind of data processing method, apparatus and system
CN106060065A (en) * 2016-06-28 2016-10-26 山东中磁视讯股份有限公司 Communication system and method for use in restricted network environment
CN106254456A (en) * 2016-08-03 2016-12-21 深圳市商汤科技有限公司 A kind of method of data synchronization and data synchronous system
CN108809686A (en) * 2017-07-11 2018-11-13 北京视联动力国际信息技术有限公司 Resource synchronization method, device, electronic equipment and computer readable storage medium
CN110209642A (en) * 2018-02-05 2019-09-06 北京智明星通科技股份有限公司 Method, apparatus, server and the computer-readable medium of information processing
CN110719307A (en) * 2018-07-12 2020-01-21 深圳云天励飞技术有限公司 Data transmission method, client, server and computer readable storage medium
CN110941621A (en) * 2018-09-25 2020-03-31 北京国双科技有限公司 Method and device for synchronizing databases between internal network and external network
CN110413690A (en) * 2019-07-03 2019-11-05 杭州数梦工场科技有限公司 Method of data synchronization, server, electronic equipment, the storage medium of database
CN110795443A (en) * 2019-10-08 2020-02-14 中国建设银行股份有限公司 Method, device, equipment and computer readable medium for data synchronization

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
张程: "分布式系统架构", vol. 2020, 31 May 2020, 机械工业出版社, pages: 34 - 38 *
驻云科技乔锐杰: "阿里云运维架构实践秘籍", vol. 2020, 30 April 2020, 机械工业出版社, pages: 173 - 180 *

Similar Documents

Publication Publication Date Title
CN107861686B (en) File storage method, server and computer readable storage medium
US10951702B2 (en) Synchronized content library
KR101994163B1 (en) Device and method for synchronizing compression contents file and system using the same
CN109391673B (en) Method, system and terminal equipment for managing update file
CN103645951A (en) Cross-platform mobile data management system and method
CN106453572B (en) Method and system based on Cloud Server synchronous images
CN103428525A (en) Online inquiry and play control method and system for network videos and television programs
CN108491715B (en) Terminal fingerprint database generation method and device and server
CN105302920A (en) Optimal management method and system for cloud storage data
CN104216956A (en) Method and device for searching picture information
CN113010476A (en) Metadata searching method, device and equipment and computer readable storage medium
CN111176706A (en) Terminal upgrading method and device, electronic equipment and storage medium
CN108418890B (en) Face special effect resource generation method, device and system and readable storage medium
CN112559913A (en) Data processing method and device, computing equipment and readable storage medium
CN111858749A (en) Bottom library synchronization method, device and electronic system
US9286305B2 (en) Virtual storage gate system
US10599928B2 (en) Method and system for enabling information in augmented reality applications
CN113762040B (en) Video identification method, device, storage medium and computer equipment
CN117435215A (en) Development environment deployment method, system, computer device and storage medium
KR100896335B1 (en) System and Method for managing and detecting duplicate movie files based on audio contents
CN117009430A (en) Data management method, device, storage medium and electronic equipment
US11442892B2 (en) File and data migration to storage system
CN106845202B (en) File access method, device and system for face recognition system
CN111259178A (en) Image data synchronization method, device and system
KR101407334B1 (en) The method, device and server for providing music service

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