Data management method, electronic equipment, cloud and storage medium
By directly sending device data between electronic devices and the cloud, forming a shadow of device data, it solves the cumbersome acquisition and network stability problems in IoT device data management, and achieves efficient unified management and rapid response.
Patent Information
- Application Number
- CN202411142570.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2025-01-17
AI Technical Summary
In the prior art, data management of IoT devices is carried out through edge gateways, and there are problems such as cumbersome data acquisition, large impact on network stability, slow response speed, network congestion and delay. The edge gateway wiring is inconvenient and difficult to manage in a unified manner.
By directly sending device data between electronic devices and the cloud, the device data body and shadow are formed, and data updates are used to reduce unnecessary traffic consumption, improve efficiency and response speed, and realize unified management of the docking system.
It simplifies the data acquisition process, reduces the impact of network stability, improves response speed and concurrency, and simplifies the unified management of IoT devices.
Smart Images

Figure CN119322781A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of data processing technology, and in particular to a data management method, electronic device, cloud and storage medium. Background Art
[0002] In the prior art, IoT devices are usually connected to edge gateways, which are then connected to the cloud, and the edge gateways are used to manage IoT devices. For example, the edge gateway directly manages the device data (such as system data) stored in the IoT device, or the IoT device uploads the device data (such as business data) to the edge gateway, which is then managed by the edge gateway. The edge gateway sends the device data (including system data and business data) to the cloud in real time so that the cloud can complete the data update; after receiving the background data from the cloud, the edge gateway controls the IoT device to complete the data update.
[0003] However, the above-mentioned edge gateway management scheme for IoT devices has at least the following problems: 1. The upper system indirectly obtains the device data of the IoT device through the edge gateway, which is cumbersome and inefficient, easily affected by network stability, and has a slow response speed; if the network is unstable, it is impossible to accurately determine the location of the fault; 2. The edge gateway processes data from multiple different IoT devices, which may easily exceed the bandwidth limit of the edge gateway due to excessive data traffic, causing network congestion and delays; 3. Due to the use of a large number of edge gateways, when the edge gateways are actually deployed, it is easy to cause problems such as inconvenient wiring and scattered distribution of the edge gateways, which makes it inconvenient to uniformly manage IoT devices. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a data management method, an electronic device, a cloud and a storage medium, which facilitates unified management of electronic devices, simplifies the acquisition process, improves efficiency, reduces the impact of network stability, improves response speed, and increases concurrency.
[0005] To solve the above technical problems, the embodiments of the present invention provide the following technical solutions:
[0006] In a first aspect, an embodiment of the present invention provides a data management method for an electronic device, wherein the electronic device includes device data, and the method includes:
[0007] forming a device data body based on the device data, wherein the device data body is device data stored in the electronic device and associated with the electronic device;
[0008] The device data is sent to the cloud, so that the cloud forms a device data shadow based on the device data after receiving the device data, wherein the device data shadow is the device data stored in the cloud and associated with the electronic device.
[0009] In some embodiments, the method further comprises:
[0010] generating a device ontology summary based on the device data ontology;
[0011] receiving background data sent by the cloud, forming a background data shadow based on the background data, and generating a background shadow summary based on the background data shadow, wherein the background data shadow is background data stored in the electronic device and associated with the electronic device;
[0012] Sending the device body digest and the background shadow digest to the cloud, so that the cloud determines to update the data based on the device body digest and the device shadow digest, and based on the background shadow digest and the background body digest after receiving the device body digest and the background shadow digest;
[0013] The device shadow summary is summary data generated by the cloud based on the device data shadow formed by the device data, and the background body summary is summary data generated by the cloud based on the background data body formed by the background data.
[0014] In some embodiments, the method further comprises:
[0015] In response to receiving a device data update instruction sent by the cloud, updated device data of the electronic device is sent to the cloud, so that the cloud updates the device data shadow based on the updated device data after receiving the updated device data, and updates the device shadow digest based on the updated device data shadow, wherein the device data update instruction is sent to the electronic device when the cloud compares and determines that the device body digest and the device shadow digest are different.
[0016] In some embodiments, the method further comprises:
[0017] In response to the received background data update instruction sent by the cloud, the updated background data of the electronic device is obtained from the cloud, and the current background data of the electronic device is updated, wherein the background data update instruction is sent to the electronic device when the cloud compares and determines that the background shadow summary and the background body summary are different.
[0018] In some embodiments, the obtaining of the updated background data of the electronic device and updating the current background data of the electronic device includes:
[0019] Sending a background data update request instruction to the cloud, so that the cloud sends the updated background data of the electronic device to the electronic device after receiving the background data update request instruction;
[0020] Receive the updated background data sent by the cloud, update the background data shadow based on the updated background data, and update the background shadow summary based on the updated background data shadow.
[0021] In some embodiments, the background data of the electronic device includes an identification code of resource data, and the method further includes:
[0022] Acquiring updated resource data of the electronic device based on current background data of the electronic device and an identification code of resource data in the updated background data to update the current resource data of the electronic device, including:
[0023] Respectively acquiring a first identification code set of resource data in current background data of the electronic device and a second identification code set of resource data in updated background data of the electronic device;
[0024] Obtaining an intersection of the first identification code set and the second identification code set;
[0025] Obtain a first difference set between the first identification code set and the intersection set, and obtain a second difference set between the second identification code set and the intersection set;
[0026] Deleting resource data corresponding to the identification code in the first difference set from current resource data of the electronic device, and acquiring resource data corresponding to the identification code in the second difference set from the cloud;
[0027] The resource data corresponding to the identification code in the intersection set and the resource data corresponding to the identification code in the second difference set are used to form updated resource data of the electronic device, so as to complete the updating of current resource data of the electronic device.
[0028] In a second aspect, an embodiment of the present invention provides a data management method for use in a cloud, the method comprising:
[0029] Device data sent by an electronic device is received, and a device data shadow is formed based on the device data, wherein the device data shadow is device data stored in the cloud and associated with the electronic device.
[0030] In some embodiments, the cloud includes background data of the electronic device, and the method further includes:
[0031] generating a device shadow summary based on the device data shadow;
[0032] forming a background data ontology based on the background data, and generating a background ontology summary based on the background data ontology, wherein the background data ontology is background data stored in the cloud and associated with the electronic device;
[0033] Sending the background data to the electronic device, so that after receiving the background data, the electronic device forms a background data shadow based on the background data, and generates a background shadow summary based on the background data shadow;
[0034] Receiving a device body digest and a background shadow digest sent by the electronic device, and updating data based on the device body digest and the device shadow digest, and based on the background shadow digest and the background body digest;
[0035] The background shadow summary is summary data generated by the electronic device based on the background data shadow formed by the background data, and the device body summary is summary data generated by the electronic device based on the device data body formed by the device data.
[0036] In some embodiments, the updating of data based on the device entity summary and the device shadow summary, and based on the background shadow summary and the background entity summary, includes:
[0037] Comparing the device body digest with the device shadow digest, and if the device body digest and the device shadow digest are different, sending a device data update instruction to the electronic device, so that the electronic device sends the updated device data of the electronic device to the cloud after receiving the device data update instruction;
[0038] Receive updated device data sent by the electronic device, update the device data shadow based on the updated device data, and update the device shadow summary based on the updated device data shadow.
[0039] In some embodiments, the updating of data based on the device entity digest and the device shadow digest, and based on the background shadow digest and the background entity digest, further includes:
[0040] Comparing the background shadow digest with the background entity digest, and if the background shadow digest and the background entity digest are different, sending a background data update instruction to the electronic device;
[0041] In response to a background data update request instruction received from the electronic device, the background data update of the electronic device is sent to the electronic device, so that after receiving the background data update, the electronic device updates the background data shadow based on the background data update, and updates the background shadow summary based on the updated background data shadow.
[0042] In a third aspect, an embodiment of the present invention provides an electronic device, including:
[0043] A processor, and a memory communicatively connected to the processor;
[0044] The memory stores computer program instructions executable by the processor, and when the computer program instructions are called by the processor, the processor executes any one of the data management methods proposed in the first aspect, or steps in any one of the possible implementations of any one of the data management methods proposed in the first aspect.
[0045] In a fourth aspect, an embodiment of the present invention provides a cloud, including:
[0046] A processor, and a memory communicatively connected to the processor;
[0047] The memory stores computer program instructions executable by the processor, and when the computer program instructions are called by the processor, the processor executes any one of the data management methods proposed in the second aspect, or steps in any one of the possible implementations of any one of the data management methods proposed in the second aspect.
[0048] In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which is stored computer program instructions executable by a processor, and when the computer program instructions are called by the processor, the processor executes any one of the data management methods proposed in the first aspect, or executes any one of the data management methods proposed in the second aspect.
[0049] Beneficial effects of the embodiments of the present invention: Different from the prior art, the data management method provided by the embodiments of the present invention is used for an electronic device, and the electronic device includes device data. The method includes: forming a device data body based on the device data, and the device data body is device data stored in the electronic device and associated with the electronic device; sending the device data to the cloud, so that the cloud forms a device data shadow based on the device data after receiving the device data, and the device data shadow is device data stored in the cloud and associated with the electronic device.
[0050] In the data management method provided by the embodiment of the present invention, the electronic device directly sends the device data to the cloud, and forms a device data shadow in the cloud, so that the docking system does not need to obtain the device data through other devices, but can directly obtain the device data shadow stored in the cloud. This facilitates the unified management of electronic devices, simplifies the acquisition process, improves efficiency, reduces the impact on network stability, improves response speed, and increases concurrency. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope of protection. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0052] Figure 1 is a schematic diagram of an application scenario of a data management method provided by some embodiments of the present invention;
[0053] Figure 2 is a schematic diagram of the structure of an electronic device provided by some embodiments of the present invention;
[0054] Figure 3 is a schematic diagram of a cloud structure provided by some embodiments of the present invention;
[0055] Figure 4 is a flowchart of a data management method provided by some embodiments of the present invention;
[0056] Figure 5 is a flowchart of a data management method provided by other embodiments of the present invention;
[0057] Figure 6 It is a schematic diagram of data generation and summary comparison in the data management method provided in some embodiments of the present invention.
[0058] Figure 7 It is a logical timing diagram of the data management method provided by some embodiments of the present invention. DETAILED DESCRIPTION
[0059] In order to make the purpose and advantages of the embodiments of the present invention easier to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. The detailed description of the embodiments of the present invention in the drawings below does not limit the scope of protection claimed by the present invention, but only represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0060] It should be noted that, if no conflict is constituted, the various technical features involved in the embodiments of the present invention described below can be combined with each other, and are all within the scope of protection of the present invention. In addition, although the functional modules are divided in the device or structural schematic diagram, and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order from the module division in the device, or in a different order from the flow chart. In addition, the "first", "second", "third" and other similar expressions used herein do not limit the data and execution order, but are only for the purpose of convenience of explanation and to distinguish between the same or similar items with basically the same functions and effects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features.
[0061] Unless otherwise defined, the technical terms and scientific terms used in this specification have the same meanings as those generally understood by those of ordinary skill in the art of the present invention. The terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. It should be understood that the term "and / or" used in this specification includes any and all combinations of one or more of the related listed items.
[0062] See also Figure 1 , Figure 1 Schematic diagram of application scenarios of the data management method provided for some embodiments of the present invention. In this application scenario, an electronic device 10, a cloud 20 and a docking system 30 are included. The cloud 20 is respectively connected to the electronic device 10 and the docking system 30 through a communication network, and data can be exchanged between the cloud 20 and the electronic device 10, and between the cloud 20 and the docking system 30. For example, the electronic device 10 sends the device data associated with the electronic device 10 to the cloud 20, or the cloud 20 sends the background data associated with the electronic device 10 to the electronic device 10, or the cloud 20 sends the device data associated with the electronic device 10 to the docking system 30, etc. It should be understood that the above-mentioned communication network includes but is not limited to the Internet, a local area network, an intranet, a mobile communication network, a wireless network and a combination thereof.
[0063] Specifically, after receiving the device data associated with the electronic device 10, the cloud 20 forms a device data shadow based on the device data and stores it in the cloud 20; thus, the docking system 30 does not need to obtain the device data associated with the electronic device 10 through the gateway device, but only needs to read the device data shadow stored in the cloud 20.
[0064] In some embodiments, the electronic device 10 forms a device data body according to the device data, and generates a device body summary according to the device data body. After receiving the device data associated with the electronic device 10, the cloud 20 forms a device data shadow with the device data, and then generates a device shadow summary according to the device data shadow. The cloud 20 also generates background data associated with the electronic device 10 according to the device data, sends the background data to the electronic device 10, and forms the background data into a background data body, and then generates a background body summary according to the background data body. After receiving the background data associated with the electronic device 10, the electronic device 10 is initialized according to the background data, and then forms the background data into a background data shadow, and stores it in the electronic device 10, and generates a background shadow summary according to the background data shadow.
[0065] Among them, the electronic device 10 sends the device body summary and the background shadow summary to the cloud 20 in a polling manner. The cloud 20 receives the device body summary and the background shadow summary, and compares the device body summary with the device shadow summary, and compares the background shadow summary with the background body summary, to determine whether the device data and / or background data have changed. After determining that the device data and / or background data have changed by comparing the summaries, the device data and / or background data are updated. This avoids unnecessary traffic consumption caused by the electronic device 10 sending device data and / or background data in a polling manner when the device data and / or background data have not changed, which can save traffic and reduce traffic waste.
[0066] It can be understood that when the device data associated with the electronic device 10 changes, the electronic device 10 updates the device data, updates the device body summary according to the updated device data, and sends the updated device data to the cloud 20. When the background data associated with the electronic device 10 changes, the cloud 20 updates the background data, updates the background body summary according to the updated background data, and sends the updated background data to the electronic device 10. The cloud 20 receives the updated device data and updates the device shadow summary according to the updated device data. The electronic device 10 receives the updated background data and updates the background shadow summary according to the updated background data.
[0067] Those skilled in the art will understand that Figure 1The application scenario shown in the embodiment only schematically illustrates a situation in which data is exchanged between the electronic device 10, the cloud 20 and the docking system 30, and does not impose any limitation on any situation in which data is exchanged between the electronic device 10, the cloud 20 and the docking system 30 in other application scenarios. Figure 1 The illustrated embodiment does not impose any limitation on the structure, type, composition, data interaction method, etc. of the electronic device 10 , the cloud 20 , and the docking system 30 .
[0068] It is worth noting that the electronic device 10 can be any one or more of smart home devices, smart wearable devices, smart vehicle-mounted devices, user equipment (UE), storage devices, audio devices, audio playback devices, mobile devices, terminal devices, handheld devices, computing devices, personal digital assistants (PDA), industrial Internet of Things devices, and the like.
[0069] The cloud 20 can be any one or more of cloud servers, cloud storage devices, cloud databases, cloud network devices, cloud security devices, cloud monitoring devices, cloud management devices, cloud IoT platforms, cloud computing devices, etc. The cloud 20 is used to provide a management backend, is responsible for directly communicating with the electronic device 10, and is connected to the docking system.
[0070] It should be understood that the execution subject of any data management method provided in the embodiments of the present invention may be any one or more suitable types of electronic devices 10 and cloud 20 having certain computing and control capabilities as described above. In some possible implementations, any data management method provided in the embodiments of the present invention may be implemented by a processor calling computer program instructions stored in a memory.
[0071] To facilitate understanding of the data management method provided by the embodiment of the present invention, the electronic device and the cloud provided by the embodiment of the present invention are introduced in detail below.
[0072] See also Figure 2 As shown, Figure 2 The electronic device 10 is a schematic diagram of a structure of an electronic device 10 provided in some embodiments of the present invention. The electronic device 10 includes at least one processor 11 and a memory 12 ( Figure 2 In the example of a bus system connection and a processor, the components in the electronic device 10 are coupled together through the bus system 13, and the bus system 13 is used to realize the connection and communication between these components. It is easy to understand that the bus system 13 includes not only a data bus, but also a power bus, a control bus, and a status signal bus. However, for the sake of clarity and brevity, the following description is omitted. Figure 2In the figure, various buses are labeled as bus system 13. It can be understood that Figure 2 The structure shown in the embodiment is only for illustration and does not impose any limitation on the structure of the electronic device 10. For example, the electronic device 10 may also include Figure 2 More or fewer components as shown, or with Figure 2 Different configurations are shown.
[0073] Specifically, the processor 11 is used to provide computing and control capabilities to control the electronic device 10 to perform corresponding tasks. For example, the electronic device 10 is controlled to perform any one of the data management methods provided in the embodiments of the present invention, or any one of the steps in any possible implementation of any one of the data management methods provided in the embodiments of the present invention. Those skilled in the art will appreciate that the processor 11 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0074] The memory 12, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs and modules, for example, program instructions / modules corresponding to the data management method in the embodiment of the present invention. In some embodiments, the memory 12 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the processor 11, etc. The processor 11 executes various functional applications and data processing of the electronic device 10 by running the non-transitory software programs, instructions and modules stored in the memory 12, so as to implement any data management method provided in the embodiment of the present invention, or any step in any possible implementation of any data management method provided in the embodiment of the present invention. Among them, the memory 12 may include a high-speed random access memory, and may also include a non-transitory memory. For example, at least one disk storage device, a flash memory device or other non-transitory solid-state storage device. In some embodiments, the memory 12 may also include a memory remotely arranged relative to the processor 11, and these remote memories may be connected to the processor 11 via a communication network. It will be understood by those skilled in the art that examples of the above-mentioned communication networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.
[0075] See also Figure 3 As shown, Figure 3 FIG. 2 shows a schematic diagram of the structure of a cloud 20 provided in some embodiments of the present invention. The cloud 20 includes at least one processor 21 and a memory 22 ( Figure 3 In the example of a bus system connection and a processor, the various components in the cloud 20 are coupled together through the bus system 23, and the bus system 23 is used to realize the connection and communication between these components. It can be understood by those skilled in the art that the bus system 23 includes not only a data bus, but also a power bus, a control bus, and a status signal bus. However, for the sake of clarity and brevity, Figure 3 In the figure, various buses are labeled as bus system 23. It should be understood that Figure 3 The structure shown in the embodiment is only for illustration and does not impose any limitation on the structure of the cloud 20. For example, the cloud 20 may also include Figure 3 More or fewer components as shown, or with Figure 3 Different configurations are shown.
[0076] Specifically, the processor 21 is used to provide computing and control capabilities to control the cloud 20 to perform corresponding tasks. For example, the cloud 20 is controlled to perform any one of the data management methods provided in the embodiments of the present invention, or any one of the steps in any possible implementation of any one of the data management methods provided in the embodiments of the present invention. Those skilled in the art will understand that the processor 21 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0077] The memory 22, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the data management method in the embodiment of the present invention. In some embodiments, the memory 22 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to the use of the processor 21, etc. The processor 21 executes various functional applications and data processing of the cloud 20 by running the non-transitory software programs, instructions and modules stored in the memory 22, so as to implement any data management method provided in the embodiment of the present invention, or any step in any possible implementation of any data management method provided in the embodiment of the present invention. Among them, the memory 22 may include a high-speed random access memory, and may also include a non-transitory memory. For example, at least one disk storage device, a flash memory device or other non-transitory solid-state storage device. In some embodiments, the memory 22 may also include a memory remotely arranged relative to the processor 21, and these remote memories may be connected to the processor 21 via a communication network. It should be understood that examples of the above-mentioned communication network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.
[0078] It can be understood from the above that any data management method provided in the embodiments of the present invention can be implemented by various suitable types of electronic devices and clouds with certain computing and control capabilities, for example, it can be implemented by the above-mentioned electronic device 10 and cloud 20. The data management method provided in the embodiments of the present invention is described in detail below in conjunction with exemplary applications and implementations of the electronic devices and cloud provided in the embodiments of the present invention.
[0079] The following describes in detail a data management method applied to an electronic device provided by an embodiment of the present invention.
[0080] See also Figure 4 As shown, Figure 4 The flowchart of the data management method provided by some embodiments of the present invention is shown. It is easy to understand that the data management method provided by the embodiment of the present invention can be applied to the above electronic device, and the data management method includes but is not limited to the following steps S100-S200:
[0081] S100: forming a device data body based on device data, wherein the device data body is device data stored in and associated with the electronic device.
[0082] See also Figure 6 , Figure 6 A schematic diagram of data generation and summary comparison in a data management method provided by some embodiments of the present invention is shown. Specifically, an electronic device includes device data associated with itself. During the initialization process of the electronic device, the device data is sorted and cleaned according to preset coding rules and coding sequences to obtain a device data body with a standardized data format and structure, and the device data body is stored in the electronic device. It can be understood that the device data body is device data stored in the electronic device and associated with the electronic device. Among them, the device data includes the unique identity identification, location information, hardware specifications, software configuration, network configuration and other related data of the electronic device. It can be understood that the device data body has the ability to be updated in real time, and can be dynamically updated as the device data of the electronic device in the electronic device changes, ensuring that the device data body can timely and accurately reflect the changes in the device data of the electronic device.
[0083] S200: Sending device data to the cloud, so that the cloud forms a device data shadow based on the device data after receiving the device data, wherein the device data shadow is device data stored in the cloud and associated with the electronic device.
[0084] See also Figure 6 , Figure 6A schematic diagram of data generation and summary comparison in a data management method provided by some embodiments of the present invention is shown. Specifically, during the initialization process of the electronic device, the device data is safely and efficiently sent to the cloud through a suitable transmission protocol (such as Hyper Text Transfer Protocol (HTTP)) and technology, so that after receiving the device data, the cloud forms a device data shadow according to the device data, and stores the device data shadow in the cloud. In some embodiments, the endpoint for receiving device data in the cloud can be pre-set, and a corresponding storage module can be set in the cloud to effectively store the device data shadow. Among them, the storage module can be a database, a distributed storage system or other suitable data storage scheme. It can be understood that the device data shadow is device data stored in the cloud and associated with the electronic device. It is easy to understand that the device data shadow and the device data body include the same device data associated with the electronic device, the only difference is that the device data shadow is stored in the cloud and the device data body is stored in the electronic device. By forming the device data shadow in the cloud, the docking system does not need to indirectly obtain the device data through other devices (such as gateway devices), and can directly obtain the device data shadow stored in the cloud. This makes it easier to uniformly manage electronic devices, simplify the acquisition process, improve efficiency, reduce the impact on network stability, increase response speed, and increase concurrency.
[0085] A data management method provided by an embodiment of the present invention is used for an electronic device, wherein the electronic device includes device data, and the method includes: forming a device data body based on the device data, wherein the device data body is device data stored in the electronic device and associated with the electronic device; sending the device data to the cloud, so that the cloud forms a device data shadow based on the device data after receiving the device data, wherein the device data shadow is device data stored in the cloud and associated with the electronic device.
[0086] In the data management method provided by the embodiment of the present invention, the electronic device directly sends the device data to the cloud, and forms a device data shadow in the cloud, so that the docking system does not need to obtain the device data through the gateway device, and can directly obtain the device data shadow stored in the cloud. This facilitates the unified management of electronic devices, simplifies the acquisition process, improves efficiency, reduces the impact on network stability, improves response speed, and increases concurrency.
[0087] In some embodiments, in order to avoid unnecessary traffic consumption and reduce traffic waste, the electronic device generates a device body summary based on the device data body; after receiving the background data sent by the cloud, forming a background data shadow based on the background data, and generating a background shadow summary based on the background data shadow, the device body summary and the background shadow summary are sent to the cloud, so that after receiving the device body summary and the background shadow summary, the cloud determines whether the device data and / or background data have changed based on the device body summary and the device shadow summary, and based on the background shadow summary and the background body summary. After determining that the device data and / or background data have changed, the device data and / or background data are updated.
[0088] Specifically, the data management method also includes but is not limited to the following steps S302-S306:
[0089] S302: Generate a device ontology summary based on the device data ontology.
[0090] See also Figure 6 , Figure 6 A schematic diagram of data generation and summary comparison in a data management method provided by some embodiments of the present invention is shown. Exemplarily, after forming a device data body, the electronic device sorts the device data body according to specific rules, uses a corresponding summary algorithm to extract key information from the device data body, refines and abstracts the device data body, and uses key target data to effectively represent the core information and features of the device data body, and then generates a device body summary in a standardized data format and structure. Among them, the device body summary is summary data generated by the electronic device based on the device data body, and the device body summary has a fixed length and unique data, and has a unique identification identifier. It can be understood that the device body summary has the ability to be updated in real time, and can be dynamically updated as the device data body changes, ensuring that the device body summary can timely and accurately reflect changes in the device data of the electronic device.
[0091] S304: receiving background data sent from the cloud, forming a background data shadow based on the background data, and generating a background shadow summary based on the background data shadow, wherein the background data shadow is background data stored in the electronic device and associated with the electronic device.
[0092] See also Figure 6 , Figure 6A schematic diagram of data generation and summary comparison in a data management method provided by some embodiments of the present invention is shown. Specifically, during the initialization process of the electronic device, after sending the device data to the cloud, the cloud generates background data associated with the electronic device based on the device data, and then sends the background data to the electronic device safely and efficiently through a suitable transmission protocol and technology. The electronic device receives the background data sent by the cloud, and after receiving the background data, it organizes and cleans the received background data according to the preset coding rules and coding sequence, obtains a background data shadow of a standardized data format and structure, and stores the background data shadow in the electronic device. It can be understood that the background data shadow is the background data stored in the electronic device and associated with the electronic device. It should be understood that the background data shadow has the ability to update in real time, and can be dynamically updated as the background data of the electronic device in the cloud changes, ensuring that the background data shadow can timely and accurately reflect the changes in the background data of the electronic device.
[0093] Among them, the background data includes identification codes of resource data such as pictures, audio and video associated with the electronic device (such as guidance audio, advertising video, carousel pictures, etc.), control data such as volume, brightness and time of the electronic device (such as 50% volume, 70% screen brightness, 10s display time, etc.), configuration information data, and other related data.
[0094] After the background data shadow is formed, the background data shadow is sorted according to specific rules, and the corresponding summary algorithm is used to extract key information from the background data shadow, refine and abstract the background data shadow, and use the key target data to effectively represent the core information and features of the background data shadow, and then generate a background shadow summary with a standardized data format and structure. Among them, the background shadow summary is the summary data generated by the electronic device based on the background data shadow. The background shadow summary has a fixed length and unique data, and has a unique identification identifier. It can be understood that the background shadow summary has the ability to be updated in real time, and can be dynamically updated as the background data shadow changes, ensuring that the background shadow summary can timely and accurately reflect the changes in the background data of the electronic device.
[0095] S306: Send the device body summary and the background shadow summary to the cloud, so that after receiving the device body summary and the background shadow summary, the cloud updates the data based on the device body summary and the device shadow summary, and based on the background shadow summary and the background body summary, wherein the device shadow summary is the summary data generated by the cloud based on the device data shadow formed by the device data, and the background body summary is the summary data generated by the cloud based on the background data body formed by the background data.
[0096] See also Figure 6 , Figure 6A schematic diagram of data generation and summary comparison in a data management method provided by some embodiments of the present invention is shown. Exemplarily, after the electronic device generates a device body summary and a background shadow summary, it sends the device body summary and the background shadow summary to the cloud securely and efficiently through a suitable transmission protocol and technology, so that after receiving the device body summary and the background shadow summary, the cloud determines whether to update the device data and / or background data based on the device body summary and the device shadow summary, as well as the background shadow summary and the background body summary. After determining that the device data and / or background data have changed, the device data and / or background data are updated. It can be understood that the device shadow summary is summary data generated by the cloud based on the device data shadow, and the device shadow summary has a fixed length and unique data, and has a unique identification identifier. The background body summary is summary data generated by the cloud based on the background data body formed by the background data, and the background body summary has a fixed length and unique data, and has a unique identification identifier.
[0097] In an embodiment of the present invention, if the cloud determines that there is a difference between the device body summary and the device shadow summary, it means that the device data body stored in the electronic device is different from the device data shadow stored in the cloud, and the device data of the electronic device has changed. The cloud sends a device data update instruction to the electronic device to notify the electronic device to send the updated device data to the cloud. The electronic device sends the updated device data to the cloud, so that the cloud updates the device data shadow according to the updated device data after receiving the updated device data, and updates the device shadow summary according to the updated device data shadow.
[0098] Accordingly, if the cloud determines that there is a difference between the background shadow summary and the background body summary, it means that the background data shadow stored in the electronic device is different from the background data body stored in the cloud, and the background data of the electronic device has changed. The cloud sends a background data update instruction to the electronic device to notify the electronic device to obtain the updated background data and update the current background data of the electronic device. The electronic device receives the updated background data sent by the cloud, and after receiving the updated background data, updates the background data shadow according to the updated background data, and updates the background shadow summary according to the updated background data shadow.
[0099] By sending the device body summary and the background shadow summary to the cloud, the cloud can determine whether the device data and / or background data have changed based on the device body summary and the device shadow summary, as well as the background shadow summary and the background body summary after receiving the device body summary and the background shadow summary. After determining that the device data and / or background data have changed, the device data and / or background data are updated. Thus, unnecessary traffic consumption can be reduced or even avoided, reducing traffic waste.
[0100] In some embodiments, after determining that the device data of the electronic device has changed, the cloud sends a device data update instruction to the electronic device, notifying the electronic device to send the updated device data to the cloud, so that the cloud updates the current device data of the electronic device stored in the cloud.
[0101] Specifically, the data management method further includes but is not limited to the following steps S308:
[0102] S308: In response to receiving a device data update instruction sent by the cloud, send updated device data of the electronic device to the cloud, so that the cloud updates the device data shadow based on the updated device data after receiving the updated device data, and updates the device shadow summary based on the updated device data shadow, wherein the device data update instruction is sent to the electronic device when the cloud compares and determines that the device body summary and the device shadow summary are different.
[0103] Specifically, when the cloud determines that the device body digest and the device shadow digest are different, the cloud sends a device data update instruction to the electronic device to notify the electronic device to send the updated device data to the cloud. The electronic device receives the device data update instruction sent by the cloud, and in response to the received device data update instruction, sends the updated device data of the electronic device to the cloud, so that after receiving the updated device data of the electronic device, the cloud updates the device data shadow according to the updated device data of the electronic device, and updates the device shadow digest according to the updated device data shadow. Obviously, when the cloud determines that the device body digest and the device shadow digest are different after comparison, the cloud sends the device data update instruction to the electronic device.
[0104] Specifically, after the cloud receives the updated device data, it organizes and cleans the received updated device data according to the preset coding rules and coding sequence to obtain an updated device data shadow with a standardized data format and structure, and stores the updated device data shadow in a corresponding storage module in the cloud.
[0105] After completing the update of the device data shadow, the cloud will sort the updated device data shadow according to specific rules, use the corresponding summary algorithm to extract key information from the updated device data shadow, refine and abstract the updated device data shadow, and use key target data to effectively represent the core information and features of the updated device data shadow, and then generate an updated device shadow summary with standardized data format and structure, and store the updated device shadow summary in the corresponding storage module of the cloud.
[0106] In some embodiments, after determining that the background data of the electronic device has changed, the cloud sends a background data update instruction to the electronic device, notifying the electronic device to obtain updated background data from the cloud to update the current background data stored in the electronic device.
[0107] Specifically, the data management method also includes but is not limited to the following steps S310:
[0108] S310: In response to the background data update instruction received from the cloud, the updated background data of the electronic device is obtained from the cloud, and the current background data of the electronic device is updated, wherein the background data update instruction is sent to the electronic device when the cloud compares and determines that the background shadow summary and the background body summary are different.
[0109] Specifically, when the cloud determines that the background body summary and the background shadow summary are different, the cloud sends a background data update instruction to the electronic device, notifying the electronic device to obtain the updated background data of the electronic device from the cloud, and update the current background data of the electronic device. The electronic device receives the background data update instruction sent by the cloud, and in response to the received background data update instruction, obtains the updated background data of the electronic device from the cloud, and updates the current background data of the electronic device. That is, the electronic device updates the background data shadow according to the updated background data, and updates the background shadow summary according to the updated background data shadow. It should be understood that when the cloud determines that the device body summary and the device shadow summary are different after comparison, the cloud sends the background data update instruction to the electronic device.
[0110] In some embodiments, obtaining updated background data of the electronic device and updating the current background data of the electronic device specifically includes but is not limited to the following steps S3101-S3102:
[0111] S3101: Send a background data update request instruction to the cloud, so that the cloud sends the updated background data of the electronic device to the electronic device after receiving the background data update request instruction.
[0112] S3102: Receive updated background data sent by the cloud, update the background data shadow based on the updated background data, and update the background shadow summary based on the updated background data shadow.
[0113] Specifically, the electronic device sends an update background data request instruction to the cloud to request the cloud to send the update background data of the electronic device to the electronic device. That is, after receiving the update background data request instruction, the cloud sends the update background data of the electronic device to the electronic device in response to the received update background data request instruction.
[0114] The cloud sends the updated background data of the electronic device to the electronic device, and the electronic device receives the updated background data sent by the cloud. After receiving the updated background data of the electronic device sent by the cloud, that is, after obtaining the updated background data of the electronic device, the electronic device organizes and cleans the received updated background data according to the preset coding rules and coding sequence, obtains the updated background data shadow with standardized data format and structure, and stores the updated background data shadow in the corresponding storage module of the electronic device.
[0115] After completing the update of the background data shadow, the electronic device sorts the updated background data shadow according to specific rules, uses the corresponding summary algorithm to extract key information from the updated background data shadow, refines and abstracts the updated background data shadow, and uses key target data to effectively represent the core information and features of the updated background data shadow, and then generates an updated background shadow summary in a standardized data format and structure, and stores the updated background shadow summary in the corresponding storage module of the electronic device.
[0116] In some embodiments, the electronic device includes resource data, such as video ads, carousel images, and guidance audio, etc. Each resource data has a corresponding identification code, and the identification code is used to uniquely represent the corresponding resource data. Among them, the background data of the electronic device includes the identification code of the resource data, and the electronic device can download the corresponding resource data from the cloud according to the identification code of the resource data.
[0117] If the identification code of the resource data in the updated background data changes, the electronic device can download the resource data corresponding to the identification code of the resource data from the cloud according to the identification code of the resource data included in the updated background data, thereby obtaining the updated resource data of the electronic device.
[0118] Specifically, the data management method further includes but is not limited to the following steps S312:
[0119] S312: Based on the current background data of the electronic device and the identification code of the resource data in the updated background data, the updated resource data of the electronic device is obtained to update the current resource data of the electronic device.
[0120] Specifically, if the identification code of the resource data in the updated background data of the electronic device changes, it means that the resource data in the electronic device needs to be updated. The electronic device obtains the identification code of the resource data in the current background data and the updated background data of the electronic device, and compares the identification code of the resource data in the current background data with the identification code of the resource data in the updated background data to determine the difference in the identification code of the resource data between the two. Then, according to the difference in the identification code of the resource data in the current background data and the updated background data, the relevant resource data acquisition instruction is sent to the cloud to obtain the updated resource data corresponding to the identification code of the resource data, and update the current resource data of the electronic device.
[0121] In some embodiments, the obtaining of the updated resource data of the electronic device based on the current background data of the electronic device and the identification code of the resource data in the updated background data to update the current resource data of the electronic device specifically includes but is not limited to the following steps S3121-S3125:
[0122] S3121: Acquire a first identification code set of resource data in current background data of the electronic device and a second identification code set of resource data in updated background data of the electronic device respectively.
[0123] S3122: Obtain the intersection of the first identification code set and the second identification code set.
[0124] S3123: Obtain a first difference set between the first identification code set and the intersection set, and obtain a second difference set between the second identification code set and the intersection set.
[0125] Specifically, for the current background data and updated background data of the electronic device, the first identification code of the resource data in the current background data is obtained, and the second identification code of the resource data in the updated background data is obtained. Then the first identification codes of the resource data are combined to form a first identification code set, and the second identification codes of the resource data constitute a second identification code set. For example, the first identification codes of the resource data in the current background data are obtained as: a1, a2, a3, a4, which are combined to form a first identification code set A = {a1, a2, a3, a4}; the second identification codes of the resource data in the updated background data are: a3, a4, a5, a6, which are combined to form a second identification code set B = {a3, a4, a5, a6}. It should be understood that different identification codes of resource data can be set according to actual application conditions, and the embodiments of the present invention do not impose any limitations on this.
[0126] After the first identification code set A and the second identification code set B are formed by combination, the intersection between the first identification code set A and the second identification code set B can be calculated through simple set operations, that is, C=A∩B={a3, a4}.
[0127] After calculating the intersection between the first identification code set and the second identification code set, the first difference set D between the first identification code set A and the intersection set C can be calculated by simple set operations, that is, D=AC={a1, a2}. And the second difference set E between the second identification code set B and the intersection set C can be calculated, that is, E=BC={a5, a6}.
[0128] S3124: Delete the resource data corresponding to the identification code in the first difference set from the current resource data of the electronic device, and obtain the resource data corresponding to the identification code in the second difference set from the cloud.
[0129] S3125: The resource data corresponding to the identification code in the intersection set and the resource data corresponding to the identification code in the second difference set are used to form updated resource data of the electronic device, so as to complete the updating of the current resource data of the electronic device.
[0130] Exemplarily, after determining the first difference set D between the first identification code set A and the intersection C, and determining the second difference set E between the second identification code set B and the intersection C, the current resource data of the electronic device can be updated according to the identification codes of the resource data included in the first difference set D and the second difference set E.
[0131] Specifically, the electronic device deletes the resource data corresponding to the identification code (i.e., a1, a2) of the resource data in the first difference set D from the current resource data of the electronic device based on the identification code of the resource data in the first difference set D, retains the resource data corresponding to the identification code (i.e., a3, a4) of the resource data in the intersection C, and then sends relevant resource data acquisition instructions to the cloud to acquire the resource data corresponding to the identification code (i.e., a5, a6) of the resource data in the second difference set E from the cloud.
[0132] The electronic device then combines the resource data corresponding to the identification code (i.e., a3, a4) of the resource data in the intersection C retained in the current resource data of the electronic device and the resource data corresponding to the identification code (i.e., a5, a6) of the resource data in the obtained second difference set E to form the updated resource data of the electronic device, thereby completing the update of the current resource data of the electronic device.
[0133] In this embodiment, by retaining the resource data corresponding to the identification code that has not changed (i.e., the identification code of the resource data included in both the current background data and the updated background data), deleting the resource data corresponding to the identification code that has changed (i.e., the identification code of the resource data not included in the updated background data), and then obtaining the resource data corresponding to the identification code that has changed (i.e., the identification code of the resource data not included in the current background data) from the cloud, unnecessary process transmission can be reduced and traffic waste can be avoided.
[0134] It can be understood that if the intersection C is an empty set, that is, there is no identification code for the resource data, it means that there is no resource data that needs to be retained; if the first difference set D is an empty set, that is, there is no identification code for the resource data, it means that there is no resource data that needs to be deleted; if the second difference set E is an empty set, that is, there is no identification code for the resource data, it means that there is no resource data that needs to be acquired.
[0135] In summary, the data management method provided by the embodiment of the present invention is used for an electronic device, wherein the electronic device includes device data, and the method includes: forming a device data body based on the device data, wherein the device data body is device data stored in the electronic device and associated with the electronic device; sending the device data to the cloud, so that after receiving the device data, the cloud forms a device data shadow based on the device data, wherein the device data shadow is device data stored in the cloud and associated with the electronic device.
[0136] In the data management method provided by the embodiment of the present invention, the electronic device directly sends the device data to the cloud, and forms a device data shadow in the cloud, so that the docking system does not need to obtain the device data through the gateway device, and can directly obtain the device data shadow stored in the cloud. This facilitates the unified management of electronic devices, simplifies the acquisition process, improves efficiency, reduces the impact on network stability, improves response speed, and increases concurrency.
[0137] The following describes in detail the data management method applied to the cloud in some embodiments of the present invention.
[0138] See also Figure 5 As shown, Figure 5 The flowchart of the data management method provided by some embodiments of the present invention is shown. The data management method provided by the embodiment of the present invention can be applied to the above-mentioned cloud, and the data management method includes but is not limited to the following steps S400:
[0139] S400: receiving device data sent by an electronic device, and forming a device data shadow based on the device data, wherein the device data shadow is device data stored in the cloud and associated with the electronic device.
[0140] See also Figure 6 , Figure 6A schematic diagram of data generation and summary comparison in a data management method provided by some embodiments of the present invention is shown. Specifically, the cloud receives device data sent by an electronic device through a preset endpoint for receiving device data. After receiving the device data, the received device data is sorted and cleaned according to the preset coding rules and coding order to obtain a device data shadow of a standardized data format and structure, and the device data shadow is stored in the corresponding storage module of the cloud to ensure effective storage of the device data shadow. It can be understood that the device data shadow is device data stored in the cloud and associated with the electronic device. Among them, the device data includes the unique identity of the electronic device, location information, hardware specifications, software configuration, network configuration and other related data. It is easy to understand that the device data shadow and the device data body include the same device data associated with the electronic device, the only difference is that the device data shadow is stored in the cloud and the device data body is stored in the electronic device. By forming the device data shadow in the cloud, the docking system does not need to indirectly obtain the device data through other devices (such as gateway devices), and can directly obtain the device data shadow stored in the cloud. Thereby facilitating the unified management of electronic devices, simplifying the acquisition process, improving efficiency, reducing the impact of network stability, improving response speed, and increasing concurrency.
[0141] The data management method provided in the embodiment of the present invention is used in the cloud, and the method includes: receiving device data sent by an electronic device, and forming a device data shadow based on the device data, wherein the device data shadow is device data stored in the cloud and associated with the electronic device. The data management method provided in the embodiment of the present invention directly receives the device data sent by the electronic device in the cloud, and forms a device data shadow in the cloud, so that the docking system does not need to obtain the device data through other devices, and can directly obtain the device data shadow stored in the cloud. Thereby, it is convenient to uniformly manage electronic devices, simplify the acquisition process, improve efficiency, reduce the impact of network stability, improve response speed, and increase concurrency.
[0142] In some embodiments, in order to avoid unnecessary traffic consumption and reduce traffic waste, after receiving the device body summary and background shadow summary sent by the electronic device, the cloud determines whether the device data and / or background data have changed based on the device body summary and device shadow summary, as well as the background shadow summary and background body summary. After determining that the device data and / or background data have changed, the device data and / or background data are updated.
[0143] Specifically, the data management method also includes but is not limited to the following steps S402-S408:
[0144] S402: Generate a device shadow summary based on the device data shadow.
[0145] See also Figure 6 , Figure 6 A schematic diagram of data generation and summary comparison in a data management method provided by some embodiments of the present invention is shown. Exemplarily, after forming a device data shadow, the cloud sorts the device data shadow according to specific rules, uses a corresponding summary algorithm to extract key information from the device data shadow, refines and abstracts the device data shadow, and uses key target data to effectively represent the core information and features of the device data shadow, and then generates a device shadow summary in a standardized data format and structure. Among them, the device shadow summary is summary data generated by the cloud based on the device data shadow, and the device shadow summary has a fixed length and unique data, and has a unique identification identifier. It can be understood that the device shadow summary has the ability to be updated in real time, and can be dynamically updated as the device data shadow changes, ensuring that the device shadow summary can timely and accurately reflect changes in the device data of the electronic device.
[0146] S404: forming a background data ontology based on the background data, and generating a background ontology summary based on the background data ontology, wherein the background data ontology is background data stored in the cloud and associated with the electronic device.
[0147] See also Figure 6 , Figure 6 A schematic diagram of data generation and summary comparison in a data management method provided by some embodiments of the present invention is shown. Specifically, after receiving the device data sent by the electronic device, the cloud generates background data associated with the electronic device according to the device data, and then organizes and cleans the background data according to the preset coding rules and coding sequence to obtain a background data body with a standardized data format and structure, and stores the background data body in a corresponding storage module in the cloud to ensure effective storage of the background data body. It can be understood that the background data body is the background data stored in the cloud and associated with the electronic device.
[0148] Among them, the background data includes the identification codes of resource data such as pictures, audio and video associated with the electronic device (such as guidance audio, advertising video, carousel pictures, etc.), the volume, brightness and time control data of the electronic device (such as 50% volume, 70% screen brightness, 10s display time, etc.), configuration information data, and other related data, etc. It can be understood that the background data body has the ability to be updated in real time, and can be dynamically updated as the background data of the electronic device in the cloud changes, ensuring that the background data body can timely and accurately reflect the changes in the background data of the electronic device.
[0149] After the background data ontology is formed, the background data ontology is sorted according to specific rules, and the corresponding summary algorithm is used to extract key information from the background data ontology, refine and abstract the background data ontology, and use key target data to effectively represent the core information and features of the background data ontology, and then generate a background ontology summary with standardized data format and structure. Among them, the background ontology summary is the summary data generated by the cloud based on the background data ontology. The background ontology summary has a fixed length and unique data, and has a unique identification. It can be understood that the background ontology summary has the ability to be updated in real time, and can be dynamically updated as the background data ontology changes, ensuring that the background ontology summary can timely and accurately reflect the changes in the background data of the electronic device.
[0150] S406: Sending background data to the electronic device, so that after receiving the background data, the electronic device forms a background data shadow based on the background data, and generates a background shadow summary based on the background data shadow.
[0151] See also Figure 6 , Figure 6 A schematic diagram of data generation and summary comparison in a data management method provided by some embodiments of the present invention is shown. Specifically, the cloud sends background data to an electronic device safely and efficiently through a suitable transmission protocol and technology, so that after receiving the background data, the electronic device forms a background data shadow according to the background data, and generates a background shadow summary according to the background data shadow, and stores the background data shadow and the background shadow summary in the electronic device. In some embodiments, an endpoint for receiving background data in an electronic device can be pre-set, and a corresponding storage module can be set in the electronic device to effectively store the background data shadow. Among them, the storage module can be a database, a distributed storage system or other suitable data storage scheme. It can be understood that the background data shadow is the background data stored in the electronic device and associated with the electronic device. It should be understood that the background data shadow and the background data body include the same background data associated with the electronic device, and the difference is only that the background data shadow is stored in the electronic device and the background data body is stored in the cloud.
[0152] S408: Receive a device body summary and a background shadow summary sent by the electronic device, and determine to update data based on the device body summary and the device shadow summary, and based on the background shadow summary and the background body summary, wherein the background shadow summary is summary data generated by the electronic device based on a background data shadow formed by the background data, and the device body summary is summary data generated by the electronic device based on a device data body formed by the device data.
[0153] See also Figure 6 , Figure 6A schematic diagram of data generation and summary comparison in a data management method provided by some embodiments of the present invention is shown. Specifically, the electronic device sends a device body summary and a background shadow summary to the cloud securely and efficiently through a suitable transmission protocol and technology, and the cloud receives the device body summary and the background shadow summary. After receiving the device body summary and the background shadow summary, the cloud determines whether to update the device data and / or background data based on the device body summary and the device shadow summary, as well as the background shadow summary and the background body summary. After determining that the device data and / or background data have changed, the device data and / or background data are updated. It can be understood that the background shadow summary is the summary data generated by the electronic device based on the background data shadow formed by the background data, and the background shadow summary has a fixed length and unique data, and has a unique identification identifier. The device body summary is the summary data generated by the electronic device based on the device data body formed by the device data, and the device body summary has a fixed length and unique data, and has a unique identification identifier.
[0154] In an embodiment of the present invention, if the cloud determines that there is a difference between the device body summary and the device shadow summary, it means that the device data body stored in the electronic device is different from the device data shadow stored in the cloud, and the device data of the electronic device has changed. The cloud sends a device data update instruction to the electronic device to notify the electronic device to send the updated device data to the cloud. After receiving the updated device data, the cloud updates the device data shadow according to the updated device data, and updates the device shadow summary according to the updated device data shadow.
[0155] Accordingly, if the cloud determines that there is a difference between the background shadow summary and the background body summary, it means that the background data shadow stored in the electronic device is different from the background data body stored in the cloud, and the background data of the electronic device has changed. The cloud sends a background data update instruction to the electronic device to notify the electronic device to obtain the updated background data and update the current background data of the electronic device. The cloud sends the updated background data to the electronic device, so that after receiving the updated background data, the electronic device updates the background data shadow according to the updated background data, and updates the background shadow summary according to the updated background data shadow.
[0156] By sending the device body summary and the background shadow summary to the cloud, after receiving the device body summary and the background shadow summary, the cloud determines whether the device data and / or the background data have changed according to the device body summary and the device shadow summary, and according to the background shadow summary and the background body summary. After determining that the device data and / or the background data have changed, the device data and / or the background data are updated. Thus, unnecessary traffic consumption can be reduced or even avoided, reducing traffic waste.
[0157] In some embodiments, data is updated based on the device entity summary and the device shadow summary, and based on the background shadow summary and the background entity summary, including but not limited to the following steps S4082-S4084:
[0158] S4082: Compare the device body summary and the device shadow summary. If the device body summary and the device shadow summary are different, send a device data update instruction to the electronic device, so that the electronic device sends the updated device data of the electronic device to the cloud after receiving the device data update instruction.
[0159] Specifically, after the cloud receives the device body summary and the background shadow summary, the device body summary and the device shadow summary are found according to the unique identification identifiers of the device body summary and the device shadow summary, and then the device body summary and the device shadow summary are compared to determine whether the device data associated with the electronic device has changed. Among them, if the device body summary and the device shadow summary are the same, it means that the device data body stored in the electronic device and the device data shadow stored in the cloud are the same, the device data associated with the electronic device has not changed, and there is no need to update the device data associated with the electronic device stored in the cloud. If the device body summary and the device shadow summary are different, it means that the device data body stored in the electronic device and the device data shadow stored in the cloud are different, the device data associated with the electronic device has changed, and it is necessary to update the device data associated with the electronic device stored in the cloud.
[0160] If the device body summary and the device shadow summary are different, it means that the device data associated with the electronic device has changed, and the cloud sends a device data update instruction to the electronic device, so that the electronic device sends the updated device data of the electronic device to the cloud after receiving the device data update instruction. After receiving the updated device data of the electronic device, the cloud updates the current device data of the electronic device according to the updated device data.
[0161] S4084: Receive updated device data sent by the electronic device, update the device data shadow based on the updated device data, and update the device shadow summary based on the updated device data shadow.
[0162] Specifically, after the cloud receives the updated device data of the electronic device, it organizes and cleans the received updated device data according to the preset coding rules and coding sequence, obtains the updated device data shadow with standardized data format and structure, and stores the updated device data shadow to the corresponding storage module of the cloud.
[0163] After completing the update of the device data shadow, the cloud will sort the updated device data shadow according to specific rules, use the corresponding summary algorithm to extract key information from the updated device data shadow, refine and abstract the updated device data shadow, and use key target data to effectively represent the core information and characteristics of the updated device data shadow, and then generate an updated device shadow summary with standardized data format and structure.
[0164] In some embodiments, data is updated based on the device entity summary and the device shadow summary, and based on the background shadow summary and the background entity summary, including but not limited to the following steps S4086-S4088:
[0165] S4086: Compare the background shadow summary and the background body summary. If the background shadow summary and the background body summary are different, send a background data update instruction to the electronic device.
[0166] Exemplarily, if the device body summary and the device shadow summary are the same, it means that the device data associated with the electronic device has not changed, and there is no need to update the device data associated with the electronic device stored in the cloud. The cloud finds the background shadow summary and the background body summary according to the unique identification identifier of the background shadow summary and the background body summary, and then compares the background shadow summary with the background body summary to determine whether the background data associated with the electronic device has changed. Among them, if the background shadow summary and the background body summary are the same, it means that the background data shadow stored in the electronic device and the background data body stored in the cloud are the same, the background data associated with the electronic device has not changed, and there is no need to update the background data associated with the electronic device stored in the cloud. If the background shadow summary and the background body summary are different, it means that the background data shadow stored in the electronic device and the background data body stored in the cloud are different, the background data associated with the electronic device has changed, and the background data associated with the electronic device stored in the electronic device needs to be updated.
[0167] If the background shadow summary and the background body summary are different, it means that the background data associated with the electronic device has changed. The cloud sends a background data update instruction to the electronic device, so that after receiving the background data update instruction, the electronic device obtains the updated background data of the electronic device from the cloud and updates the current background data of the electronic device.
[0168] S4088: In response to a background data update request instruction received from the electronic device, the background data update of the electronic device is sent to the electronic device, so that after receiving the background data update, the electronic device updates the background data shadow based on the background data update, and updates the background shadow summary based on the updated background data shadow.
[0169] The cloud sends a background data update instruction to the electronic device, notifying the electronic device to obtain the updated background data of the electronic device from the cloud, and update the current background data of the electronic device. In response to the received background data update instruction, the electronic device obtains the updated background data of the electronic device from the cloud, and updates the current background data of the electronic device.
[0170] Specifically, the electronic device sends an update background data request instruction to the cloud, requesting to obtain the update background data of the electronic device from the cloud. The cloud receives the update background data request instruction sent by the electronic device, and in response to the received update background data request instruction, sends the update background data of the electronic device to the electronic device, so that after receiving the update background data, the electronic device updates the background data shadow according to the update background data, and updates the background shadow summary according to the updated background data shadow.
[0171] Specifically, after the electronic device receives the updated background data of the electronic device sent from the cloud, that is, after obtaining the updated background data of the electronic device, the electronic device organizes and cleans the received updated background data according to preset coding rules and coding sequence, obtains an updated background data shadow with standardized data format and structure, and stores the updated background data shadow to the corresponding storage module of the electronic device.
[0172] After completing the update of the background data shadow, the electronic device sorts the updated background data shadow according to specific rules, uses the corresponding summary algorithm to extract key information from the updated background data shadow, refines and abstracts the updated background data shadow, and uses key target data to effectively represent the core information and features of the updated background data shadow, and then generates an updated background shadow summary in a standardized data format and structure, and stores the updated background shadow summary in the corresponding storage module of the electronic device.
[0173] In summary, the data management method provided in the embodiment of the present invention is used in the cloud, and the method includes: receiving device data sent by an electronic device, and forming a device data shadow based on the device data, wherein the device data shadow is device data stored in the cloud and associated with the electronic device. In the data management method provided in the embodiment of the present invention, the cloud directly receives device data sent by an electronic device, and forms a device data shadow in the cloud, so that the docking system does not need to obtain device data through other devices, and can directly obtain the device data shadow stored in the cloud. Thereby, it is convenient to uniformly manage electronic devices, simplify the acquisition process, improve efficiency, reduce the impact of network stability, improve response speed, and increase concurrency.
[0174] The following briefly describes the data management method provided by the embodiment of the present invention using a simple embodiment.
[0175] See also Figure 7 As shown, Figure 7 The logical timing diagram of the data management method provided by some embodiments of the present invention is shown. The electronic device is an Android device with a network card, the Android version is greater than 12.0, and the API is greater than 34.0. The Android device has the functions of timed power on and off, adjusting the volume, storing data, displaying data, and interacting with other devices. The cloud is a cloud server that provides a management background and is responsible for communicating directly with the Android device. It can also communicate with other docking systems to perform signal transmission and data interaction.
[0176] In the embodiment described below, the Android device is located in a display cabinet of a certain store, and the cloud server is connected to the Android device through a network. The cloud server can set connection information, device information, verification information, etc. of the Android device for the Android device.
[0177] In this embodiment, the Android device is installed in a fixed position of the product display rack, powered on, and then the Wi-Fi connection function of the Android device is turned on to connect to the Internet to communicate with the cloud server.
[0178] Android devices have deeply customized systems. After the Android device is started, open the self-developed application and set the data for connecting to the cloud server (i.e., set the connection information) in the application. The connection information includes but is not limited to: the cloud server IP address, cloud server port, the country, city, store where the Android device is located, the language used by the Android device, and an alias for distinguishing, etc. It should be understood that the connection information of the Android device can be set before assembly or modified later.
[0179] After the connection information is set, the Android device starts to check the device information, including but not limited to: the unique device identifier (usually the MAC address of the network card), whether Wi-Fi is turned on, whether Bluetooth is turned on, whether infrared sensing is turned on, current volume, current brightness, whether the scheduled power on / off is turned on, and the scheduled power on / off time.
[0180] The self-developed application in the Android device determines whether the device data has been submitted to the cloud server for initialization. If it has not been submitted, it sorts its own device data according to the rules and sends the device data to the cloud server through the aforementioned steps of setting the connection information. Among them, the Android device forms a device data body based on the device data, and generates a device body summary based on the device data body.
[0181] When the cloud server receives the device data from the Android device, it first determines whether the unique identifier of the Android device has been entered in the management background. If it has been entered, it is considered to be a legitimate Android device. Otherwise, it will directly return the feedback information of "Failed to initialize the device, the device is illegal".
[0182] After receiving the feedback information, the Android device determines whether to enter the management backend. If it is an illegal device, a notification prompt will pop up to inform the administrator. At this time, the administrator can enter the unique identifier of the Android device in the management backend, and the Android device will resend the device data to the cloud server.
[0183] If it is a legitimate device, the cloud server receives the device data of the Android device, and sets the background data corresponding to the Android device according to the device data of the Android device. The priority of the background data is as follows: background data set for this device alone> device background data of the store set by the device> device background data of the city set by the device> device background data of the country set by the device> default background data. Among them, the background data at least includes the categories displayed by the device, the products under the device categories, the detailed information of the products, the identification codes of the pictures, videos and audios (i.e., resource data) in the detailed information of the products, the volume and brightness of the device, whether the infrared sensor is turned on, the identification code of the resource data played when the infrared sensor is unattended (such as video ads, carousel pictures, guidance audio, etc.), the power on and off time, the identification code of the resource data played when the infrared sensor is triggered, etc. After setting the background data, the cloud server forms the background data body based on the background data, and generates the background body summary based on the background data body. And the device data shadow is formed based on the device data, and the device shadow summary is generated based on the device data shadow.
[0184] The cloud server sends background data to the Android device. After the Android device receives the background data sent by the cloud server, it forms a background data shadow based on the background data, and generates a background shadow summary based on the background data shadow. Then the Android device obtains the corresponding resource data from the cloud server according to the identification code of the resource data in the background data, and stores it in the storage module corresponding to the Android device. At this point, the Android device completes initialization.
[0185] The Android device sends the background shadow summary and the device body summary to the cloud server in a polling manner. If the device data of the Android device changes, the cloud server compares and determines that the updated device body summary sent to the cloud server is different from the device shadow summary stored in the cloud server, and the Android device updates the device data body and the device body summary. The cloud server sends a device data update instruction to the Android device, requesting the Android device to send updated device data, that is, the latest device data.
[0186] After receiving the device data update instruction, the Android device sends the updated device data of the Android device to the cloud server. After receiving the updated device data, the cloud server updates the device data shadow according to the updated device data, and updates the device shadow summary.
[0187] If the device data of the Android device has not changed, the cloud server compares and determines that the device body digest sent to the cloud server is the same as the device shadow digest stored in the cloud server, and the Android device does not update the device data body and device body digest. The cloud server compares the background shadow digest sent to the cloud server with the background body digest stored in the cloud server to see if they are the same.
[0188] Among them, changes in device data include: turning on / off infrared sensing, changing the power on / off time, adjusting the volume, etc. The application scenarios of infrared sensing are as follows: when the infrared sensing function is turned on, in the self-developed application, when someone approaches the Android device, the infrared sensing module of the Android device will trigger the playback of audio (greeting audio, guidance audio, etc.) and then jump to the product classification page so that customers can understand the product; when the customer leaves the Android device, the infrared sensing module does not sense someone approaching the Android device for a continuous period of time, then the program will automatically play product introduction advertising videos, carousel pictures, etc. When the infrared sensing switches between off and on, the device data of the Android device changes.
[0189] When other docking systems need to obtain device data of Android devices, the docking system can connect to the cloud server, and then the cloud server provides the device data shadow to the docking system. In this way, if there are multiple docking systems frequently obtaining device data, the pressure on the sending device of Android devices can be greatly reduced, and the docking system does not need to indirectly obtain the device data of Android devices through other devices. Similarly, if the system administrator is doing promotion activities in a certain area and needs to modify the background data of Android devices in batches, the device background data of the area can be changed in the management end background, such as product classification, product classification cover image, product detailed content, etc.
[0190] If the background data of the Android device changes, the cloud server compares and determines that the updated background body summary stored in the cloud server is different from the background shadow summary sent to the cloud server, and the cloud server updates the background data body and the background body summary. The cloud server sends a background data update instruction to the Android device to instruct the Android device to obtain the updated background data of the Android device, that is, the latest background data.
[0191] After receiving the background data update instruction, the Android device sends an update background data request instruction to the cloud server to request to obtain the update background data of the Android device. After receiving the update background data request instruction, the cloud server sends the update background data to the Android device in response to the update background data request instruction. After receiving the update background data, the Android device updates the background data shadow according to the update background data, and updates the background shadow summary. At this time, if the background data changes and involves the change of the identification code of the resource data, that is, the resource data of the Android device needs to be updated. According to the difference between the identification code of the resource data in the current background data and the update background data, the Android device sends the relevant update resource data acquisition instruction to the cloud server to request to obtain the update resource data. After receiving the relevant update resource data acquisition instruction, the cloud server sends the update resource data to the Android device, and the Android device receives the update resource data and updates the current resource data of the Android device. At this point, the resource data update of the Android device is completed.
[0192] If the background data of the Android device has not changed, the cloud server compares and determines that the updated background body summary stored in the cloud server is the same as the background shadow summary sent to the cloud server, and the cloud server does not update the background data body and the background body summary.
[0193] Those skilled in the art will appreciate that the above embodiment is only a brief description of the data management method provided by the embodiment of the present invention, and there are many details not described in detail. Please refer to the detailed description of the corresponding steps in the aforementioned data management method.
[0194] An embodiment of the present invention provides a computer-readable storage medium, on which computer program instructions executable by a processor are stored. When the computer program instructions are called by the processor, the processor executes any one of the data management methods provided by the embodiment of the present invention, or executes the steps in any one of the implementation methods of any one of the data management methods provided by the embodiment of the present invention.
[0195] In some embodiments, the storage medium may be a flash memory, a hard disk, an optical disk, a register, a magnetic surface storage, a removable disk, a CD-ROM, a random access memory (RAM), a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM or other memory, or any other form of storage medium known in the technical field, or various devices including one or any combination of the above storage media.
[0196] In some embodiments, computer program instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0197] As an example, computer program instructions may, but do not necessarily, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, for example, in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (for example, files storing one or more modules, subroutines, or code portions).
[0198] As an example, computer program instructions may be deployed to be executed on a computing device (including devices such as smart terminals and servers), or on multiple computing devices located at one location, or on multiple computing devices distributed at multiple locations and interconnected by a communication network. It is easy to understand that all or part of the steps of the method described in the embodiments of the present invention may be directly implemented using electronic hardware or processor executable computer program instructions, or a combination of the two.
[0199] The technicians can understand that the embodiments provided by the present invention are only illustrative, and the writing order of each step in the method of the embodiment does not mean a strict execution order and does not constitute any limitation on the implementation process. The order can be adjusted, merged and deleted according to actual needs. The modules or sub-modules, units or sub-units in the device or system of the embodiment can be merged, divided and deleted according to actual needs. For example, the division of the unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed.
[0200] It should be noted that the above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with this technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the scope of protection of the present invention. Ordinary technicians in this field can understand that all or part of the processes of implementing the above embodiments, and the equivalent changes and modifications made according to the claims of the present invention should all fall within the scope of the claims of the present invention.
Claims
1. A data management method for an electronic device, characterized in that: The electronic device includes device data, and the method includes: forming a device data body based on the device data, wherein the device data body is device data stored in the electronic device and associated with the electronic device; The device data is sent to the cloud, so that the cloud forms a device data shadow based on the device data after receiving the device data, wherein the device data shadow is the device data stored in the cloud and associated with the electronic device.
2. The data management method according to claim 1, characterized in that: The method further comprises: generating a device ontology summary based on the device data ontology; receiving background data sent by the cloud, forming a background data shadow based on the background data, and generating a background shadow summary based on the background data shadow, wherein the background data shadow is background data stored in the electronic device and associated with the electronic device; Sending the device body digest and the background shadow digest to the cloud, so that the cloud determines to update the data based on the device body digest and the device shadow digest, and based on the background shadow digest and the background body digest after receiving the device body digest and the background shadow digest; The device shadow summary is summary data generated by the cloud based on the device data shadow formed by the device data, and the background body summary is summary data generated by the cloud based on the background data body formed by the background data.
3. The data management method according to claim 2, characterized in that: The method further comprises: In response to receiving a device data update instruction sent by the cloud, updated device data of the electronic device is sent to the cloud, so that the cloud updates the device data shadow based on the updated device data after receiving the updated device data, and updates the device shadow digest based on the updated device data shadow, wherein the device data update instruction is sent to the electronic device when the cloud compares and determines that the device body digest and the device shadow digest are different.
4. The data management method according to claim 2, characterized in that: The method further comprises: In response to the received background data update instruction sent by the cloud, the updated background data of the electronic device is obtained from the cloud, and the current background data of the electronic device is updated, wherein the background data update instruction is sent to the electronic device when the cloud compares and determines that the background shadow summary and the background body summary are different.
5. The data management method according to claim 4, characterized in that: The acquiring the updated background data of the electronic device and updating the current background data of the electronic device includes: Sending a background data update request instruction to the cloud, so that the cloud sends the updated background data of the electronic device to the electronic device after receiving the background data update request instruction; Receive the updated background data sent by the cloud, update the background data shadow based on the updated background data, and update the background shadow summary based on the updated background data shadow.
6. The data management method according to any one of claims 2 to 5, characterized in that: The background data of the electronic device includes an identification code of resource data, and the method further includes: Acquiring updated resource data of the electronic device based on current background data of the electronic device and an identification code of resource data in the updated background data to update the current resource data of the electronic device, including: Respectively acquiring a first identification code set of resource data in current background data of the electronic device and a second identification code set of resource data in updated background data of the electronic device; Obtaining an intersection of the first identification code set and the second identification code set; Obtain a first difference set between the first identification code set and the intersection set, and obtain a second difference set between the second identification code set and the intersection set; Deleting resource data corresponding to the identification code in the first difference set from current resource data of the electronic device, and acquiring resource data corresponding to the identification code in the second difference set from the cloud; The resource data corresponding to the identification code in the intersection set and the resource data corresponding to the identification code in the second difference set are used to form updated resource data of the electronic device, so as to complete the updating of current resource data of the electronic device.
7. A data management method, used in the cloud, characterized in that: The method comprises: Device data sent by an electronic device is received, and a device data shadow is formed based on the device data, wherein the device data shadow is device data stored in the cloud and associated with the electronic device.
8. The data management method according to claim 7, characterized in that: The cloud includes background data of the electronic device, and the method further includes: generating a device shadow summary based on the device data shadow; forming a background data ontology based on the background data, and generating a background ontology summary based on the background data ontology, wherein the background data ontology is background data stored in the cloud and associated with the electronic device; Sending the background data to the electronic device, so that after receiving the background data, the electronic device forms a background data shadow based on the background data, and generates a background shadow summary based on the background data shadow; Receiving a device body digest and a background shadow digest sent by the electronic device, and updating data based on the device body digest and the device shadow digest, and based on the background shadow digest and the background body digest; The background shadow summary is summary data generated by the electronic device based on the background data shadow formed by the background data, and the device body summary is summary data generated by the electronic device based on the device data body formed by the device data.
9. The data management method according to claim 8, characterized in that: The updating of data based on the device entity summary and the device shadow summary, and based on the background shadow summary and the background entity summary, includes: Comparing the device body digest with the device shadow digest, and if the device body digest and the device shadow digest are different, sending a device data update instruction to the electronic device, so that the electronic device sends the updated device data of the electronic device to the cloud after receiving the device data update instruction; Receive updated device data sent by the electronic device, update the device data shadow based on the updated device data, and update the device shadow summary based on the updated device data shadow.
10. The data management method according to claim 9, characterized in that: The updating of data based on the device entity summary and the device shadow summary, and based on the background shadow summary and the background entity summary, further includes: Comparing the background shadow digest with the background entity digest, and if the background shadow digest and the background entity digest are different, sending a background data update instruction to the electronic device; In response to a background data update request instruction received from the electronic device, the background data update of the electronic device is sent to the electronic device, so that after receiving the background data update, the electronic device updates the background data shadow based on the background data update, and updates the background shadow summary based on the updated background data shadow.
11. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer program instructions executable by the processor, and when the computer program instructions are called by the processor, the processor executes the data management method according to any one of claims 1 to 6.
12. A cloud, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer program instructions executable by the processor, and when the computer program instructions are called by the processor, the processor executes the data management method according to any one of claims 7 to 10.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions executable by a processor, and when the computer program instructions are called by the processor, the processor executes the data management method according to any one of claims 1 to 10.