CN112968921A - Data updating method, device and computer readable storage medium - Google Patents

Data updating method, device and computer readable storage medium Download PDF

Info

Publication number
CN112968921A
CN112968921A CN202110063249.7A CN202110063249A CN112968921A CN 112968921 A CN112968921 A CN 112968921A CN 202110063249 A CN202110063249 A CN 202110063249A CN 112968921 A CN112968921 A CN 112968921A
Authority
CN
China
Prior art keywords
devices
data
signal
updated
master device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110063249.7A
Other languages
Chinese (zh)
Other versions
CN112968921B (en
Inventor
黄信杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202110063249.7A priority Critical patent/CN112968921B/en
Publication of CN112968921A publication Critical patent/CN112968921A/en
Application granted granted Critical
Publication of CN112968921B publication Critical patent/CN112968921B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Telephonic Communication Services (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Hardware Redundancy (AREA)

Abstract

The application discloses a data updating method, a device and a computer readable storage medium, wherein the method is applied to a data updating system, the data updating system comprises a plurality of devices and a server, and the method comprises the following steps: in response to the preset election condition being met, one device is selected from the multiple devices to serve as a master device, and the other devices serve as slave devices; downloading data to be updated from a server by using a main device through a first communication technology; and synchronizing the data to be updated to the slave device by the master device through the second communication technology. Through the mode, the pressure and the updating cost of the server can be reduced.

Description

Data updating method, device and computer readable storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a data updating method, apparatus, and computer-readable storage medium.
Background
Taking a network Camera (IP Camera, IPC) as an example to describe a typical data updating manner, as shown in fig. 1, when data of a face database needs to be updated or updated, each IPC 11 needs to be connected to a device management server 13 through a cellular base station 12 to request data, and then the device management server 13 transmits the data to each IPC 11; as the IPCs 11 deployed are more and more, more device management servers 13 are needed to meet the downloading requirements of the IPCs 11; on the other hand, the more IPC 11, the higher the traffic charge.
Disclosure of Invention
The application provides a data updating method, a data updating device and a computer readable storage medium, which can reduce the pressure and updating cost of a server.
In order to solve the technical problem, the technical scheme adopted by the application is as follows: a data updating method is provided, and is applied to a data updating system, wherein the data updating system comprises a plurality of devices and a server, and the method comprises the following steps: in response to the preset election condition being met, one device is selected from the multiple devices to serve as a master device, and the other devices serve as slave devices; downloading data to be updated from a server by using a main device through a first communication technology; and synchronizing the data to be updated to the slave device by the master device through the second communication technology.
In order to solve the above technical problem, another technical solution adopted by the present application is: the data updating system comprises a server and a plurality of devices, wherein the plurality of devices comprise a master device and a slave device, the server is connected with the master device, the master device is connected with at least one device, and the server or the devices are used for selecting one device from the plurality of devices as the master device and the other devices as the slave devices when preset election conditions are met; the master device is used for downloading the data to be updated from the server through a first communication technology and synchronizing the data to be updated to the slave device through a second communication technology.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided a computer-readable storage medium for storing a computer program, which, when executed by a processor, is used to implement the data updating method in the above technical solution.
Through the scheme, the beneficial effects of the application are that: firstly, selecting one device from all devices as a master device, and using the rest devices as slave devices; when the data needs to be updated, the main equipment directly downloads the data to be updated from the server by using a first communication technology; then, the master device synchronizes the data to be updated to the slave device by using a second communication technology, so that the data of all the devices are updated; the slave equipment does not need to download the data to be updated from the server, only the master equipment downloads the data to be updated from the server, so that the task processing pressure of the server can be reduced, and when the cost of the second communication technology is lower than that of the first communication technology, the cost for updating the data can be greatly reduced, and the updating cost can be increased by using the saved cost.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts. Wherein:
FIG. 1 is an interaction diagram of a device management server, a base station, and an IPC provided in the present application;
FIG. 2 is a schematic diagram of an embodiment of a data update system provided herein;
FIG. 3 is a schematic flow chart diagram illustrating an embodiment of a data update method provided herein;
FIG. 4 is a schematic diagram of the connection of a master device and a plurality of slave devices in the embodiment shown in FIG. 3;
FIG. 5 is a schematic flow chart diagram illustrating another embodiment of a data update method provided herein;
FIG. 6 is a schematic flow chart of step 51 in the embodiment shown in FIG. 5;
FIG. 7 is a schematic flow chart of step 511 in the embodiment shown in FIG. 6;
FIG. 8 is a schematic diagram of the connection of a master device and a plurality of slave devices in the embodiment shown in FIG. 5;
FIG. 9 is another flow chart illustrating step 511 in the embodiment shown in FIG. 6;
FIG. 10 is a schematic structural diagram of an embodiment of a computer-readable storage medium provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
When a large number of 5G (5 th generation mobile communication technologies) devices need program upgrade and database update, the devices need to be connected to a server through a 5G network to obtain data; in this case, the data required by the individual devices is the same, and if each device is connected to the server, on the one hand, the 5G traffic tariff is increased and on the other hand the server pressure is increased. In order to solve the above problem, the present application provides a device data updating method based on a 5G network, which can reduce 5G traffic charges consumed by device data updating and pressure of a server, and a specific implementation scheme will be described below.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an embodiment of a data updating system provided in the present application, where the data updating system includes a server 21 and a plurality of devices (not shown).
The plurality of devices comprise a master device 221 and a slave device 222, the server 21 is connected with the master device 221, and the server 21 or the devices are used for selecting one device from the plurality of devices as the master device 221 and the other devices as the slave devices 222 when preset election conditions are met.
Further, the master device 221 and the slave device 222 may be IPCs, and the server 21 may be a device management server; the master device 221 may be connected to the server 21 through a first base station 231 and a second base station 232, where the first base station 231 may be a common base station, and the second base station 232 may be a 5G micro base station; the preset election condition includes that the server 21 generates a designated instruction, a new device joins the data updating system, an original master device (i.e., a master device in the current system) sends out an exit signal, or an absolute difference value between the minimum signal intensity of the device and the maximum signal intensity of the device within a preset time exceeds a preset difference value threshold; for example, the data update system includes 5 devices, which are numbered 1 to 5, respectively, and the server 21 may designate the device No. 4 as the master device 221, and send a designation instruction to the device No. 4.
The master device 221 is connected with at least one slave device 222, and is used for downloading data to be updated from the server 21 through a first communication technology and synchronizing the data to be updated to the slave device 222 through a second communication technology; specifically, the first communication technology may be a 5G communication technology, and the second communication technology may be a Device to Device (D2D) communication technology, that is, the master Device 221 downloads data to be updated from the server 21 through the 5G communication technology, and then sends the downloaded data to all the slave devices 222 or some of the slave devices 222; further, if the master device 221 transmits the downloaded data to the partial slave devices 222, the slave devices 222 that have received the data to be updated transmitted by the master device 221 need to transmit the data to be updated that they have received to the remaining devices that have not received the data to be updated.
It is to be understood that the first communication technology and the second communication technology are not limited to the 5G communication technology and the D2D communication technology, respectively, and may be set according to specific application requirements as long as it is less expensive to perform data transmission by using the second communication technology than by using the first communication technology.
In the data updating system provided in this embodiment, under the same 5G micro base station, one device may be selected from all devices as a master device, and the other devices may be selected as slave devices, the master device may subscribe to a server for a data updating event, and the slave devices do not need to subscribe to the server for the data updating event; when the data of the equipment needs to be updated, the server can issue an update notification to the main equipment, and then the main equipment requests the server to download the data to be updated; finally, the master device directly synchronizes the data to be updated to other slave devices by using a D2D communication technology, and the slave devices can also synchronize the data to be updated to other slave devices by using a D2D communication technology, so that the data of all the devices are updated; because the slave equipment does not need to download the data to be updated from the server, only the master equipment downloads the data to be updated from the server, the task processing pressure of the server can be reduced, and when the cost of the second communication technology is lower than that of the first communication technology, the cost of data updating can be greatly reduced.
Referring to fig. 3, fig. 3 is a schematic flowchart of an embodiment of a data updating method provided in the present application, where the method is applied to a data updating system in the foregoing embodiment, the data updating system includes a plurality of devices and a server, and the method includes:
step 31: and in response to the preset election condition being met, selecting one device from the multiple devices as a master device and the other devices as slave devices.
The preset election condition comprises that a new device is added into the data updating system, the server sends a specified instruction, the original main device sends an exit signal or the absolute difference value between the minimum signal intensity of the device and the maximum signal intensity of the device in a preset time exceeds a preset difference value threshold; when the current condition for triggering the preset election condition is met, for example: when a new device is added or the current main device (namely the original main device) sends out an exit signal, election operation is carried out so as to select one main device from all devices; it will be appreciated that if the current master device issues an exit signal triggering an election operation, a new master device is elected among the remaining devices other than the original master device.
Step 32: and downloading the data to be updated from the server by using the main device through the first communication technology.
After the master device is elected, the master device can download data to be updated, which can be upgrade parameters or new images/videos or other data, from the server through the first base station and the second base station.
Step 33: and synchronizing the data to be updated to the slave device by the master device through the second communication technology.
After downloading the data to be updated from the slave server, the master device can send part of the data to be updated to the slave devices, and part of the slave devices send the data to be updated received by the slave devices to other slave devices which do not receive the data to be updated; for example, as shown in fig. 4, the plurality of devices includes a master device 41 and first to fourth slave devices 421 to 424, the master device 41 may synchronize data to be updated to the first and second slave devices 421 and 422, and the second slave device 422 may synchronize data to be updated to the third and fourth slave devices 423 and 424 after receiving the data to be updated.
It is understood that, in order to avoid repeatedly sending the data to be updated, when the sender (i.e. the master/slave device that is ready to send the data to be updated) sends the data to be updated to the receiver (i.e. the slave device that is ready to receive the data to be updated), an inquiry message may be sent to the receiver to inquire whether the receiver receives the data to be updated; if the receiver feeds back the message that the receiver does not receive the data to be updated to the sender, the sender can send the data to be updated to the receiver; if the receiver feeds back the message that the receiver has received the data to be updated to the sender, the sender does not need to send the data to be updated to the receiver. Further, the version number of the data to be updated may also be identified, and if the receiver receives the data to be updated, but the version number is lower than the version number of the current data to be updated, the sender also needs to send the current data to be updated to the receiver.
Referring to fig. 5, fig. 5 is a schematic flowchart illustrating another embodiment of a data updating method provided in the present application, the method including:
step 51: and in response to meeting the preset election condition, selecting the main equipment based on the signal strengths of the plurality of equipment and the serial numbers of the plurality of equipment.
Whether the master equipment exists or not can be judged firstly, if the master equipment exists, the original master equipment modifies the zone bit of the original master equipment so as to modify the zone bit of the original master equipment into a second preset identification value, and the second preset identification value is used for identifying the slave equipment; and then selects a new master device from the remaining devices except the original master device. If the master device does not exist in the current system, one device can be directly selected from all the devices to be used as the master device.
When a new device is added, the signal intensity of a certain device exceeds a preset difference threshold value, an original main device sends an active exit signal or a server designates a certain device as a main device, the main device election operation is triggered, and the new main device is elected.
In a specific embodiment, the election method may be as shown in fig. 6, and includes the following steps:
step 511: and calculating the maximum value in the signal intensities of the plurality of devices, recording the device corresponding to the maximum signal intensity as a device to be selected, and counting the number of the devices to be selected.
The signal intensity of each device is counted, then the signal intensities of all the devices are compared to obtain the device with the maximum signal intensity, the device is used as a device to be selected, and the number of the devices to be selected may be one or more than one.
In a specific embodiment, the way of counting the signal strength can be as shown in fig. 7, which includes the following steps:
step 5111 a: the current device transmits the signal strength of the current device to each signal receiving device.
The equipment meeting the preset election condition is used as current equipment, equipment except the current equipment in the multiple pieces of equipment is used as signal receiving equipment, and the current equipment can send the signal strength of the current equipment to all the signal receiving equipment.
Step 5112 a: each signal receiving apparatus transmits its own signal strength to all signal receiving apparatuses that have not received its own signal strength.
The signal receiving equipment which receives the signal strength stores the current signal strength, and simultaneously sends the signal strength of the signal receiving equipment to the signal receiving equipment which does not receive the signal strength of the signal receiving equipment, so that each equipment stores the signal strength corresponding to all the equipment; for example, assume there are 6 devices: A-F, if the current device is device C, then device C can send its signal strength to devices A-B and D-F, device A can send its signal strength to devices B-F, device B can send its signal strength to devices A and C-F, device D can send its signal strength to devices A-C and E-F, device E can send its signal strength to devices A-D and F, and device F can send its signal strength to devices A-E.
It is to be understood that, when all the slave devices are connected in series, for example, as shown in fig. 8, the master device 81 is sequentially connected to the first slave device 821 to the third slave device 823, the master device 81 may transmit its signal strength to the first slave device 821, the first slave device 821 transmits its signal strength and the signal strength of the master device 81 to the second slave device 822, and the second slave device 822 transmits its signal strength, the signal strength of the master device 81 and the signal strength of the first slave device 821 to the third slave device 823.
Step 5113 a: the current device and all signal receiving devices judge whether the signal intensity of the current device and all signal receiving devices is the maximum value of all signal intensities.
Taking the number of devices as N (N is more than or equal to 1) as an example, each device can compare the signal intensity of itself with the signal intensities of (N-1) other devices to judge whether the signal intensity of itself is the maximum value of the N signal intensities.
Step 5114 a: and setting the flag bit of the self to be a first preset identification value in response to the fact that the signal intensity of the self is the maximum value of all the signal intensities.
If the signal intensity of the device is judged to be the maximum value in the signal intensities of all the devices, the device is indicated to be a device to be selected, at the moment, whether the serial number of the device is the minimum value in all the devices to be selected can be further judged, if so, the flag bit of the device is set to be a first preset identification value, and the first preset identification value is used for identifying the device as a main device; if not, setting the flag bit of the self to be a second preset identification value; the first preset identification value and the second preset identification value may be 0 or 1, for example, the first preset identification value is 1, and the second preset identification value is 0.
Step 5115 a: and setting the flag bit of the self to be a second preset identification value in response to the fact that the signal intensity of the self is not the maximum value of all the signal intensities.
If the signal intensity of the self is judged not to be the maximum value in the signal intensities of all the devices, the self is indicated to be the slave device, and the zone bit of the self can be set to be the second preset identification value.
In another specific embodiment, the way of counting the signal strength can be as shown in fig. 9, which includes the following steps:
step 5111 b: the current device receives the own signal strength transmitted by each signal transmitting device.
The device meeting the preset election condition is used as the current device, the devices except the current device in the multiple devices are used as signal sending devices, and the current device can receive the signal intensity sent by all the signal sending devices so as to compare the signal intensity.
Step 5112 b: the current device compares the signal strength of the current device with the received signal strength to obtain the maximum signal strength.
The current device can compare the signal intensity of the current device with the signal intensities of all the signal sending devices to find the maximum value (namely, the maximum signal intensity) in all the signal intensities; then generating an election result based on the maximum signal strength, wherein the election result is used for identifying the main equipment; then the current device sends election results to all signal sending devices to inform all signal sending devices which the master device is, so that each signal sending device modifies its own zone bit.
It can be understood that the current device may not only be a device that triggers a preset election condition, but also select a device closest to the 5G micro base station as the current device, and may set a rule for selecting the current device according to a specific application requirement.
Step 512: and judging whether the number of the devices to be selected is larger than the preset number.
In order to select only one master device, the number of the devices to be selected may be compared with a preset number, where the preset number is 1, that is, it is determined whether the number of the devices to be selected is greater than 1.
Step 513: and responding to the situation that the number of the devices to be selected is larger than the preset number, comparing the serial numbers of all the devices to be selected, and selecting the device to be selected with the minimum/maximum serial number as the main device.
If the number of the devices to be selected is greater than 1, it indicates that there are at least two devices corresponding to the maximum signal strength, and at this time, the devices may be selected according to the serial numbers of the devices, for example, the device to be selected with the minimum/maximum serial number is selected as the master device; or the selection may be performed in other manners, for example, the selection is performed according to the distance between the device to be selected and the server, and the device to be selected closest to the server is selected as the master device.
Step 514: and in response to the number of the devices to be selected being less than or equal to the preset number, taking the devices to be selected as the main devices.
If the number of the devices to be selected is equal to 1, only one device with the maximum signal strength is indicated, and the devices to be selected are directly used as the main devices at the moment.
In other specific embodiments, the preset election condition further includes that the server sends a designation instruction, where the designation instruction is used to designate the master device, that is, the server designates which device of all devices is the master device, and after the master device receives the designation instruction, the master device sends the designation instruction to all slave devices to notify the slave devices to modify their own flag bits to the second preset identification value.
Step 52: the master device subscribes to the data update event from the server so that the server pushes the data update notification to the master device.
The main equipment can subscribe a data updating event to the server so that the main equipment can timely acquire a message needing data updating; the master device may download the data to be updated from the server according to the data update notification sent by the server.
It will be appreciated that after the primary device is elected, the primary device election operation may be exited; in addition, a time interval can be set to detect whether the preset election condition is met or not at a fixed time interval, so that the preset election condition is prevented from being frequently triggered, and the working efficiency of the equipment is prevented from being influenced.
Step 53: and downloading the data to be updated from the server by using the main device through a 5G communication technology.
Step 53 is similar to step 32 in the above embodiment, and is not described herein again.
Step 54: and the master equipment judges whether the data to be updated is complete.
After the master device obtains the data to be updated through the 5G communication technology, the master device may determine whether the downloaded data to be updated is complete by using a data integrity determination method.
Step 55: in response to the data to be updated being complete, the master device synchronizes the data to be updated to the slave device through the D2D communication technology, and the slave device synchronizes the data to be updated to other slave devices that do not receive the data to be updated.
If the integrity verification result of the data to be updated is complete, the master device can send the downloaded data to be updated to the slave device; if the integrity verification result of the data to be updated is incomplete, the downloaded data is incomplete, and the data can be downloaded again at the moment.
Further, the master device may also verify the identity of the slave devices, such as: the master device can judge whether the type of the slave device is the same as the type of the master device, and if the identity of the slave device meets the set requirement, the data to be updated is synchronized to the slave device; the slave device connects with other slave devices by using the D2D communication technology, checks the identities of the other slave devices, and synchronizes the data to be updated to the rest slave devices when the check is passed.
When a program and a database of the equipment need to be updated, the data to be updated are uploaded to the server, and then the server notifies the main equipment subscribed with the data updating event; after receiving a data updating notification pushed by a server, the main device downloads data to be updated from the server through a 5G communication technology; then, synchronizing the data needing to be updated to the slave device by using the D2D communication technology of the 5G network; only 1 part of data to be updated in the whole system is obtained from the server through the 5G network, and other data to be updated are synchronously completed by utilizing the 5G D2D communication technology, so that the 5G flow charge and the pressure of the server can be reduced.
Referring to fig. 10, fig. 10 is a schematic structural diagram of an embodiment of a computer-readable storage medium 100 provided in the present application, where the computer-readable storage medium 100 is used for storing a computer program 101, and the computer program 101 is used for implementing the data updating method in the foregoing embodiment when being executed by a processor.
The computer-readable storage medium 100 may be a server, a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various media capable of storing program codes.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of modules or units is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings, or which are directly or indirectly applied to other related technical fields, are intended to be included within the scope of the present application.

Claims (12)

1. A data updating method applied to a data updating system, wherein the data updating system comprises a plurality of devices and a server, and comprises:
in response to the preset election condition being met, one device is selected from the multiple devices to serve as a master device, and the other devices serve as slave devices;
downloading data to be updated from the server by using the main device through a first communication technology;
synchronizing the data to be updated to the slave device by the master device through a second communication technique.
2. The data updating method according to claim 1, wherein the step of selecting one device from the plurality of devices as a master device and the other devices as slave devices comprises:
selecting the master device based on the signal strengths of the plurality of devices and the serial numbers of the plurality of devices.
3. The data updating method of claim 2, wherein the step of selecting the master device based on the signal strengths of the plurality of devices and the serial numbers of the plurality of devices comprises:
calculating the maximum value in the signal intensities of the plurality of devices, recording the device corresponding to the maximum signal intensity as a device to be selected, and counting the number of the devices to be selected;
judging whether the number of the devices to be selected is larger than a preset number or not;
responding to the fact that the number of the devices to be selected is larger than the preset number, comparing the serial numbers of all the devices to be selected, and selecting the devices to be selected with the minimum/maximum serial numbers as the main devices;
and in response to the fact that the number of the devices to be selected is smaller than or equal to the preset number, taking the devices to be selected as the main devices.
4. The data update method of claim 3,
the preset election condition comprises that a new device is added into the data updating system, an original main device sends out an exit signal or the absolute difference value between the minimum signal intensity of the device and the maximum signal intensity of the device exceeds a preset difference value threshold value in preset time.
5. The data updating method according to claim 4, wherein the device satisfying the preset election condition is a current device, and devices other than the current device among the plurality of devices are signal receiving devices; the step of calculating the maximum value among the signal strengths of the plurality of devices includes:
the current equipment sends the signal intensity of the current equipment to each signal receiving equipment;
each signal receiving device sends the signal intensity of the signal receiving device to all signal receiving devices which do not receive the signal intensity of the signal receiving device;
the current equipment and all the signal receiving equipment judge whether the signal intensity of the current equipment and all the signal receiving equipment is the maximum value of all the signal intensities;
setting a flag bit of the self to be a first preset identification value in response to the fact that the signal intensity of the self is the maximum value of all the signal intensities;
and setting the flag bit of the self to be a second preset identification value in response to the fact that the signal intensity of the self is not the maximum value of all the signal intensities.
6. The data updating method according to claim 4, wherein the device satisfying the preset election condition is a current device, and devices other than the current device among the plurality of devices are signal transmission devices; the step of calculating the maximum value among the signal strengths of the plurality of devices includes:
the current equipment receives the signal intensity of the current equipment sent by each signal sending equipment;
the current equipment compares the signal intensity of the current equipment with the received signal intensity to obtain the maximum signal intensity;
the method further comprises the following steps:
the current equipment sends election results to all the signal sending equipment;
wherein the election result is used for identifying the master device.
7. The data updating method of claim 1, wherein the preset election condition further includes that the server sends a specific instruction, the specific instruction is used for specifying the master device, and the method further comprises:
after the master device receives the designated instruction, the master device sends the designated instruction to all the slave devices to inform the slave devices to modify the flag bits of the slave devices into second preset identification values.
8. The data updating method of claim 7, wherein the method further comprises:
determining whether the master device already exists;
and in response to the main equipment, the original main equipment modifies the zone bit of the original main equipment so as to modify the zone bit of the original main equipment into the second preset identification value.
9. The data updating method of claim 1, wherein the method further comprises:
the master device subscribes to a data update event from the server, so that the server pushes a data update notification to the master device.
10. The data update method of claim 1, wherein the first communication technology is a 5G communication technology, wherein the second communication technology is a D2D communication technology, and wherein the method further comprises:
after the main device obtains the data to be updated through the 5G communication technology, the main device judges whether the data to be updated is complete;
in response to the data to be updated being complete, the master device synchronizes the data to be updated to the slave device through the D2D communication technology, and the slave device synchronizes the data to be updated to other slave devices that do not receive the data to be updated.
11. A data updating system is characterized by comprising a server and a plurality of devices, wherein the plurality of devices comprise a master device and a slave device, the server is connected with the master device, the master device is connected with at least one slave device, and the server or the devices are used for selecting one device from the plurality of devices as the master device and the other devices as the slave devices when a preset election condition is met; the master device is used for downloading data to be updated from the server through a first communication technology and synchronizing the data to be updated to the slave device through a second communication technology.
12. A computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, is adapted to implement the data updating method of any of claims 1-10.
CN202110063249.7A 2021-01-18 2021-01-18 Data updating method, device and computer readable storage medium Active CN112968921B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110063249.7A CN112968921B (en) 2021-01-18 2021-01-18 Data updating method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110063249.7A CN112968921B (en) 2021-01-18 2021-01-18 Data updating method, device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112968921A true CN112968921A (en) 2021-06-15
CN112968921B CN112968921B (en) 2023-05-16

Family

ID=76271542

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110063249.7A Active CN112968921B (en) 2021-01-18 2021-01-18 Data updating method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112968921B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113672604A (en) * 2021-08-16 2021-11-19 浙江大华技术股份有限公司 User data synchronization method, device and system and electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3076194A1 (en) * 2015-03-31 2016-10-05 ABB Technology AG Method and system for coherent aggregation and synchronization of gathered data from spread devices
CN106407385A (en) * 2016-09-14 2017-02-15 北京百度网讯科技有限公司 Data management method and system, and equipment
CN107438092A (en) * 2016-03-10 2017-12-05 阿里巴巴集团控股有限公司 Method and apparatus for data processing in distributed scene
CN109874135A (en) * 2019-02-13 2019-06-11 广州鹰云电子科技有限公司 Bluetooth electronic price tag and its data-updating method
CN110383236A (en) * 2017-02-15 2019-10-25 亚马逊技术股份有限公司 Master device is selected to realize isochronous audio
CN209642685U (en) * 2019-05-31 2019-11-15 深圳市灰度软件有限公司 A kind of content update system
CN111417070A (en) * 2020-03-27 2020-07-14 上海银基信息安全技术股份有限公司 Positioning method, main positioning node, single positioning node and computer equipment
CN112003943A (en) * 2020-08-25 2020-11-27 苏州思必驰信息科技有限公司 Voice data synchronization method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3076194A1 (en) * 2015-03-31 2016-10-05 ABB Technology AG Method and system for coherent aggregation and synchronization of gathered data from spread devices
CN107438092A (en) * 2016-03-10 2017-12-05 阿里巴巴集团控股有限公司 Method and apparatus for data processing in distributed scene
CN106407385A (en) * 2016-09-14 2017-02-15 北京百度网讯科技有限公司 Data management method and system, and equipment
CN110383236A (en) * 2017-02-15 2019-10-25 亚马逊技术股份有限公司 Master device is selected to realize isochronous audio
CN109874135A (en) * 2019-02-13 2019-06-11 广州鹰云电子科技有限公司 Bluetooth electronic price tag and its data-updating method
CN209642685U (en) * 2019-05-31 2019-11-15 深圳市灰度软件有限公司 A kind of content update system
CN111417070A (en) * 2020-03-27 2020-07-14 上海银基信息安全技术股份有限公司 Positioning method, main positioning node, single positioning node and computer equipment
CN112003943A (en) * 2020-08-25 2020-11-27 苏州思必驰信息科技有限公司 Voice data synchronization method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113672604A (en) * 2021-08-16 2021-11-19 浙江大华技术股份有限公司 User data synchronization method, device and system and electronic equipment

Also Published As

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

Similar Documents

Publication Publication Date Title
CN107276765B (en) Processing method and device for consensus in block chain
CN102377686B (en) Message subscription system, method and device
EP3114796B1 (en) Report-based control of repeated multicast data transmission
CN104080170A (en) Transmission method of D2D (Device to Device) response message and equipment
CN105228111A (en) resource subscription processing method and device
CN111654348B (en) Internet of things data transmission method and device, computer equipment and storage medium
WO2016173280A1 (en) Monitoring management method and apparatus
CN105577561A (en) Method and system for realizing load balancing between virtualized network elements, and virtualized network element
CN111541762B (en) Data processing method, management server, device and storage medium
CN112968921B (en) Data updating method, device and computer readable storage medium
CN114363034B (en) Verification code generation and verification method and device, electronic equipment and storage medium
CN105323743A (en) Method and device for subscribing to resource change notices
CN113014672B (en) Message pushing method and device, electronic equipment and storage medium
CN115002238A (en) Traffic transmission method, device, equipment and storage medium
CN105871963A (en) Processing method and device of resource operation requesting
CN108156086B (en) Policy rule issuing method and device
US20160088076A1 (en) Method, device and system for obtaining mobile network data resources
CN112437146B (en) Equipment state synchronization method, device and system
CN111416760B (en) Information synchronization method, terminal and information synchronization system
CN114884805A (en) Data transmission method, device, terminal and storage medium
CN106230878A (en) A kind of equipment service calling method based on AllJoyn framework and device
CN105119814A (en) Information-processing method and terminal
CN112995095A (en) Data processing method, device and computer readable storage medium
CN117036038B (en) Transaction processing method, device, equipment and storage medium based on alliance chain
CN112600738B (en) Method and device for verifying connectivity of network port

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant