CN117118840A - Data processing system, method, electronic equipment and medium - Google Patents

Data processing system, method, electronic equipment and medium Download PDF

Info

Publication number
CN117118840A
CN117118840A CN202310125219.3A CN202310125219A CN117118840A CN 117118840 A CN117118840 A CN 117118840A CN 202310125219 A CN202310125219 A CN 202310125219A CN 117118840 A CN117118840 A CN 117118840A
Authority
CN
China
Prior art keywords
attribute
electronic device
version identifier
instruction
reportid
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310125219.3A
Other languages
Chinese (zh)
Inventor
柯小锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310125219.3A priority Critical patent/CN117118840A/en
Publication of CN117118840A publication Critical patent/CN117118840A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/085Retrieval of network configuration; Tracking network configuration history
    • H04L41/0859Retrieval of network configuration; Tracking network configuration history by keeping history of different configuration generations or by rolling back to previous configuration versions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/08Protocols specially adapted for terminal emulation, e.g. Telnet

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A data processing system, a data processing method, electronic equipment and a medium relate to the technical field of terminals. The system comprises: the first electronic device and the second electronic device; the first electronic device is configured to send an attribute instruction to the second electronic device, where the attribute instruction includes a version identifier and an attribute value; and the second electronic device is used for comparing the version identifier in the attribute instruction with the version identifier in the local cache attribute to obtain a comparison result, and if the comparison result represents that the version identifier in the attribute instruction is later than the version identifier in the local cache attribute, updating the version identifier and the attribute value in the local cache attribute into the version identifier and the attribute value in the attribute instruction. Therefore, the subsequent processing is carried out based on the attribute value corresponding to the latest version identifier, and the problem of cross-device data processing time sequence is solved.

Description

Data processing system, method, electronic equipment and medium
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a data processing system, a data processing method, an electronic device, and a medium.
Background
With the increasing availability of mobile and connectivity capabilities of electronic devices, users may transfer and synchronize data among multiple electronic devices, i.e., multiple device collaboration.
Near field communication refers to near field communication between a plurality of electronic devices through WIFI, bluetooth or other modes, and far field communication refers to communication between a plurality of electronic devices through forwarding through device cloud. When near field communication and far field communication are performed simultaneously between two electronic devices, then it is referred to as multi-channel communication. When a message of the multi-channel communication arrives at an electronic device receiving the message, the electronic device receiving the message may have errors in processing the message of the multi-channel communication, so that a new message is covered by an old message, i.e. a cross-device data processing timing problem occurs.
On the other hand, if either the electronic device receiving the message or the electronic device sending the message is in the network delay or the scene of processing the network delay, confusion may occur in the message transmission process, so that the problem of cross-device data processing time sequence occurs when the message is sent first and then.
Disclosure of Invention
The application aims at: provided are a data processing system, a method, an electronic device and a medium, which can solve the problem of cross-device data processing time sequence.
In a first aspect, the present application discloses a data processing system, said data processing system comprising: the first electronic device and the second electronic device. The first electronic device and the second electronic device can be mobile phones, PADs, large screens and other electronic devices. The first electronic device is configured to send an attribute instruction to the second electronic device, where the attribute instruction includes a version identifier and an attribute value. The second electronic device is used for comparing the version identifier in the attribute instruction with the version identifier in the local cache attribute to obtain a comparison result. And if the comparison result represents that the version identifier in the attribute instruction is later than the version identifier in the local cache attribute, updating the version identifier and the attribute value in the local cache attribute into the version identifier and the attribute value in the attribute instruction. Therefore, the subsequent processing is carried out based on the attribute value corresponding to the latest version identifier, and the problem of cross-device data processing time sequence is solved.
In some possible implementations, the data processing system further includes: and (5) a device cloud. The first electronic device is used for sending the attribute instruction to the device cloud; and the equipment cloud is used for sending the attribute instruction to the second electronic equipment. Therefore, after the attribute of the first electronic device changes, the first electronic device assembles an attribute instruction, wherein the attribute instruction comprises the version identifier and the attribute value, the first electronic device sends the attribute instruction to the device cloud, and the device cloud sends the attribute instruction to the second electronic device. And the second electronic equipment compares the version identifier in the attribute instruction with the version identifier in the local cache attribute to obtain a comparison result. If the comparison result represents that the version identifier in the attribute instruction is later than the version identifier in the local cache attribute, the version identifier and the attribute value in the local cache attribute are updated into the version identifier and the attribute value in the attribute instruction. Therefore, the subsequent processing is carried out based on the attribute value corresponding to the latest version identifier, and the problem of cross-device data processing time sequence is solved.
In a second aspect, the present application discloses a data processing system, said data processing system comprising: the cloud electronic device comprises a first electronic device, a device cloud and a second electronic device. The first electronic device and the second electronic device can be mobile phones, PADs, large screens and other electronic devices. The first electronic device is used for sending an attribute instruction to the device cloud, wherein the attribute instruction comprises a version identifier and an attribute value; the device cloud is used for comparing the version identifier in the attribute instruction with the version identifier in the cloud cache attribute of the device cloud to obtain a comparison result, and if the comparison result represents that the version identifier in the attribute instruction is later than the version identifier in the cloud cache attribute of the device cloud, the version identifier and the attribute value in the cloud cache attribute of the device cloud are updated to be the version identifier and the attribute value in the attribute instruction; transmitting the version identification and the attribute value in the cloud cache attribute updated by the equipment cloud to second electronic equipment; the second electronic device is configured to update the version identifier and the attribute value in the local cache attribute of the second electronic device to the version identifier and the attribute value in the cloud cache attribute after the device cloud update. Therefore, the subsequent processing is carried out based on the attribute value corresponding to the latest version identifier, and the problem of cross-device data processing time sequence is solved.
In a third aspect, the present application discloses a data processing method, applied to a second electronic device, the method comprising: receiving an attribute instruction sent by first electronic equipment, wherein the attribute instruction comprises a version identifier and an attribute value; comparing the version identifier in the attribute instruction with the version identifier in the local cache attribute to obtain a comparison result; if the comparison result shows that the version identifier in the attribute instruction is later than the version identifier in the local cache attribute, the version identifier and the attribute value in the local cache attribute are updated into the version identifier and the attribute value in the attribute instruction. Therefore, the subsequent processing is carried out based on the attribute value corresponding to the latest version identifier, and the problem of cross-device data processing time sequence is solved.
In some possible implementations, comparing the version identification in the attribute instruction with the version identification in the local cache attribute includes: judging whether the version identifier in the attribute instruction is 0; if the version identification in the attribute instruction is not 0, comparing the version identification in the attribute instruction with the version identification in the local cache attribute.
In some possible implementations, the method further includes: if the version identifier in the attribute instruction is 0, the version identifier and the attribute value in the attribute instruction are set as the version identifier and the attribute value in the local cache attribute.
In some possible implementations, comparing the version identification in the attribute instruction with the version identification in the local cache attribute includes: judging whether the version identifier and the attribute value in the local cache attribute exist or not; if the version identifier in the local cache attribute and the attribute value exist, comparing the version identifier in the attribute instruction with the version identifier in the local cache attribute.
In some possible implementations, the method further includes: if the version identification and the attribute value in the local cache attribute do not exist, the version identification and the attribute value in the attribute instruction are set as the version identification and the attribute value in the local cache attribute.
In some possible implementations, the attribute instructions include device logoff instructions; updating the version identification and the attribute value in the local cache attribute to the version identification and the attribute value in the attribute instruction comprises: and deleting the version identifier in the local cache attribute and updating the attribute value to a default attribute value. Therefore, under the scene that the first electronic equipment is logged off, data processing can be completed in a cross-equipment mode.
In some possible implementations, the attribute instructions include device re-registration instructions; updating the version identification and the attribute value in the local cache attribute to the version identification and the attribute value in the attribute instruction comprises: and updating the version identifier in the local cache attribute to 0 and updating the attribute value to a default attribute value. Therefore, under the scene that the first electronic equipment re-registers the equipment cloud, data processing of the cross equipment can be completed.
In a fourth aspect, the present application discloses a data processing method, applied to a device cloud, the method comprising: receiving an attribute instruction sent by first electronic equipment, wherein the attribute instruction comprises a version identifier and an attribute value; comparing the version identifier in the attribute instruction with the version identifier in the cloud cache attribute to obtain a comparison result; if the version identification in the comparison result representation attribute instruction is later than the version identification in the cloud cache attribute, updating the version identification and the attribute value in the cloud cache attribute into the version identification and the attribute value in the attribute instruction; and sending the version identification and the attribute value in the updated cloud cache attribute to the second electronic equipment. Therefore, the subsequent processing is carried out based on the attribute value corresponding to the latest version identifier, and the problem of cross-device data processing time sequence is solved.
In a fifth aspect, the present application discloses an electronic device comprising a processor and a memory; the memory is used for storing computer execution commands; the processor is configured to execute the memory-stored computer-executable commands such that the processor performs the method as in the third aspect, the fourth aspect.
In a sixth aspect, the present application discloses a computer readable storage medium having stored therein a computer program or instructions which, when executed, implement the method as in the third and fourth aspects.
In a seventh aspect, the application provides a computer program product for causing a computer to perform the method as in the third and fourth aspects when the computer program product is run on the computer.
Compared with the prior art, the application has the following beneficial effects:
according to the data processing system, the method, the electronic device and the medium provided by the embodiment of the application, after the attribute of the first electronic device is changed, the attribute instruction is assembled by the first electronic device, the attribute instruction comprises the version identifier and the attribute value, and the first electronic device sends the attribute instruction to the second electronic device. And the second electronic equipment compares the version identifier in the attribute instruction with the version identifier in the local cache attribute to obtain a comparison result. If the comparison result represents that the version identifier in the attribute instruction is later than the version identifier in the local cache attribute, the version identifier and the attribute value in the local cache attribute are updated into the version identifier and the attribute value in the attribute instruction. Therefore, the subsequent processing is carried out based on the attribute value corresponding to the latest version identifier, and the problem of cross-device data processing time sequence is solved.
Drawings
Fig. 1A is a schematic diagram of data transmission according to an embodiment of the present application;
FIG. 1B is a schematic diagram of another data transmission according to an embodiment of the present application;
fig. 2 is a schematic hardware structure of an electronic device according to an embodiment of the present application;
FIG. 3 is a flowchart of a data processing method according to an embodiment of the present application;
FIG. 4 is a logic diagram of an overall data processing system according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a first electronic device attribute change according to an embodiment of the present application;
FIG. 6 is a schematic diagram of another attribute variation of a first electronic device according to an embodiment of the present application;
FIG. 7 is a block diagram illustrating another data processing according to an embodiment of the present application;
fig. 8 is a flowchart of a method for obtaining a latest reportID according to an embodiment of the present application;
FIG. 9 is a block diagram illustrating a third data processing according to an embodiment of the present application;
fig. 10 is a logic diagram of a fourth data processing according to an embodiment of the present application.
Detailed Description
The terms first, second, third and the like in the description and in the claims and in the drawings are used for distinguishing between different objects and not for limiting the specified order.
In embodiments of the application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g." in an embodiment should not be taken as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
With the increasing availability of mobile and connectivity capabilities of electronic devices, users may transfer and synchronize data among multiple electronic devices, i.e., multiple device collaboration. Multi-device collaboration is a technique applied between multiple electronic devices. By utilizing the multi-device cooperation technology, cross-system and cross-device cooperation can be performed between two or more electronic devices, so that resource sharing and cooperation operation are realized. By way of example, the electronic device may utilize a multi-device collaboration technique based on a superterminal service to implement the following functions:
screen throwing: content (e.g., video, photos, etc.) in the screen of the first electronic device is delivered to the screen of the second electronic device for display. When the screen is projected, the user can project part or all of the content selected by the screen of the first electronic device into the screen of the second electronic device for display. Some screen-casting approaches also allow the user to switch the screen to other pages during the screen casting without affecting the second electronic device to continue playing the delivered content, such as DLNA screen casting, etc.
Screen mirror image: and completely mirroring and displaying all the contents in the screen of the first electronic device in the screen of the second electronic device. The content of the first electronic device displayed in the second electronic device is the same as the content displayed by the first electronic device and changes with the change of the content displayed by the first electronic device.
Screen expansion: the screen of the second electronic device is used as the auxiliary screen of the first electronic device, the first electronic device can transfer part of the content to be displayed to the auxiliary screen for displaying, and the screen of the first electronic device and the screen of the second electronic device can jointly display the content, so that the display capability of the first electronic device is expanded.
Screen sharing: the method comprises the steps of projecting a user interface of the first electronic device into a screen of the second electronic device for display, allowing a user to operate the user interface of the first electronic device in the second electronic device, and transmitting files in the second electronic device into the first electronic device by performing specific operations in the second electronic device (such as dragging files from the user interface of the second electronic device into the user interface of the first electronic device), so as to realize cross-device operation between the first electronic device and the second electronic device, cross-device file transmission and the like. The user interface of the first electronic device may be displayed in any area of the screen of the second electronic device, or may be displayed in full screen.
Mouse and key synergy: the first electronic device may share an input device of the second electronic device, for example, the first electronic device is an Android device, the second electronic device is a Windows device, and the Android device may share an input device of the Windows device, for example, an input device such as a mouse, a keyboard, and the like. In addition, in the mouse sharing type, file transmission can be performed between the first electronic device and the second electronic device.
And (3) connection coordination: the user may run an application on the first electronic device and the interface of the second electronic device may prompt the user to open the application running on the first electronic device on the second electronic device, thereby transferring to a continued operation on the second electronic device, such as viewing a video, editing a document, etc. For example: the first electronic device is running a document application, the document application can be a memo, a word and the like, a user edits the document on the first electronic device, when the second electronic device is close to the first electronic device, prompt information is displayed on the second electronic device, the user clicks the prompt information on the second electronic device, and in response to clicking operation of the user, the second electronic device opens the document application and displays the editing position of the user, so that the user is transferred to the second electronic device to continue editing and the like.
Conversation collaboration: when the first electronic device receives an incoming call of a voice call or a video call, the second electronic device can synchronously display an incoming interface, so that a user can select to answer or hang up the call on the second electronic device.
Notification collaboration: when the first electronic device receives the notification message, the notification message may be synchronously displayed in the second electronic device, and the user may be allowed to perform operations such as replying, deleting, and reading the notification message in the second electronic device.
It will be appreciated that the first electronic device in the above description may also be referred to as a master device, referring to the side that initiates the synchronization of status messages. The second electronic device may also be referred to as a slave device, indicating the side receiving the status message sync. For ease of understanding, the electronic device that initiates the status message synchronization will be referred to hereinafter as the first electronic device, and the electronic device that receives the status message synchronization will be referred to hereinafter as the second electronic device expansion description.
The above functions may be implemented by near field communication, far field communication or multi-channel communication. Near field communication refers to near field communication between a plurality of electronic devices through WIFI, bluetooth or other modes, and far field communication refers to communication between a plurality of electronic devices through forwarding through device cloud. When near field communication and far field communication are performed simultaneously between two electronic devices, then it is referred to as multi-channel communication. When a message of the multi-channel communication arrives at an electronic device receiving the message, the electronic device receiving the message may have errors in processing the message of the multi-channel communication, so that a new message is covered by an old message, i.e. a cross-device data processing timing problem occurs.
Referring to fig. 1A, a schematic diagram of data transmission according to an embodiment of the present application is shown. The data transmission process is applied to a service scene of a super terminal or a service scene of a southbound device, and by taking the super terminal service scene as an example, as shown in fig. 1A, a first electronic device communicates in a near-field communication mode based on a near-field communication mode, such as bluetooth or WIFI, and transmits a message of state 1 to a second electronic device. The status refers to a service status of the electronic device (i.e. a service supporting capability, such as a status of whether to support a service such as connection, incoming call, notification, mouse, collaboration, sharing, screen-dropping, etc.). And in a short period of time, the first electronic device changes the state 1 into the state 2, and communicates in a device cloud mode based on a far-field communication mode, and transmits a state 2 message to the second electronic device. Wherein, the state 1 and the state 2 are two different states, and for example, the state 1 may support connection, and the state 2 may not support connection. At this time, the final state of the first electronic device is state 2, and the second electronic device receives the messages of state 1 and state 2 in a short time through both near field and far field, so the second electronic device needs to combine or fail the messages of both near field and far field. If the second electronic device performs message merging or invalidation processing, the new data will be covered by the old data, i.e. the final state of the second electronic device is state 1, which results in the occurrence of a cross-device data processing timing problem.
On the other hand, if either the electronic device receiving the message or the electronic device sending the message is in the network delay or the scene of processing the network delay, confusion may occur in the message transmission process, so that the problem of cross-device data processing time sequence occurs when the message is sent first and then.
Referring to fig. 1B, another schematic diagram of data transmission according to an embodiment of the present application is shown. The data transmission process is also applied to a service scene of a super terminal or a service scene of a southbound device, and taking the super terminal service scene as an example, as shown in fig. 1B, the first electronic device first sends a message of state 1 to the second electronic device through the device cloud, then the first electronic device changes the state 1 into state 2, and sends the message of state 2 to the second electronic device again through the device cloud. At this time, the final state of the first electronic device is state 2. However, since the second electronic device is in the network delay or processes the network delay, the second electronic device receives the state 2 message first and then receives the state 1 message, which results in the final state of the second electronic device being state 1, which is contrary to the final state of the first electronic device being state 2, thereby also resulting in the occurrence of the cross-device data processing timing problem.
In view of this, in the data processing system, method, electronic device and medium provided in the embodiments of the present application, after the attribute of the first electronic device (for example, whether to support the capability attribute of the service such as connection, incoming call, notification, mouse, collaboration, sharing, screen-throwing, etc.) changes, the first electronic device assembles an attribute instruction, where the attribute instruction includes a version identifier and an attribute value, and the first electronic device sends the attribute instruction to the second electronic device. And the second electronic equipment compares the version identifier in the attribute instruction with the version identifier in the local cache attribute to obtain a comparison result. If the comparison result represents that the version identifier in the attribute instruction is later than the version identifier in the local cache attribute, the version identifier and the attribute value in the local cache attribute are updated into the version identifier and the attribute value in the attribute instruction. Therefore, the subsequent processing is carried out based on the attribute value corresponding to the latest version identifier, and the problem of cross-device data processing time sequence is solved.
First, an exemplary electronic device 100 provided in an embodiment of the present application is described. The electronic device 100 may be used as a master device in a multi-device collaboration or as a slave device in a multi-device collaboration. In some embodiments, the electronic device 100 may be a cell phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a Personal Digital Assistant (PDA), an Augmented Reality (AR) device, a Virtual Reality (VR) device, an Artificial Intelligence (AI) device, a wearable device, a vehicle-mounted device, a smart home device, and/or a smart city device, and embodiments of the present application are not particularly limited as to the particular type of the electronic device 100. Referring to fig. 2, the diagram is a schematic hardware structure of an electronic device according to an embodiment of the present application.
As shown in fig. 2, the electronic device 100 may include a processor 210, an internal memory 220, an antenna 1, an antenna 2, a mobile communication module 230, a wireless communication module 240, a display 250, and the like.
It is to be understood that the configuration illustrated in this embodiment does not constitute a specific limitation on the electronic apparatus. In other embodiments, the electronic device may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, a combination of software and hardware.
Processor 210 may include one or more processing units such as, for example: the processor 210 may include an Application Processor (AP), a modem processor, a Graphics Processor (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processor (NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors. For example, in the present application, the processor 210 of the second electronic device may receive an attribute instruction sent by the first electronic device, where the attribute instruction includes a version identifier and an attribute value; comparing the version identifier in the attribute instruction with the version identifier in the local cache attribute to obtain a comparison result; if the comparison result shows that the version identifier in the attribute instruction is later than the version identifier in the local cache attribute, the version identifier and the attribute value in the local cache attribute are updated into the version identifier and the attribute value in the attribute instruction.
The controller can be a neural center and a command center of the electronic device. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 210 for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may hold instructions or data that the processor 210 has just used or recycled. If the processor 210 needs to reuse the instruction or data, it may be called directly from the memory. Repeated accesses are avoided and the latency of the processor 210 is reduced, thereby improving the efficiency of the system.
In some embodiments, processor 210 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver transmitter (universal asynchronousreceiver/transmitter, UART) interface, a mobile industry processor interface (mobileindustry processorinterface, MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
The I2C interface is a bidirectional synchronous serial bus, which includes a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments, the processor 210 may contain multiple sets of I2C buses. The processor 210 may be coupled to the touch sensor or the like through different I2C bus interfaces, respectively.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 210 with the wireless communication module 240.
The MIPI interface may be used to connect the processor 210 to peripheral devices such as the display 250. The MIPI interface includes Camera Serial Interface (CSI), display Serial Interface (DSI), and the like. In some embodiments, the processor 210 and the camera communicate through a CSI interface to implement a photographing function of the electronic device. The processor 210 and the display screen 250 communicate through a DSI interface to implement the display function of the electronic device. For example, the electronic device can display the relevant interface based on the display function.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 210 with a camera, display 250, wireless communication module 240, or the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
It should be understood that the connection relationship between the modules illustrated in this embodiment is only illustrative, and does not limit the structure of the electronic device. In other embodiments of the present application, the electronic device may also use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
The wireless communication function of the electronic device may be implemented by the antenna 1, the antenna 2, the mobile communication module 230, the wireless communication module 240, the modem processor, the baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 230 may provide a solution for wireless communication including 2G/3G/4G/5G, etc. applied on an electronic device. The mobile communication module 230 may include at least one filter, switch, power amplifier, low noise amplifier (low noiseamplifier, LNA), etc. The mobile communication module 230 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 230 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 230 may be disposed in the processor 210. In some embodiments, at least some of the functional modules of the mobile communication module 230 may be provided in the same device as at least some of the modules of the processor 210.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor displays images or video via the display 250. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 230 or other functional module, independent of the processor 210.
The wireless communication module 240 may provide solutions for wireless communication including wireless local area network (wirelesslocalarea networks, WLAN) (e.g., wireless fidelity (Wi-Fi) network), bluetooth (BT), global Navigation Satellite System (GNSS), frequency Modulation (FM), near Field Communication (NFC), infrared (IR), etc. applied to the electronic device. The wireless communication module 240 may be one or more devices integrating at least one communication processing module. The wireless communication module 240 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 210. The wireless communication module 240 may also receive a signal to be transmitted from the processor 210, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 230 of the electronic device are coupled, and antenna 2 and wireless communication module 240 are coupled, such that the electronic device may communicate with the network and other devices through wireless communication techniques. The wireless communication techniques may include Global System for Mobile communications (GSM), general Packet Radio Service (GPRS), code division multiple Access (codedivisionmultiple access, CDMA), wideband Code Division Multiple Access (WCDMA), time division multiple Access (TD-SCDMA), long term evolution (longterm evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (global navigationsatellitesystem, GLONASS), a beidou satellite navigation system (BDS), a quasi-zenith satellite system (QZSS), and/or a satellite based augmentation system (satellitebased augmentationsystems, SBAS).
In some examples, the electronic device may download the corresponding file from the cloud based on wireless communication technology of the electronic device.
The electronic device implements display functions through the GPU, the display screen 250, and the application processor, etc. The GPU is a microprocessor for image processing, and is connected to the display 250 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 210 may include one or more GPUs that execute program instructions to generate or change display information.
The display 250 is used to display images, videos, and the like. The display 250 includes a display panel. The display panel may employ a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (AMOLED) of active-matrixorganiclightemitting diode, a flexible light-emitting diode (FLED), miniled, micro-OLED, a quantum dot light-emitting diode (QLED), or the like. In some embodiments, the electronic device may include 1 or N displays 250, N being a positive integer greater than 1.
A series of Graphical User Interfaces (GUIs), which are all home screens of the electronic device, may be displayed on the display screen 250 of the electronic device. Generally, the size of the display 250 of an electronic device is fixed and only limited controls can be displayed in the display 250 of the electronic device. A control is a GUI element, which is a software component included in an application program, controls all data processed by the application program and interactive operations on the data, and a user can interact with the control through direct manipulation (directmanagement) to read or edit information about the application program. In general, controls may include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, and the like. In some examples, when the functionality supported by the electronic device is different, the functionality controls presented by the electronic device may be different.
The internal memory 220 may be used to store computer executable program code including instructions. The processor 210 executes various functional applications of the electronic device and data processing by executing instructions stored in the internal memory 220. The internal memory 220 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device (e.g., audio data, phonebook, etc.), and so forth. In addition, the internal memory 220 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like. The processor 210 performs various functional applications of the electronic device and data processing by executing instructions stored in the internal memory 220 and/or instructions stored in a memory provided in the processor.
Referring to fig. 3, a flowchart of a data processing method according to an embodiment of the present application is applied to a side of receiving synchronization of status messages, that is, to a second electronic device. The method comprises the following steps:
S301: the second electronic device determines whether the reportID in the attribute instruction is 0, if so, S302 is executed, and if not, S303 is executed.
The attribute instruction refers to an instruction which is sent by the first electronic device to the second electronic device and can characterize the existing attribute of the first electronic device. The attribute instruction comprises a group of version identifiers and attribute values, wherein the version identifiers can be version numbers or version IDs, and the version identifiers are named as reportIDs. The reportID may be a string of numbers, which increases as the properties of the first electronic device change, i.e., a larger number of reportids indicates a newer property. The attribute values may include capability attributes of whether or not services such as connection, incoming call, notification, mouse, collaboration, sharing, screen-drop, etc. are supported.
After the second electronic device receives the attribute command sent by the first electronic device, it needs to first determine whether the reportID in the attribute command is 0. If yes, the step of S302 is performed, and if not, the step of S303 is performed. In some specific implementations, the reason for the reportID being 0 may be: the second electronic device has not previously received the reportID or the loss of the reportID of the first electronic device results in the reportID being recounted from 0.
It should be noted that the version identifier in the attribute instruction may also be a null identifier, i.e. the reportID has no number. In some specific implementations, the reason that the version identification is a null identification may be: the first electronic device is a lower-end device or an old device, and does not support the version identifier, so although the first electronic device sends the attribute instruction to the second electronic device, the first electronic device is the old device, and does not support the version identifier in the attribute instruction sent by the first electronic device, and the version identifier in the attribute instruction is an empty identifier at this time, then the step of S302 is also executed.
S302: the second electronic device sets the reportID and attribute value in the attribute instruction to the reportID and attribute value in the local cache attribute.
If the version identifier in the attribute instruction is 0, the second electronic device directly updates all the attributes in the attribute instruction received from the electronic device (i.e. the first electronic device) initiating the state message synchronization to the local cache attribute of the second electronic device, namely, the version identifier and the attribute value in the attribute instruction are set as the version identifier and the attribute value in the local cache attribute, and at the moment, the reportID in the local cache attribute of the second electronic device is the reportID in the attribute instruction sent by the first electronic device, namely, 0.
It should be noted that, if the version identifier in the attribute instruction is a null identifier, the second electronic device also updates all the attributes in the attribute instruction received from the first electronic device to the local cache attribute of the second electronic device, that is, sets the version identifier and the attribute value in the attribute instruction to the version identifier and the attribute value in the local cache attribute.
S303: and the second electronic equipment judges whether the attribute instruction has the attribute which needs to be subjected to subsequent data processing, and if so, the second electronic equipment executes S304.
The second electronic equipment searches in the received attribute instruction and judges whether the attribute changes so as to need the attribute of the subsequent data processing. If the attribute instruction has the attribute which needs to be processed by the subsequent data, executing the step S304; if the attribute instruction does not have the attribute which needs to be processed by the subsequent data, the second electronic device can determine that the received attribute instruction is an empty instruction, so that the subsequent step is directly finished, namely the attribute instruction is discarded.
S304: the second electronic device obtains the reportids corresponding to the attributes D1 and D1 in the attribute instruction.
Attribute D1 represents one attribute value in the attribute instruction and attribute D1 has a corresponding reportID. The second electronic device may sequentially compare the attribute D1 and its corresponding reportID in the attribute instruction with the attribute TD and its corresponding reportID in the local cache attribute of the second electronic device, so as to determine whether to update the attribute value in the local cache attribute of the second electronic device.
S305: the second electronic device obtains the local cache attribute TD and the reportID corresponding to the TD.
The second electronic device may obtain an attribute TD corresponding to the attribute D1 from the local cache attribute, where the attribute TD and the attribute D1 in the attribute instruction may represent the same type of attribute. Illustratively, attribute TD is not supporting the screen sharing function, and attribute D1 is supporting the screen sharing function. Further, the second electronic device may obtain a reportID of the attribute TD based on the attribute TD.
In some specific embodiments, the attribute TD may be a null attribute, although there may be an attribute TD in the local cache attribute of the second electronic device. In one possible implementation, the reason for the attribute TD being a null attribute may be: the second electronic device supports the version identification mode, but the attribute TD is not set, that is, the attribute TD is still factory set, so that the attribute TD is an empty attribute, and the reportID corresponding to the attribute TD cannot be obtained, and further the reportID corresponding to the attribute D1 in the attribute instruction cannot be compared with the reportID corresponding to the attribute TD in the local cache attribute of the second electronic device. Therefore, the operation of S306, that is, judging whether the attribute TD exists, is performed.
S306: the second electronic device determines whether the attribute TD exists, and if not, S307 is executed, and if yes, S308 is executed.
The second electronic device may determine whether the attribute TD in the local cache attribute of the second electronic device is a null attribute by determining whether the attribute TD exists. If the attribute TD does not exist, which means that the attribute TD in the second electronic device local cache attribute is an empty attribute, step S307 may be performed. If the attribute TD exists, indicating that the attribute TD in the second electronic device local cache attribute is not a null attribute, the step of S308 may be performed.
S307: the second electronic device stores the attribute D1 and the corresponding reportID in the cache.
If the attribute TD does not exist, it indicates that the attribute TD in the local cache attribute of the second electronic device is an empty attribute, and the second electronic device may directly store the attribute D1 and the corresponding reportID into the cache, that is, set the attribute D1 and the corresponding reportID in the attribute instruction to the attribute value and the reportID in the local cache attribute, thereby completing the data processing logic after receiving the data.
It should be noted that, since the attribute instruction may include a set of version identification reportID and attribute values and more than one set of version identification reportID and attribute values, if there are multiple sets of version identification reportID and attribute values in the attribute instruction, the operation of step S303 may be executed again after the step S307 is completed, that is, after the attribute D1 and the corresponding reportID are saved in the cache, that is, whether there is an attribute change in the attribute instruction, so that the attribute that needs to be processed by the subsequent data is continuously determined.
S308: the second electronic device determines whether the reportID corresponding to D1 is newer than the reportID corresponding to TD, if so, executes S309, otherwise, executes S303.
The second electronic device can obtain a comparison result by comparing the reportID corresponding to the attribute D1 with the reportID corresponding to the attribute TD in the attribute instruction. If the comparison result indicates that the reportID corresponding to the attribute D1 is later than the reportID corresponding to the attribute TD, the second electronic device updates the attribute TD and the reportID corresponding to the attribute TD to the attribute D1 and the reportID corresponding to the attribute D1, that is, the step S309 is executed. Otherwise, if the attribute in the attribute instruction is not updated, the step S303 may be executed again after discarding the attribute D1 and its corresponding reportID in the attribute instruction, that is, whether there is an attribute change in the attribute instruction, so that the attribute of the subsequent data processing is needed is continuously determined.
In some specific implementations, the reportID can be a string of numbers, with larger numbers of reportids indicating newer attributes D1. If the reportID corresponding to the attribute TD is smaller than the reportID corresponding to the attribute D1 in the attribute instruction, the attribute in the attribute instruction is updated, and the attribute in the attribute instruction and the reportID corresponding to the attribute are required to be stored; if the reportID corresponding to the attribute TD is greater than the reportID corresponding to the attribute D1 in the attribute instruction, it may be stated that the attribute in the attribute instruction is not updated, and the attribute and its corresponding reportID in the attribute instruction need to be discarded.
In other specific implementations, if the reportID corresponding to the attribute TD is smaller than the reportID corresponding to the attribute D1 in the attribute instruction and simultaneously satisfies that the reportID corresponding to the attribute D1 minus the reportID corresponding to the attribute TD in the attribute instruction is greater than 2147483647, it is indicated that the attribute in the attribute instruction has been updated, and the attribute in the attribute instruction and its corresponding reportID need to be saved; otherwise, it can be stated that the attribute in the attribute instruction is not updated, and the attribute in the attribute instruction and its corresponding reportID need to be discarded. It should be noted that 2147483647 is set by a person skilled in the art, and may be any other value, and the present application is not limited thereto.
It can be understood that other methods exist for comparing the reportID corresponding to the attribute D1 with the reportID corresponding to the attribute TD in the attribute instruction, which is not limited by the present application.
S309: the second electronic device updates the value of TD to be D1, and updates the reportID corresponding to TD to be the reportID corresponding to D1.
If the reportID corresponding to the attribute D1 is later than the reportID corresponding to the attribute TD, the attribute TD needs to be updated to the attribute D1 in the attribute instruction, and correspondingly, the version identifier reportID corresponding to the attribute TD is updated to the version identifier reportID corresponding to the attribute D1. At this time, the attribute stored in the second electronic device is the attribute D1 in the attribute instruction sent by the first electronic device.
It should be noted that the above steps may be applied not only to the second electronic device side, but also to the device cloud side when the first electronic device and the second electronic device perform far-field data transmission through both near-field transmission and device cloud based on the multi-channel communication method, that is, by this method, the attribute stored in the cloud cache attribute of the device cloud is the attribute D1 in the new attribute instruction sent by the first electronic device.
The application discloses a data processing method, which is characterized in that a second electronic device obtains a comparison result by comparing a version identifier in an attribute instruction with a version identifier in a local cache attribute. If the comparison result represents that the version identifier in the attribute instruction is later than the version identifier in the local cache attribute, the version identifier and the attribute value in the local cache attribute are updated into the version identifier and the attribute value in the attribute instruction. Therefore, the subsequent processing is carried out based on the attribute value corresponding to the latest version identifier, and the problem of cross-device data processing time sequence is solved.
Referring to fig. 4, the overall logic diagram of data processing according to an embodiment of the present application is applied to a data change scenario in multi-channel communication.
S401: the first electronic device loads the reportID.
The electronic equipment carries version identification reportID in the issued status message needing to be synchronized through near field communication, far field communication or multichannel communication.
Firstly, the first electronic device needs to load the version identification reportID, so that after the attribute of the first electronic device changes, the version identification reportID is carried in an attribute instruction sent by the first electronic device. It may be understood that the attribute refers to an attribute of whether the first electronic device supports services such as connection, incoming call, notification, mouse, collaboration, sharing, screen-casting, etc., and the attribute change may be, for example, an attribute that the first electronic device does not support connection changes to an attribute that supports connection services.
S402: the first electronic device registers a device cloud.
The device cloud is used as a cloud platform of the service apps and is a platform for providing infrastructure such as transmission, storage and presentation for each service App. The service App refers to an App capable of providing specific capabilities in an electronic device, such as an Android installation package (APK, androidPackage) of applications such as a super terminal, a super call, sharing, and the like.
The first electronic device and the second electronic device can register the device cloud to conduct message propagation based on near field communication, far field communication or a multi-channel communication method.
S403: the second electronic device registers a device cloud.
S404: the second electronic device serves APP initiation.
S405: the second electronic device subscribes to device attribute changes.
The second electronic equipment sends an instruction for subscribing the attribute change of the equipment to the equipment cloud, so that when the equipment cloud receives the attribute instruction sent by the first electronic equipment, the equipment cloud can send the attribute instruction to the second electronic equipment, and the second electronic equipment obtains the attribute change condition of the first electronic equipment, so that multi-equipment cooperation is realized.
S406: the first electronic device attribute changes.
The attribute of the first electronic device may change in response to an operation instruction of a user or a system upgrade of the first electronic device, or the like.
In some specific implementations, referring to fig. 5, a schematic diagram of a change in a property of a first electronic device according to an embodiment of the present application is shown. As can be seen from the existing collaboration property window 502 in fig. 5, when the user changes the existing collaboration property window 500 to modify the existing collaboration property, that is, after the user clicks the support plug-in 501, the display content in the existing collaboration property window 502 of the first electronic device is correspondingly changed from the existing collaboration property to be supported.
In other specific implementations, referring to fig. 6, a schematic diagram of another attribute change of a first electronic device according to an embodiment of the present application is shown. As can be seen from the existing connection attribute window 602 in fig. 6, when the user upgrades the existing system in the system upgrade window 600, that is, after the user clicks the plug-in 601, the display content in the existing connection attribute window 602 of the first electronic device is correspondingly changed from the existing connection attribute to support. It will be appreciated that the system upgrade may also be an automatic upgrade of the first electronic device.
It should be noted that there are other operations that may change the attribute of the first electronic device, and the present application is not limited to a specific operation method.
S407: the first electronic device assembles the attribute instructions.
After the attribute of the first electronic device changes, the first electronic device assembles the attribute instruction. The attribute instruction carries a version identification reportID and an attribute, wherein the attribute is characterized in an attribute value mode. Wherein the reportID may be a string of numbers, and as the attribute of the first electronic device changes, the number of reportID will also increase, i.e. a larger number of reportID indicates a newer attribute.
S408: the first electronic device sends attribute instructions.
The first electronic device sends the attribute instruction assembled in the step S407 to the device cloud, where the attribute instruction carries the version identifier reportID and the attribute value.
S409: and the equipment cloud sends the attribute instruction to the second electronic equipment.
Because the second electronic device sends the instruction for subscribing the attribute change of the device to the device cloud, the device cloud subscribes to the service for subscribing the attribute change of the device, and therefore after the first electronic device sends the attribute instruction to the device cloud, the device cloud sends the attribute instruction sent by the first electronic device to the second electronic device, and the attribute instruction also carries the version identification reportID and the attribute value.
S410: and the second electronic equipment receives the attribute instruction and executes the merging logic.
After the second electronic device obtains the attribute value and the version identifier reportID of the first electronic device forwarded by the device cloud, the second electronic device completes the data processing logic through the flow shown in fig. 3, which is not described herein again.
S411: and the equipment cloud receives the attribute instruction and executes the merging logic.
After the device cloud obtains the attribute value of the first electronic device and its version identifier reportID, the device cloud also completes the data processing logic through the flow shown in fig. 3.
It should be noted that, the second electronic device in step S410 receives the attribute instruction and executes the data processing logic, and the device cloud in step S411 receives the attribute instruction and executes the data processing logic, which are not consecutive when actually executing.
It can be understood that, besides the method that the device cloud and the second electronic device receive the attribute instruction at the same time and execute the merge logic, the device cloud may execute the merge logic after receiving the attribute instruction first, and then send the merged result to the second electronic device, that is, after receiving the attribute instruction sent by the first electronic device, the device cloud compares the version identifier in the attribute instruction with the version identifier in the cloud cache attribute of the device cloud to obtain a comparison result; if the version identification in the comparison result representation attribute instruction is later than the version identification in the cloud cache attribute, the equipment cloud updates the version identification and the attribute value in the cloud cache attribute into the version identification and the attribute value in the attribute instruction, and sends the updated version identification and the updated attribute value in the cloud cache attribute to the second electronic equipment.
The application provides a data processing method, after the attribute of a first electronic device changes, the first electronic device assembles an attribute instruction, wherein the attribute instruction comprises a version identifier and an attribute value, and the first electronic device sends the attribute instruction to a device cloud. After the device cloud responds to an instruction of subscribing the change of the device attribute sent by the second electronic device and sends the attribute instruction to the second electronic device, the device cloud and the second electronic device perform data processing, namely, the latest version identification and the attribute value are stored in the device cloud and the local cache attribute of the second electronic device. Therefore, the device cloud and the second electronic device solve the problem of cross-device data processing time sequence by comparing the version identifier in the attribute instruction sent by the first electronic device with the new version identifier corresponding to the local cache attribute of the device cloud and the second electronic device.
Referring to fig. 7, the overall logic diagram of another data processing provided in an embodiment of the present application is applied to a field communication attribute acquisition scenario.
S701: and the second electronic equipment sends an acquisition instruction.
If the first electronic device and the second electronic device perform near field communication in a bluetooth mode or the like, the second electronic device may directly send an instruction for acquiring the device attribute of the first electronic device, that is, an acquisition instruction, to the first electronic device, so as to directly acquire the attribute of the first electronic device.
S702: the first electronic device assembles the attribute instructions.
After the first electronic device receives the acquisition instruction sent by the second electronic device, the first electronic device assembles an attribute instruction, wherein the attribute instruction carries a version identification reportID and an attribute, and the attribute is characterized in an attribute value mode. Wherein the reportID may be a string of numbers, and as the attribute of the first electronic device changes, the number of reportID will also increase, i.e. a larger number of reportID indicates a newer attribute.
S703: the second electronic device obtains the attribute instructions and executes the merge logic.
Since the second electronic device sends the acquisition instruction to the first electronic device, after the first electronic device assembles the attribute instruction, the second electronic device can acquire the attribute instruction, and the attribute instruction carries the reportID and the attribute value.
After the second electronic device obtains the reportID and the attribute value of the first electronic device, the second electronic device completes the data processing logic through the flow shown in fig. 3, which is not described herein again.
The application provides a data processing method, wherein a first electronic device responds to an acquisition instruction assembly attribute instruction sent by a second electronic device to the first electronic device, and after the second electronic device acquires the attribute instruction of the first electronic device, the second electronic device stores the latest version identification and attribute value into a local cache attribute of the second electronic device based on data processing logic. Therefore, the second electronic device solves the problem of cross-device data processing time sequence by comparing the version identifier in the attribute instruction with the new version identifier corresponding to the local cache attribute of the second electronic device.
In some possible implementations, the reportID is a string of numbers, and as the attribute of the first electronic device changes, the number of the version number increases. It should be noted that, the reportID update may be based on an operation instruction of a user, or may be based on automatic system upgrade of the first electronic device, and the present application is not limited to a specific update method.
Referring to fig. 8, the flowchart of a method for obtaining the latest reportID provided by the embodiment of the present application is applied to a side for initiating status message synchronization, that is, to a first electronic device. The method comprises the following steps:
s801: the first electronic device determines whether the reportID (a) exists in the memory, and if not, executes S802, if so, executes S803.
The version identifier reportID, reportID (A) is named reportID, reportID (A) in the memory and is increased along with the attribute change of the first electronic device. For example, if the version number reportID is updated to 20 at this time, then reportID (a) is 20 at this time, and as the attribute of the first electronic device changes, the version number reportID is updated to 50 at this time, then reportID (a) is 50 at this time.
Whether the first electronic equipment performs near field communication, far field communication or multichannel communication, the issued attribute instructions needing to be synchronized all carry reportID so as to achieve the effects of attribute reporting, event reporting or method response. When the first electronic device is started, the first electronic device judges whether the reportID (A) exists in the memory or not by reading the version identification reportID (A) in the memory. In one possible implementation, the reason that reportID (a) does not exist may be: the first electronic device, although supporting version identification, has no property set, and therefore, reportID (a) does not exist. Therefore, if the electronic device cannot read the reportID (a) in the memory, it indicates that the reportID (a) in the memory does not exist, and the reportID (a) needs to be made to exist, that is, the step of S802 is performed; if the electronic device can read the reportID (a) in the memory, it indicates that the reportID (a) in the memory exists, and step S803 is performed.
S802: the first electronic device writes reportID (B) =1000 to the cache.
The reportID (B) refers to the upper limit available for version reportID counting in the current cache. Illustratively, since the number of reportids increases as the properties of the first electronic device change, if reportID (B) =100, reportID (a) =20, then the number of subsequent reportids can only increase from 20 to 100. If reportID (B) =1000, reportID (a) =20, then the number of the subsequent reportID can only be increased from 20 to 1000.
If the first electronic device cannot read the reportID (a) in the memory, which means that the reportID (a) in the memory does not exist, that is, the reportID is not stored in the memory, the reportID (a) needs to exist, so that the attribute instruction issued by the first electronic device can carry the reportID. Thus, the upper limit of the version numbers available in memory, i.e. reportID (B), needs to be set so that reportID (a) can be counted starting from 1, i.e. the first electronic device version identification reportID is given.
In some specific implementations, reportID (B) =1000 may be written to the cache, i.e. the upper limit available for the current cache is set to 1000. After writing reportID (B) =1000 to the cache, since there is no reportID (a) in the memory at this time, reportID (a) can be counted from 1, i.e., reportID (a) =1 in the memory.
Note that, in the present application, only the reportID (B) =1000 is taken as an embodiment, and the reportID (B) may be set to 2000, 5000, etc. in actual use, and the present application is not limited to the specific reportID (B).
S803: the first electronic device writes the reportID (B) +=1000 to the cache.
The reportID (B) +=1000 means reportID (B) =reportid (B) +1000, i.e., an operation of adding 1000 on the basis of the original reportID (B) itself, i.e., adding 1000 on the basis of the upper limit available for the current cache. Illustratively, if reportID (B) =100 before the step of S803 is performed, reportID (B) =1100 after the step of S803 is performed. The purpose of this is to: since the first electronic device determines that the reportID (a) exists in the memory, that is, the version identifier is already stored in the memory, then, since the version identifier can be updated based on the operation instruction of the user and the method such as automatic system upgrade of the first electronic device, a side of initiating the synchronization of the status message, that is, a side of the first electronic device, needs to increase the upper limit of available cache on the basis of the original reportID (B) itself in order to avoid frequent refreshing, so that the reportID (a) can store more values, that is, the first electronic device can update the attribute more times.
It will be appreciated that 1000 represents an increment value written to persistent storage per update, and the application is not limited to a particular increment value. For ease of understanding, the following description will be given with an increment value of 1000.
After writing reportID (B) +=1000 to the cache, reportID (a) =reportid (B) -1000 in memory, i.e. reportID (a) is equal to the original reportID (B) before adding 1000 itself.
S804: the first electronic device maintains a reportID (a) in memory.
In response to an action sent by the second electronic device or the device cloud to acquire the reportID, the first electronic device maintains the reportID in memory (a). In-memory maintenance is to avoid the problems of reduced lifetime and time consumption caused by the need for adaptive write storage for each change in value. It will be appreciated that the step of S804 may not be performed if the problems of reduced storage life and time consumption are not considered.
In some specific implementations, the first electronic device maintains in memory that the triggered action is reportID (a) =reportid (a) +1, i.e. an operation that increases 1 on the original reportID (a) itself. Thus, the storage can be adaptively written once every two value changes, thereby increasing the lifetime of the storage.
It will be appreciated that the value may be other values, such as 4, etc., i.e., the value is adaptively written to memory once every five changes, and the application is not limited to a particular value.
S805: the first electronic device makes reportID (C) =reportid (a).
The reportID (C) refers to a reportID of a second electronic device or device cloud interacting with a first electronic device. The first electronic device assigns the maintained value of reportID (a) to reportID (C) and returns reportID (C) to the second electronic device or device cloud. Thereafter, the second electronic device or device cloud may complete the operations shown in FIG. 3, i.e., execute the data processing logic.
Through the steps of S801-S805, the first electronic device has sent the updated reportID to the second electronic device or device cloud. But the first electronic device also needs to perform S806 and subsequent steps in preparation for the next time the first electronic device sends a reportID to the second electronic device or device cloud.
S806: the first electronic device determines whether the reportID (a) after maintenance is greater than 4294967000, if so, S807 is executed, and if not, S808 is executed.
4294967000 the upper limit of storing reportids, i.e. the first threshold. When the reportID (a) reaches the first threshold, the upper limit of storing the reportID is reached, and the reportID count cannot be increased any more, and the version number needs to be increased again from the minimum value 1, so that a jump is involved. It should be noted that, the threshold value 4294967000 of the inversion is set by a person skilled in the art, and may be other values, and the present application is not limited to a specific maximum value.
The first electronic device determines whether the reportID (a) maintained in the memory reaches the inverted threshold 4294967000, if so, S807, and if not, S808.
It will be appreciated that to avoid the problem of reduced lifetime and time consuming storage due to the adaptive writing of each value change, it can also be determined whether the reportID (a) +1 after maintenance is greater than 4294967000.
S807: after the first electronic device sets reportID (a) =1, reportID (B) =0, the operation of S813 is performed.
The reportID (a) in step S807 is a new reportID (a) that starts counting again after the reportID (a) is inverted until the threshold value of inversion is reached.
If the maintained reportID (a) is greater than 4294967000, i.e., the threshold value of the rollover is reached, then the reportID (a) needs to be flipped, the reportID (a) =1 is restarted, i.e., counting is restarted, and the reportID (B) is updated to 0. Subsequently, the operation of S813 is performed.
S808: the first electronic device sets reportID (a) =reportid (a) +1, reportID (B) unchanged.
If reportID (a) +1 is not greater than 4294967000, i.e., the flipped threshold is not reached, reportID (a) =reportid (a) +1, reportID (B) is unchanged, i.e., reportID (a) continues counting, and the operation of S809 is performed.
S809: the first electronic device determines whether reportID (B) -reportID (a) is less than 100, if so, performs S810, and if not, performs S811.
Since reportID (B) refers to the upper limit of the count available for the current cache, when reportID (B) -reportID (a) <100, i.e., less than the second threshold, it means that the count space available for the current cache is already very small, and the upper limit available for the current cache needs to be increased. For example, if reportID (B) =1000 and reportID (a) =901, then the count space available for the current buffer is only reportID (B) -reportID (a) =1000-901=99, i.e. only reportID (a) is allowed to change 99 times again, the count space available for the current buffer is already very small, and the upper limit available for the current buffer needs to be increased.
It will be appreciated that the reason for selecting the second threshold value to be 100 is that: 100 is 10% of the increment 1000 written to persistent storage per update, and the available space needs to be increased when reportID (B) -reportID (a) < 100. The second threshold may be another value, for example, 50, 150, etc., and the present application is not limited to the specific second threshold.
S810: the first electronic device determines whether the reportID (B) is greater than 4294967000, if so, then S812 is executed, and if not, S813 is executed.
When the reportID (B) reaches the threshold 4294967000 for flipping, that is, when the reportID (B) reaches the first threshold, the upper limit of storing the reportID is reached, and the reportID cannot be increased any more, the reportID (a) needs to be increased again from the minimum value 1, and therefore, a jump is involved.
The first electronic device determines whether the reportID (B) maintained in the memory reaches the inverted threshold 4294967000, if yes, S812 is executed, and if not, S813 is executed.
It will be appreciated that, similar to reportID (a), to avoid the problem of reduced lifetime and time consuming storage due to the adaptive writing of each value change, it is also possible to determine whether the reportID (B) +1 after maintenance is greater than 4294967000.
S811: the first electronic device maintains a reportID (a) in memory.
If the first electronic device determines that the reportID (B) -reportID (a) is not less than 100, it indicates that the count space available for the current buffer of the first electronic device is still relatively large, so that the counting can be continued, and therefore, the reportID (a) needs to be maintained in the memory.
In some specific implementations, the first electronic device maintains in memory that the triggered action is reportID (a) =reportid (a) +1, i.e. an operation that increases 1 on the original reportID (a) itself. Thus, the storage can be adaptively written once every two value changes, thereby increasing the lifetime of the storage.
S812: the first electronic device maintains a reportID (a) =1 and a reportID (B) =0 in memory.
The first electronic device maintains the triggered action in memory as setting reportID (a) =1, reportID (B) =0. I.e. flipping the reportID (B), re-counting reportID (a) =1, i.e. restarting counting, and updating reportID (B) to 0.
S813: the first electronic device writes the reportID (B) +=1000 to the cache.
reportID (B) +=1000 means reportID (B) =reportid (B) +1000, i.e. an operation of adding 1000 more on the basis of reportID (B) itself, i.e. adding 1000 on the basis of the upper limit available for the current cache.
Referring to fig. 9, a third overall logic diagram of data processing according to an embodiment of the present application is applied to a re-registration scenario of multi-channel communication. It should be noted that the steps S901 to S905 are the same as the steps S401 to S405, and are not described here again.
S901: the first electronic device loads the reportID.
S902: the first electronic device registers a device cloud.
S903: the second electronic device registers a device cloud.
S904: the second electronic device APP is started.
S905: the second electronic device subscribes to device attribute changes.
S906: the first electronic device resumes factory or reportID loss.
And in the factory restoration step, the system of the first electronic equipment is restored to a factory-leaving state, all user software is deleted, the system data is restored to a default, and the version identifier reportID is an empty identifier.
In some embodiments, if the version identification reportID of the first electronic device is stored in error, the version identification reportID may be lost. In other specific embodiments, if the first electronic device sets a password at the time of version identification reportID storage, however, loss or corruption of the key may result in loss of the reportID. It should be noted that there are various ways that the version identifier reportID may be lost, and the present application is not limited to the specific loss reason.
S907: the first electronic device re-registers the device cloud.
The reportID needs to be persisted on the electronic device and when the first electronic device resumes factory settings or the reportID is lost, the first electronic device needs to re-register the device cloud. The purpose of persistent storage is to solve the problem that the version identification reportID is returned to 1 and then used after being restarted every time the first electronic device is powered off.
S908: the device cloud resets the locally stored reportID to 0.
After the device cloud receives an instruction of re-registering the device cloud by the first electronic device, triggering version identification reportID stored locally by the device cloud to clear, and updating the corresponding attribute value to a default attribute value. The purpose of clearing the version identification reportID is to avoid that when the first electronic device side re-counts, the reportID of the cloud is larger than the reportID of the first electronic device side, so that the device cloud considers that the reportID sent by the first electronic device side is old data and discards the old data.
S909: the device cloud sends a device registration message to the second electronic device.
Because the second electronic device subscribes to the device attribute change service with the device cloud, when the first electronic device re-registers the device cloud, the device cloud may send a device registration message to the second electronic device.
S910: the second electronic device resets the locally stored reportID to 0.
After the second electronic device receives the device registration message of the first electronic device, the second electronic device resets the locally stored reportID to 0, and updates the corresponding attribute value to a default attribute value.
The application provides a data processing method, when a first electronic device resumes factory leaving or a reportID is lost, the first electronic device sends an instruction for equipment re-registration to a device cloud, the device cloud resets a locally stored reportID to 0 in response to the equipment re-registration instruction, and sends the equipment re-registration instruction to a second electronic device so that the second electronic device resets the locally stored version identifier reportID to 0. Therefore, under the scene that the first electronic equipment re-registers the equipment cloud, data processing of the cross equipment can be completed.
Referring to fig. 10, the overall logic diagram of a fourth data processing provided by an embodiment of the present application is applied to a device logout scenario of multi-channel communication. It should be noted that the steps S1001 to S1005 are the same as the steps S401 to S405, and will not be described here again.
S1001: the first electronic device loads the reportID.
S1002: the first electronic device registers a device cloud.
S1003: the second electronic device registers a device cloud.
S1004: the second electronic device APP is started.
S1005: the second electronic device subscribes to device attribute changes.
S1006: the first electronic device sends a device logout instruction.
And responding to the logout operation of the first electronic equipment end, and sending an instruction of device logout to the equipment cloud by the first electronic equipment.
S1007: the device cloud deletes the device information and reportID.
After the device cloud receives a device logout instruction sent by the first electronic device to the device cloud, the device cloud deletes the device information and version identification reportID of the first electronic device stored in the device cloud, and updates the corresponding attribute value to a default attribute value.
S1008: the device cloud sends a device logoff message.
Because the second electronic device subscribes to the device attribute change service from the device cloud, after the first electronic device sends a device logout instruction to the device cloud, the device cloud can send a device logout message to the second electronic device.
S1009: the second electronic device deletes the device information and reportID.
After the second electronic device receives the device logout message of the first electronic device, the second electronic device deletes the device information and version identifier reportID of the first electronic device stored in the second electronic device, and updates the corresponding attribute value to a default attribute value.
The application provides a data processing method, when a first electronic device is logged off, the first electronic device sends a device logging-off instruction to a device cloud, the device cloud responds to the device logging-off instruction to delete the device information and reportID of the first electronic device, and sends the device logging-off instruction to a second electronic device, and the second electronic device responds to the device logging-off instruction to delete the device information and reportID of the first electronic device. Therefore, under the scene that the first electronic equipment is logged off, data processing can be completed in a cross-equipment mode.
Embodiments of the present application also provide a computer readable storage medium having stored therein a computer program or instructions which, when executed, implement the functions or steps performed by the electronic device 100 in the above-described method embodiments.
Another embodiment of the application also provides a computer program product containing instructions. The computer program product, when run on a computer or processor, causes the computer or processor to perform one or more steps of any of the methods described above.

Claims (13)

1. A data processing system, the data processing system comprising: the first electronic device and the second electronic device;
the first electronic device is configured to send an attribute instruction to the second electronic device, where the attribute instruction includes a version identifier and an attribute value;
and the second electronic device is used for comparing the version identifier in the attribute instruction with the version identifier in the local cache attribute to obtain a comparison result, and if the comparison result represents that the version identifier in the attribute instruction is later than the version identifier in the local cache attribute, updating the version identifier and the attribute value in the local cache attribute into the version identifier and the attribute value in the attribute instruction.
2. The system of claim 1, wherein the data processing system further comprises: a device cloud;
the first electronic device is used for sending the attribute instruction to the device cloud;
And the equipment cloud is used for sending the attribute instruction to the second electronic equipment.
3. A data processing system, the data processing system comprising: the device comprises a first electronic device, a device cloud and a second electronic device;
the first electronic device is configured to send an attribute instruction to the device cloud, where the attribute instruction includes a version identifier and an attribute value;
the device cloud is used for comparing the version identifier in the attribute instruction with the version identifier in the cloud cache attribute of the device cloud to obtain a comparison result, and if the comparison result represents that the version identifier in the attribute instruction is later than the version identifier in the cloud cache attribute of the device cloud, the version identifier and the attribute value in the cloud cache attribute of the device cloud are updated into the version identifier and the attribute value in the attribute instruction; transmitting the version identification and the attribute value in the cloud cache attribute updated by the equipment cloud to the second electronic equipment;
and the second electronic device is used for updating the version identifier and the attribute value in the local cache attribute of the second electronic device into the version identifier and the attribute value in the cloud cache attribute after the cloud update of the device.
4. A data processing method, applied to a second electronic device, the method comprising:
receiving an attribute instruction sent by first electronic equipment, wherein the attribute instruction comprises a version identifier and an attribute value;
comparing the version identifier in the attribute instruction with the version identifier in the local cache attribute to obtain a comparison result;
and if the comparison result represents that the version identifier in the attribute instruction is later than the version identifier in the local cache attribute, updating the version identifier and the attribute value in the local cache attribute into the version identifier and the attribute value in the attribute instruction.
5. The method of claim 4, wherein said comparing the version identification in the attribute instruction with the version identification in the local cache attribute comprises:
judging whether the version identifier in the attribute instruction is 0;
and if the version identifier in the attribute instruction is not 0, comparing the version identifier in the attribute instruction with the version identifier in the local cache attribute.
6. The method of claim 5, wherein the method further comprises:
and if the version identifier in the attribute instruction is 0, setting the version identifier and the attribute value in the attribute instruction as the version identifier and the attribute value in the local cache attribute.
7. The method of claim 4, wherein said comparing the version identification in the attribute instruction with the version identification in the local cache attribute comprises:
judging whether the version identifier and the attribute value in the local cache attribute exist or not;
and if the version identifier in the local cache attribute and the attribute value exist, comparing the version identifier in the attribute instruction with the version identifier in the local cache attribute.
8. The method of claim 7, wherein the method further comprises:
and if the version identifier and the attribute value in the local cache attribute do not exist, setting the version identifier and the attribute value in the attribute instruction as the version identifier and the attribute value in the local cache attribute.
9. The method of claim 4, wherein the attribute instructions comprise device logout instructions;
the updating the version identifier and the attribute value in the local cache attribute to the version identifier and the attribute value in the attribute instruction comprises the following steps:
and deleting the version identifier in the local cache attribute, and updating the attribute value into a default attribute value.
10. The method of claim 4, wherein the attribute instructions comprise device re-registration instructions;
The updating the version identifier and the attribute value in the local cache attribute to the version identifier and the attribute value in the attribute instruction comprises the following steps:
and updating the version identifier in the local cache attribute to 0, and updating the attribute value to a default attribute value.
11. A data processing method, applied to a device cloud, the method comprising:
receiving an attribute instruction sent by first electronic equipment, wherein the attribute instruction comprises a version identifier and an attribute value;
comparing the version identifier in the attribute instruction with the version identifier in the cloud cache attribute to obtain a comparison result;
if the comparison result represents that the version identifier in the attribute instruction is later than the version identifier in the cloud cache attribute, updating the version identifier and the attribute value in the cloud cache attribute into the version identifier and the attribute value in the attribute instruction;
and sending the version identification and the attribute value in the updated cloud cache attribute to second electronic equipment.
12. An electronic device comprising a processor and a memory;
the memory is used for storing computer execution instructions;
the processor configured to execute computer-executable instructions stored in the memory, such that the processor performs the method of any one of claims 4-11.
13. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program or instructions, which when executed, implement the method of any of claims 4-11.
CN202310125219.3A 2023-01-19 2023-01-19 Data processing system, method, electronic equipment and medium Pending CN117118840A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310125219.3A CN117118840A (en) 2023-01-19 2023-01-19 Data processing system, method, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310125219.3A CN117118840A (en) 2023-01-19 2023-01-19 Data processing system, method, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN117118840A true CN117118840A (en) 2023-11-24

Family

ID=88793537

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310125219.3A Pending CN117118840A (en) 2023-01-19 2023-01-19 Data processing system, method, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN117118840A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1283485A1 (en) * 2001-08-08 2003-02-12 Océ-Technologies B.V. Entry of physical documents in a digital back-end system
US20070169104A1 (en) * 2005-12-08 2007-07-19 Konica Minolta Business Technologies, Inc. Data processing apparatus
CN104023050A (en) * 2014-05-16 2014-09-03 中国科学院计算技术研究所 Equipment cooperation multi-screen interactive system under equipment cloud environment and method thereof
CN105766008A (en) * 2013-09-13 2016-07-13 丰田自动车株式会社 Communication system
CN110248395A (en) * 2019-05-07 2019-09-17 腾讯科技(深圳)有限公司 Wireless network access method, device, storage medium and computer equipment
CN114816463A (en) * 2021-01-28 2022-07-29 华为技术有限公司 Upgrade prompting method, terminal device and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1283485A1 (en) * 2001-08-08 2003-02-12 Océ-Technologies B.V. Entry of physical documents in a digital back-end system
US20070169104A1 (en) * 2005-12-08 2007-07-19 Konica Minolta Business Technologies, Inc. Data processing apparatus
CN105766008A (en) * 2013-09-13 2016-07-13 丰田自动车株式会社 Communication system
CN104023050A (en) * 2014-05-16 2014-09-03 中国科学院计算技术研究所 Equipment cooperation multi-screen interactive system under equipment cloud environment and method thereof
CN110248395A (en) * 2019-05-07 2019-09-17 腾讯科技(深圳)有限公司 Wireless network access method, device, storage medium and computer equipment
CN114816463A (en) * 2021-01-28 2022-07-29 华为技术有限公司 Upgrade prompting method, terminal device and computer readable storage medium

Similar Documents

Publication Publication Date Title
WO2021052437A1 (en) Application start method and electronic device
WO2021121052A1 (en) Multi-screen cooperation method and system, and electronic device
CN108684206B (en) Searching method and device
CN115023935B (en) Application display connection method, terminal equipment and storage medium
EP3409073B1 (en) Method and electronic device for providing tethering service
CN114968384B (en) Function calling method and device
CN116974634A (en) Peripheral control method, electronic equipment and system
CN114630313A (en) Communication method and device
KR20180110517A (en) An elelctronic device and a coverrage compensation method for a shortrange communication in the elelctronic device
CN113608753A (en) Application uninstalling method, application recovery method, electronic device and storage medium
CN117118840A (en) Data processing system, method, electronic equipment and medium
CN113452776A (en) PaaS platform service scheduling method and device and PaaS platform
CN116700660B (en) Audio playing method and electronic equipment
CN116627476B (en) Firmware updating method, system, electronic equipment and storage medium
CN116841686B (en) Application page display method
WO2024109484A1 (en) Application migration method and electronic device
WO2023061014A1 (en) Task management method and apparatus
CN110019629B (en) Map snapshot method and intelligent terminal
CN118119923A (en) Cross-device interaction method for cards and electronic device
CN115221096A (en) Terminal control method, terminal control device, storage medium, and electronic apparatus
CN117724825A (en) Interface display method and electronic equipment
CN117707662A (en) Interface display method and electronic equipment
CN115250261A (en) Information display method and electronic equipment
CN117632534A (en) Inter-process communication method and electronic equipment
CN116700738A (en) Application management method, electronic equipment and system

Legal Events

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