WO2023061357A1 - Data processing method, related apparatus, and communication system - Google Patents

Data processing method, related apparatus, and communication system Download PDF

Info

Publication number
WO2023061357A1
WO2023061357A1 PCT/CN2022/124595 CN2022124595W WO2023061357A1 WO 2023061357 A1 WO2023061357 A1 WO 2023061357A1 CN 2022124595 W CN2022124595 W CN 2022124595W WO 2023061357 A1 WO2023061357 A1 WO 2023061357A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
type
configuration file
body temperature
display
Prior art date
Application number
PCT/CN2022/124595
Other languages
French (fr)
Chinese (zh)
Inventor
刘江明
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023061357A1 publication Critical patent/WO2023061357A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H15/00ICT specially adapted for medical reports, e.g. generation or transmission thereof

Definitions

  • the present application relates to the technical field of terminals, and in particular to a data processing method, a related device and a communication system.
  • This application provides a data processing method, a related device and a communication system.
  • the method defines the data collected by the data collection device according to the rules of the data dictionary, and the codes of different types of data access data display devices, cloud servers and third-party applications can be reused. This can reduce the workload of developers when generating new types of data access data display devices, cloud servers and third-party applications, and improve the efficiency of data access.
  • the present application provides a data processing method.
  • a first device receives first data from a first data collection device.
  • the first data includes a first data identifier and a first sample value of the first type of data, and conforms to the rules of the first configuration file.
  • a first profile is defined according to a first rule.
  • the first configuration file may include a first data identifier, the first data identifier may be used to identify the first type of data, and the first data identifier is unique among the data identifiers defined according to the first rule.
  • the first device may identify that the first data belongs to the first type of data according to the first data identifier and the first configuration file.
  • the above-mentioned first rule includes the definition and description of one or more of attributes such as data identification, data name, data storage method, and data processing method. That is, the first rule can be used to provide a unified definition method for different types of data.
  • the above data identifiers defined according to the first rule are unique among all the data identifiers defined according to the first rule and do not conflict with each other.
  • the above-mentioned first rule may be a rule of a data dictionary.
  • the first configuration file may include data type definition rules for the first type of data.
  • the data type definition rule may include the above-mentioned first data identifier.
  • the above-mentioned first data conforms to the rules of the first configuration file, and specifically may be a data type definition rule conforming to the above-mentioned first type of data.
  • the data type definition rules for the above-mentioned first type of data may be solidified in the first data collection device.
  • the first data collection device can associate the first data identifier with the first sampling value according to the data type definition rule of the first type of data, obtain the above-mentioned first data, and send the The first device sends first data.
  • the first device may receive the second data from the second data collection device, the second data includes the second data identifier and the second sampled value of the second type of data, and conforms to the first
  • the rules of the second configuration file is defined according to the first rule
  • the second configuration file contains the second data identifier
  • the second data identifier is used to identify the second type of data
  • the second data identifier is in accordance with the first rule Unique within the defined data ID.
  • the first device may identify that the second data belongs to the second type of data according to the second data identifier and the second configuration file.
  • the program for identifying the first data in the first device is the same as the program for identifying the second data.
  • the program for identifying data in the first device is the code for identifying data.
  • the above-mentioned first configuration file and the above-mentioned second configuration file may be two different configuration files. That is, each type of data defined according to the rules of the data dictionary can correspond to a configuration file.
  • the above-mentioned first configuration file and the above-mentioned second configuration file may also be different parts of one configuration file. That is, the definition content corresponding to each type of data defined according to the rules of the data dictionary can be written into a configuration file.
  • the first device can identify the newly added type of data by using the program for identifying existing types of data. This can reduce the workload of developers during the process of data collected by the data collection device being connected to the first device, and improve the efficiency of data connection.
  • the first configuration file may further include a fusion strategy for the first type of data.
  • a fusion strategy for the first type of data For example, multi-source fusion strategy and homologous fusion strategy.
  • the first device may, according to the multi-source fusion policy defined in the configuration file of this type of data, The data collected by different data collection devices is used for data fusion.
  • the above-mentioned first sampling value is collected by the first data collection device at the first time.
  • the first device also receives M sample values of the first type of data, and the M sample values are respectively collected by M data collection devices at the first time.
  • M is a positive integer.
  • the first device determines from the first configuration file that the data fusion strategy for the first type of data is the first fusion strategy, and determines a sampling value from the first sampling value and M sampling values according to the first fusion strategy as the first
  • the sampling value of type data at the first time; the first fusion strategy is any of the following: take the maximum value, take the minimum value, take the earliest value stored in the first device, and take the latest time stored in the first device.
  • the first device can The same-source fusion strategy defined in the configuration file performs data fusion on multiple data collected by the same data collection device.
  • the second configuration file may further include a fusion strategy for the second type of data.
  • the first device may also perform data fusion on the sampled values of the second type of data according to the fusion policy in the second configuration file. It can be understood that since the above-mentioned first type of data and the above-mentioned second type of data are both defined according to the rules of the data dictionary and have different data identifiers, when the fusion strategy of the first type of data is the same as the fusion strategy of the second type of data , the first device may call the same program for performing data fusion to perform data fusion on the first type of data and the second type of data. That is, the program for data fusion of different types of data defined according to the rules of the data dictionary can be reused. This can reduce the workload of developers and improve the efficiency of data access to the first device.
  • the first configuration file may further include statistics policies for the first type of data.
  • the first device may perform data statistics on sampling values of a type of data within a period of time according to a statistical strategy defined in a configuration file of the type of data.
  • the first device may determine from the first configuration file that the data statistics strategy of the first type of data is the first statistics strategy, and the first statistics strategy includes one or more of the following: calculating the maximum value, calculating the minimum value, and calculating the average value , sum, calculate variance, calculate the number of sampled values, determine the sampled value with the latest acquisition time.
  • the first device may perform data statistics on N sampling values of the first type of data collected within the first time period according to the first statistical strategy, where N is a positive integer.
  • the second configuration file may also include statistics policies for the second type of data. It can be understood that since the above-mentioned first type of data and the above-mentioned second type of data are both defined according to the rules of the data dictionary and have different data identifiers, when the statistical strategy of the first type of data is the same as the statistical strategy of the second type of data , the first device may invoke the same program for performing data statistics to perform data statistics on the first type of data and the second type of data. That is, the program used to perform data statistics on different types of data defined according to the rules of the data dictionary can be reused. This can reduce the workload of developers and improve the efficiency of data access to the first device.
  • the above-mentioned first type of data may be single point data.
  • Single-point data can mean that the data collection device collects only one type of data when collecting data at a time.
  • heart rate data, body temperature data, and weight data are all single-point data.
  • Single point data can contain a field.
  • heart rate data includes a field called heart rate.
  • Single-point data can have data identifiers. Fields contained in single-point data can have field identifiers.
  • the above-mentioned first data identifier used to identify the first type of data may be the data identifier of the first type of data as the single-point data, or may also be a field of a field contained in the first type of data logo.
  • the above-mentioned first type of data may be a field in multipoint data.
  • Multi-point data can mean that the data collection equipment can obtain multiple types of data at a time for data collection.
  • blood pressure data is multi-point data.
  • Multipoint data can contain multiple fields.
  • blood pressure data can contain two fields: diastolic, systolic.
  • Multipoint data can have data identifiers. Each field included in the multi-point data can have a different field identifier.
  • the above-mentioned first data identifier used to identify the first type of data may be a field identifier.
  • the data acquisition device may also use the data identifier of the multi-point data, the field identifiers of the multiple fields contained in the multi-point data, and the The sampled values of the multiple fields are sent to the first device.
  • the first device includes a display device
  • the first configuration file includes a first display strategy for the first type of data
  • the first display strategy includes one or more of the following: a first display form , the first display position.
  • the first device may display the received sampling value of the first type of data on the first user interface according to the first display strategy through the above display means.
  • the second configuration file includes a second display strategy for the second type of data, and the second display strategy is the same as the first display strategy.
  • the first device may also use the display device to display the sampled value of the second type of data received on the second user interface according to the first display strategy; wherein, it is used to display the sampled value of the first type of data according to the first display strategy
  • the procedure for is the same as the procedure for displaying the sampled values of the second type of data according to the first display strategy.
  • the above-mentioned first display form is a line chart, and the first device may invoke the same program for drawing a line chart to draw the sampled values of the first type of data and the sampled values of the second type of data.
  • the first configuration file further includes first description information of the first type of data.
  • the first description information may be, for example, the name of the first type of data.
  • the first device may send third data to the cloud server, where the third data includes first description information and sampling values of the first type of data.
  • the cloud server can store the above third data. In this way, the first type of data cloud synchronization can be realized.
  • the second configuration file further includes second description information of the second type of data.
  • the second description information may be, for example, the name of the second type of data.
  • the first device may send data including the second description information and sampled values of the second type of data to the cloud server.
  • the cloud server may store sampled values of the second type of data.
  • the first device can send the above-mentioned third data and the above-mentioned 2.
  • Data describing the information and sampled values of the second type of data That is to say, when a new type of data is generated, the developer does not need to additionally develop a data interaction interface in the first device suitable for accessing the new type of data to the cloud server. This can reduce the workload of developers when adding new types of data to the cloud server, and improve the efficiency of data access.
  • a first application is installed on the first device, the first application has permission to obtain the first type of data, and the first configuration file includes first description information of the first type of data.
  • the first device may provide the fourth data to the first application in response to the first application's request for the first type of data.
  • the fourth data includes the first description information and sample values of the first type of data.
  • the above-mentioned first application program has permission to obtain the first type of data.
  • the second configuration file includes second description information of the second type of data.
  • the first device may provide data including the second description information and the sampled value of the second type of data to the first application program in response to the first application program's request for acquiring the first type of data.
  • the first device can provide the first application program with the above-mentioned fourth data and the The second description information and the data of the sampling value of the second type of data. That is to say, when a new type of data is generated, the developer does not need to additionally develop a data opening interface in the first device suitable for opening the newly added type of data to the first application program. This can reduce the workload of the developer when the new type of data is opened to the first application program, and improve the efficiency of data access.
  • the first device is a cloud server.
  • the cloud server may send fifth data to the data display device, where the fifth data includes the first data identifier and the sampling value of the first type of data. That is to say, the first data collection device can send the collected data to the cloud server according to the rules of the data dictionary.
  • the cloud server can identify the data from the data collection device according to the configuration file following the rules of the data dictionary, and send the data from the data collection device to the data display device.
  • the data shows that configuration files that follow the rules of the data dictionary are stored in the device.
  • the data display device can identify the received data according to the configuration file following the rules of the data dictionary, and process the data according to the display strategy, data fusion strategy, data statistics strategy and other rules in the configuration file. For example, the data display device may identify that the fifth data belongs to the first type of data according to the first data identifier and the first configuration file. Further, the data display device may sample the first type of data according to the display strategy in the first configuration file.
  • the first device is a cloud server.
  • the first configuration file includes first description information of the first type of data.
  • the cloud server can send the sixth data to the data display device.
  • the sixth data may include the first description information and sample values of the first type of data.
  • the data display device may determine that the sixth data belongs to the first type of data according to the first description information in the sixth data. That is, the data display device may not identify the type of the sixth data according to the configuration file following the rules of the data dictionary.
  • the configuration file following the rules of the data dictionary is stored in the data display device.
  • the data display device may determine rules such as a display policy, a data statistics policy, and a data fusion policy of the first type of data according to the first configuration file, and process the sampled values of the first type of data.
  • the first device is a cloud server.
  • the cloud server can send the sixth data to the data display device.
  • the cloud server may also send the display policy, data fusion policy, data statistics policy and other rules in the first configuration file to the data display device.
  • the data display device does not need to store configuration files that comply with the rules of the data dictionary.
  • the data display device receives the sixth data, it can be determined according to the first description information in the sixth data that the sixth data belongs to the first type of data.
  • the data display device can process the first type of data according to the received rule for processing the first type of data.
  • the first data collection device may be any of the following devices: smart watch, smart bracelet, body fat scale, smart glasses, thermometer, blood pressure monitor, heart rate monitoring device.
  • the first type of data can be any of the following data: walking data, running data, swimming data, cycling data, sleep data, weight data, pressure data, heart rate data, blood pressure data , body temperature data, blood oxygen data, blood sugar data.
  • the present application provides a data processing method.
  • the first data collection device can obtain the first data, the first data includes the first data identifier and the first sampling value of the first type of data, and conforms to the rules of the first configuration file, and the first configuration file is based on the first rule Defined, the first configuration file includes a first data identifier, the first data identifier is used to identify the first type of data, and the first data identifier is unique among the data identifiers defined according to the first rule.
  • the first data collection device sends the first data to the first device.
  • the above-mentioned first rule may be a rule of a data dictionary.
  • the first data collection device may be any of the following devices: smart watch, smart bracelet, body fat scale, smart glasses, thermometer, blood pressure monitor, heart rate monitoring device.
  • the first type of data may be any of the following data: walking data, running data, swimming data, cycling data, sleep data, weight data, pressure data, heart rate data, blood pressure data , body temperature data, blood oxygen data, blood sugar data.
  • the present application provides a communication system.
  • the communication system may include a first data collection device and a data display device.
  • the first data acquisition device can be used to obtain the first data and send the first data to the data display device;
  • the first data includes the first data identifier and the first sampling value of the first type of data, and conforms to the first configuration file
  • the first configuration file is defined according to the first rule.
  • the first configuration file contains the first data identifier.
  • the first data identifier is used to identify the first type of data.
  • the first data identifier is defined in accordance with the first rule. ID is unique.
  • the data display device can be used to identify that the first data belongs to the first type of data according to the first data identifier and the first configuration file.
  • the above-mentioned first rule may be a rule of a data dictionary.
  • the first device can identify the newly added type of data by using the program for identifying existing types of data. This can reduce the workload of developers during the process of data collected by the data collection device being connected to the first device, and improve the efficiency of data connection.
  • the communication system may further include a cloud server, and the first configuration file includes first description information of the first type of data.
  • the data display device can also be used to send the third data to the cloud server, the third data includes the first description information and the sampling value of the first type of data.
  • the cloud server can be used to store the third data.
  • the present application provides a device.
  • the above-mentioned device includes: a communication device, a memory, and a processor.
  • the above-mentioned memory can be used to store a computer program, and the above-mentioned processor can be used to call the above-mentioned computer program, so that the above-mentioned device executes any possible implementation method according to the first aspect or the second aspect.
  • the present application provides a chip, the chip is applied to a device, the chip includes one or more processors, and the processor is used to invoke computer instructions so that the device performs any one of the first aspect or the second aspect. possible implementation methods.
  • the present application provides a computer program product containing instructions, which is characterized in that, when the above computer program product is run on a device, the device is made to execute any possible implementation method as in the first aspect or the second aspect .
  • the present application provides a computer-readable storage medium, including instructions, which is characterized in that, when the above-mentioned instructions are run on a device, the device is made to perform any possible implementation method according to the first aspect or the second aspect .
  • the device provided in the fourth aspect, the chip provided in the fifth aspect, the computer program product provided in the sixth aspect, and the computer-readable storage medium provided in the seventh aspect are all used to execute the method provided in the embodiment of the present application . Therefore, the beneficial effects that it can achieve can refer to the beneficial effects in the corresponding method, and will not be repeated here.
  • FIG. 1 is a schematic structural diagram of a communication system 10 provided by an embodiment of the present application.
  • FIG. 2A is a schematic structural diagram of an electronic device 100 provided in an embodiment of the present application.
  • FIG. 2B is a software structural block diagram of an electronic device 100 provided by an embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of another communication system 30 provided by an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of another communication system 40 provided by an embodiment of the present application.
  • 5A to 5C are schematic diagrams of some electronic devices 100 displaying body temperature data provided by the embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of another communication system 60 provided by an embodiment of the present application.
  • first and second are used for descriptive purposes only, and cannot be understood as implying or implying relative importance or implicitly specifying the quantity of indicated technical features. Therefore, the features defined as “first” and “second” may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present application, unless otherwise specified, the “multiple” The meaning is two or more.
  • FIG. 1 is a schematic structural diagram of a communication system 10 provided in an embodiment of the present application.
  • a communication system 10 may include an electronic device 100 , one or more data collection devices, a cloud server 300 and a three-party application server 301 . in:
  • the one or more data collection devices mentioned above may include a smart watch 201 , a smart bracelet 202 , a body fat scale 203 , and smart glasses 204 .
  • the above-mentioned data collection equipment may also include smart home equipment such as smart air conditioners, smart refrigerators, air purifiers, water purifiers, water immersion monitors, and gas monitors. These smart home devices can be used to collect user's home status data.
  • the data collected by the data collection device may also include device configuration data, device working status, and other data.
  • the embodiment of the present application does not limit the specific type of the above-mentioned data acquisition device.
  • the aforementioned exercise health data may include steps, calories, calories, exercise records, sleep, weight, stress, heart rate, body temperature, blood sugar, blood pressure, etc.
  • the above-mentioned family status data may include the temperature at home, ingredients in the smart refrigerator, air quality index, water quality, gas usage status and so on.
  • the data collection device has a limited area for displaying data (such as a display screen), and can simply present the data collected by itself and send the collected data to the electronic device 100 (such as a mobile phone).
  • the electronic device 100 can analyze the data from the data collection device, and present rich analysis results and relevant suggestions.
  • the smart watch 201 can be used to collect the user's heart rate.
  • the smart watch 201 may only display the user's heart rate at the current moment.
  • the heart rate collected by the smart watch 201 can be sent to the electronic device 100 .
  • the electronic device 100 can calculate the user's resting heart rate, heart rate range, time period of high heart rate, time period of low heart rate and other analysis results according to the user's heart rate within a period of time, and provide suggestions for improving heart health.
  • the data collection device does not have the ability to display data.
  • the data collection device may also only collect data, and send the collected data to the electronic device 100 .
  • the electronic device 100 can analyze and display the received data.
  • the electronic device 100 can be used as a data display device to analyze the data from the data collection device, and present rich analysis results and relevant suggestions.
  • the electronic device 100 may have a display device.
  • the display For example, the display.
  • Electronic device 100 may be equipped with Or portable electronic devices with other operating systems, such as mobile phones, tablet computers, etc., can also be laptop computers (Laptop) with touch-sensitive surfaces or touch panels, desktop computers with touch-sensitive surfaces or touch panels, etc.
  • Portable Electronic Devices The embodiment of the present application does not limit the specific type of the electronic device 100 .
  • a device management application (application, APP) for managing the data collection device may be installed in the electronic device 100 .
  • the above-mentioned device management APP for managing the data collection device may include a sports and health APP.
  • the above-mentioned device management APP for managing the data collection device may include a smart home APP (such as a smart life APP).
  • a binding relationship may be established between the electronic device 100 and one or more data collection devices.
  • a binding relationship may be established between the electronic device 100 and the data collection device through an account. That is, the account registered on the APP used to control the data collection device in the electronic device 100 is the same as the account registered on the data collection device.
  • a binding relationship may also be established between the electronic device 100 and the data collection device by scanning a two-dimensional code, Bluetooth pairing, and the like. The embodiment of the present application does not specifically limit the method for establishing a binding relationship between the electronic device 100 and the data collection device.
  • the data collection device may send the data collected by itself to an electronic device (such as the electronic device 100 ) that has established a binding relationship with itself.
  • the data collection device can send the data collected by itself to the electronic device 100 through a short-distance communication connection such as a Bluetooth communication connection, a wireless fidelity (Wi-Fi) communication connection, a ZigBee communication connection, or the like.
  • a short-distance communication connection such as a Bluetooth communication connection, a wireless fidelity (Wi-Fi) communication connection, a ZigBee communication connection, or the like.
  • the electronic device 100 can also upload the data from the data collection device to the cloud server 300 .
  • the electronic device 100 may also upload the analysis results and related suggestions of the data collected by the data collection device to the cloud server 300 .
  • the cloud server 300 may receive and store data from the electronic device 100 .
  • the cloud server 300 may be an application server of the above-mentioned device management APP for managing data collection devices.
  • the cloud server 300 may store the binding relationship between the electronic device 100 and the data collection device.
  • the cloud server 300 can be used for the electronic device 100 to remotely control the data collection device.
  • the data collection device may also upload the data collected by itself to the cloud server 300 through the network.
  • the data collection device can be connected to the Internet through the network access device.
  • the data collection device has a mobile data access function (for example, a SIM card is inserted into the data collection device).
  • the cloud server 300 can store the data collected by the data collection device, and send the data collected by the data collection device to a data display device (such as the electronic device 100 ) that has a binding relationship with the data collection device.
  • the data display device can analyze the data from the data acquisition device, and present the analysis results of the data and relevant suggestions.
  • the scenario where the data collection device sends data to the data display device that has established a binding relationship with itself, and the data display device sends the data of the data collection device to the cloud server 300 as an example will be introduced.
  • the APP installed in the electronic device 100 may include a device management APP for managing the data collection device, or may include a third-party APP.
  • the device management APP may be an APP matched with the data collection device.
  • the data collection device can send the data collected by itself to the device management APP in the electronic device 100 for managing itself.
  • the data collection device and the device management APP that manages the data collection device may be developed and manufactured by the same manufacturer.
  • the third-party APP may be an APP other than the device management APP. The three-party APP can request permission to obtain the data collected by the data collection device.
  • the third-party APP After obtaining the open permission of the data collected by the above-mentioned data collection equipment, the third-party APP can obtain the data collected by the above-mentioned data collection equipment through the open interface, and use the data collected by the data collection equipment to realize its own business.
  • the above-mentioned open interface may be provided by the device management APP.
  • the electronic device 100 is installed with a sports health APP and a YY sports APP.
  • the sports health APP may be a device management APP in the electronic device 100 , and may be used to manage data collection devices that have a binding relationship with the electronic device 100 .
  • the YY sports APP can be a three-party APP in the electronic device 100 .
  • the YY Sports APP can obtain data collected by smart watches 201, smart bracelets 202 and other data collection devices managed by the Sports Health APP, and use these data to realize its own business. For example, to provide users with exercise suggestions, etc.
  • the third-party APP can obtain the data collected by the data collection device through the open interface provided by the above-mentioned device management APP.
  • the third-party APP can also upload the data collected by the data collection device and the data generated in the process of implementing related business processes using the data collected by the data collection device to the third-party application server 301 .
  • the third-party application server 301 may store the above-mentioned data from the third-party APP.
  • the process of the third-party APP sending data to the third-party application server 301 may specifically be a process in which the electronic device (such as the electronic device 100 ) installed with the third-party APP sends the data of the third-party APP to the third-party application server 301 .
  • the embodiment of the present application does not limit the specific implementation manner of sending data from the electronic device 100 to the server (such as the cloud server 300 and the third-party application server 301 ).
  • FIG. 2A exemplarily shows a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, and a battery 142 , antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193 , a display screen 194, and a subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit
  • the controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is a cache memory.
  • the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
  • the USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100 , and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through them. This interface can also be used to connect other electronic devices, such as AR devices.
  • the charging management module 140 is configured to receive a charging input from a charger.
  • the charger may be a wireless charger or a wired charger. While the charging management module 140 is charging the battery 142 , it can also provide power for electronic devices through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation.
  • at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
  • the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite, etc. applied on the electronic device 100.
  • System global navigation satellite system, GNSS
  • frequency modulation frequency modulation, FM
  • near field communication technology near field communication, NFC
  • infrared technology infrared, IR
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • the electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos and the like.
  • the display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
  • the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
  • the electronic device 100 can realize the shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
  • the ISP is used for processing the data fed back by the camera 193 .
  • the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • Camera 193 is used to capture still images or video.
  • the object generates an optical image through the lens and projects it to the photosensitive element.
  • the photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other image signals.
  • the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs.
  • the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
  • MPEG moving picture experts group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the electronic device 100 can be realized through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the internal memory 121 may include one or more random access memories (random access memory, RAM) and one or more non-volatile memories (non-volatile memory, NVM).
  • RAM random access memory
  • NVM non-volatile memory
  • Random access memory can include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (synchronous dynamic random access memory, SDRAM), double data rate synchronous Dynamic random access memory (double data rate synchronous dynamic random access memory, DDR SDRAM, such as the fifth generation DDR SDRAM is generally called DDR5SDRAM), etc.;
  • SRAM static random-access memory
  • DRAM dynamic random access memory
  • SDRAM synchronous dynamic random access memory
  • SDRAM synchronous dynamic random access memory
  • double data rate synchronous Dynamic random access memory double data rate synchronous dynamic random access memory
  • DDR SDRAM double data rate synchronous dynamic random access memory
  • DDR SDRAM double data rate synchronous dynamic random access memory
  • DDR5SDRAM double data rate synchronous dynamic random access memory
  • Non-volatile memory may include magnetic disk storage devices, flash memory (flash memory).
  • flash memory can include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc.
  • it can include single-level storage cells (single-level cell, SLC), multi-level storage cells (multi-level cell, MLC), triple-level cell (TLC), quad-level cell (QLC), etc.
  • SLC single-level storage cells
  • MLC multi-level storage cells
  • TLC triple-level cell
  • QLC quad-level cell
  • UFS universal flash storage
  • embedded multimedia memory card embedded multi media Card
  • the random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of an operating system or other running programs, and can also be used to store data of users and application programs.
  • the non-volatile memory can also store executable programs and data of users and application programs, etc., and can be loaded into the random access memory in advance for the processor 110 to directly read and write.
  • the external memory interface 120 can be used to connect an external non-volatile memory, so as to expand the storage capacity of the electronic device 100 .
  • the external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and video are stored in an external non-volatile memory.
  • the electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into an analog audio signal output, and is also used to convert an analog audio input into a digital audio signal.
  • the audio module 170 may also be used to encode and decode audio signals.
  • the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
  • Speaker 170A also referred to as a "horn" is used to convert audio electrical signals into sound signals.
  • Electronic device 100 can listen to music through speaker 170A, or listen to hands-free calls.
  • Receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the receiver 170B can be placed close to the human ear to receive the voice.
  • the microphone 170C also called “microphone” or “microphone”, is used to convert sound signals into electrical signals.
  • the earphone interface 170D is used for connecting wired earphones.
  • the earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal.
  • pressure sensor 180A may be disposed on display screen 194 .
  • the gyro sensor 180B can be used to determine the motion posture of the electronic device 100 .
  • the angular velocity of the electronic device 100 around three axes ie, x, y and z axes
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 may use the magnetic sensor 180D to detect the opening and closing of the flip leather case.
  • the acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the distance sensor 180F is used to measure the distance.
  • the electronic device 100 may measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F for distance measurement to achieve fast focusing.
  • Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes.
  • the light emitting diodes may be infrared light emitting diodes.
  • the electronic device 100 emits infrared light through the light emitting diode.
  • Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 .
  • the ambient light sensor 180L is used for sensing ambient light brightness.
  • the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access to application locks, take pictures with fingerprints, answer incoming calls with fingerprints, and the like.
  • the temperature sensor 180J is used to detect temperature.
  • the electronic device 100 uses the temperature detected by the temperature sensor 180J to implement a temperature treatment strategy. For example, when the temperature reported by the temperature sensor 180J exceeds the threshold, the electronic device 100 may reduce the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
  • the touch sensor 180K is also called “touch device”.
  • the touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to the touch operation can be provided through the display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the human pulse and receive the blood pressure beating signal.
  • the keys 190 include a power key, a volume key and the like.
  • the key 190 may be a mechanical key. It can also be a touch button.
  • the electronic device 100 can receive key input and generate key signal input related to user settings and function control of the electronic device 100 .
  • the motor 191 can generate a vibrating reminder.
  • the motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
  • the indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
  • the SIM card interface 195 is used for connecting a SIM card.
  • the SIM card can be connected and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195 .
  • the electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards may be the same or different.
  • the SIM card interface 195 is also compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the electronic device 100 interacts with the network through the SIM card to implement functions such as calling and data communication.
  • the electronic device 100 adopts an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture.
  • the embodiment of the present application takes the Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 .
  • FIG. 2B is a block diagram of the software structure of the electronic device 100 according to the embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces.
  • the Android system is divided into four layers, which are respectively the application program layer, the application program framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer from top to bottom.
  • the application layer can consist of a series of application packages.
  • the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, sports and health.
  • the application package can also contain more applications for managing data collection equipment.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer can include window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
  • a window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
  • Content providers are used to store and retrieve data and make it accessible to applications.
  • the data may include video, images, audio, calls made and received, data collected from data collection devices (such as exercise health data, family status data) and the like.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on.
  • the view system can be used to build applications.
  • a display interface can consist of one or more views.
  • a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
  • the phone manager is used to provide communication functions of the electronic device 100 . For example, the management of call status (including connected, hung up, etc.).
  • the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
  • the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction.
  • the notification manager is used to notify the download completion, message reminder, etc.
  • the notification manager can also be a notification that appears on the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window.
  • prompting text information in the status bar issuing a prompt sound, vibrating the electronic device, and flashing the indicator light, etc.
  • the electronic device 100 may store the data sent by the data collection device in the content provider.
  • the sports health APP can obtain the data from the data collection device from the content provider, and analyze the data from the data collection device.
  • the sports health APP can call the above-mentioned view system to display the data from the data collection equipment and the analysis results of these data, etc.
  • the Android Runtime includes core library and virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
  • the core library consists of two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
  • the application layer and the application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application program layer and the application program framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • a system library can include multiple function modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
  • the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing, etc.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.
  • the workflow of the software and hardware of the electronic device 100 will be exemplarily described below in conjunction with capturing and photographing scenes.
  • a corresponding hardware interrupt is sent to the kernel layer.
  • the kernel layer processes touch operations into original input events (including touch coordinates, time stamps of touch operations, and other information). Raw input events are stored at the kernel level.
  • the application framework layer obtains the original input event from the kernel layer, and identifies the control corresponding to the input event. Take the touch operation as a touch click operation, and the control corresponding to the click operation is the control of the camera application icon as an example.
  • the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer.
  • Camera 193 captures still images or video.
  • a data processing method will be introduced below by taking the communication system 30 composed of the electronic device 100 , the smart watch 201 and the cloud server 300 in the communication system 10 as an example.
  • FIG. 3 exemplarily shows a schematic structural diagram of a communication system 30 .
  • the smart watch 201 may include a data 1 collection module 310 , a data 2 collection module 311 , a data 1 packaging module 312 , and a data 2 packaging module 313 .
  • the data 1 collection module 310 can be used to collect data 1.
  • the data 2 collection module 311 can be used to collect data 2.
  • the smart watch 201 has hardware devices for collecting data 1 and data 2.
  • the data 1 acquisition module 310 may include a heart rate monitoring device.
  • the smart watch 201 may also include more or less data collection modules.
  • the data 1 encapsulation module 312 can be used for encapsulating the collected data 1 according to the data encapsulation protocol agreed between the smart watch 201 and the electronic device 100 .
  • the data 2 encapsulation module 313 can be used for encapsulating the collected data 2 according to the data encapsulation protocol agreed between the smart watch 201 and the electronic device 100 .
  • the above data encapsulation protocol for encapsulating data 1 and data 2 can determine the meaning of each field in the encapsulated data.
  • the above data encapsulation protocols for encapsulating data 1 and data 2 may be the same or different.
  • the above data 1 is heart rate
  • the above data 2 is pressure
  • the data 1 collection module 310 collects the user's heart rate as 81.
  • the data 2 collection module 311 collects the pressure of the user as 52.
  • the data 1 packaging module 312 can package the heart rate data.
  • the encapsulated heart rate data may include "0181”.
  • the data 2 packaging module 313 can package the pressure data. Packed pressure data may include "0152".
  • the smart watch 201 can send the packaged data 1 and data 2 to the electronic device 100 .
  • the smart watch 201 also includes a communication module (such as a Bluetooth communication module).
  • the data 1 encapsulation module 312 and the data 2 encapsulation module 313 can transmit the encapsulated data to the communication module in the smart watch 201 .
  • a Bluetooth communication connection is established between the smart watch 201 and the electronic device 100 .
  • the Bluetooth communication module in the smart watch 201 can send the encapsulated data 1 and data 2 to the electronic device 100 according to the Bluetooth communication protocol.
  • the electronic device 100 may also include a communication module.
  • the communication module in the electronic device 100 can receive the data sent from the smart watch 201, and transmit the data sent from the smart watch 201 to a corresponding application program (such as a sports health APP).
  • a corresponding application program such as a sports health APP
  • the electronic device 100 may include a sports and health APP. Not limited to sports and health APP, the electronic device 100 may also include other device management APPs for managing data collection devices. In the subsequent embodiments of the present application, the sports health APP is specifically used as an example for illustration.
  • the sports health APP may include a device management module 314, one or more data storage and cloud synchronization modules, one or more data calculation modules, and one or more business realization modules.
  • the device management module 314 may include one or more data decapsulation modules.
  • the data 1 decapsulation module 314A and the data 2 decapsulation module 314B can be used to decapsulate the encapsulated data 1 according to the data encapsulation protocol agreed between the smart watch 201 and the electronic device 100 .
  • the data 2 decapsulation module 314B can be used for decapsulating the encapsulated data 2 according to the data encapsulation protocol agreed between the smart watch 201 and the electronic device 100 .
  • the data 1 decapsulation module 314A may decapsulate the encapsulated heart rate data "0181” to obtain the following heart rate data "data type: heart rate, data value 81".
  • data type: heart rate can be determined by the data 1 decapsulation module 314A according to the first two digits "01" in “0181”.
  • data value 81 may be determined by the data 1 decapsulation module 314A according to the last two digits "81" in "0181".
  • the data 2 decapsulation module 314B can decapsulate the encapsulated pressure data "0152” to obtain the following pressure data "data type: pressure, data value 52".
  • data type pressure
  • data value 52 the data 2 decapsulating module 314B according to the last 2 digits "52" in "0152”.
  • the device management module 314 may also include other modules for managing sports and health data collection devices such as the smart watch 201 .
  • the data storage and cloud synchronization module in the Sports Health APP may include a data 1 storage and cloud synchronization module 316 , and a data 2 storage and cloud synchronization module 317 .
  • the data 1 storage and cloud synchronization module 316 can be used to store the data 1 obtained after being decapsulated by the data 1 decapsulation module 314A, and upload the data 1 to the cloud server 300 .
  • the data 2 storage and cloud synchronization module 317 can be used to store the data 2 obtained after being decapsulated by the data 2 decapsulation module 314B, and upload the data 2 to the cloud server 300 .
  • the data calculation module in the sports health APP can include a data 1 calculation module 318 and a data 2 calculation module 319 .
  • the data 1 calculation module 318 can obtain data 1 from the data 1 storage and cloud synchronization module 316, and perform one or more of the following calculations on the data 1: determine the mean value, determine the variation range, determine the maximum value, determine the minimum value, Determine the sum and determine the number of counts of data 1 within a period of time.
  • the data 2 calculation module 319 can obtain the data 2 from the data 2 storage and cloud synchronization module 317, and perform calculation processing on the data 2.
  • a business realization module can be used to realize a business.
  • the above business can represent the services that the Sports Health APP can provide to users.
  • the business realization module in the sports health APP may include a business A realization module 320 and a business B realization module 321 .
  • the business A implementation module can be used to present heart rate-related data and stress-related data.
  • the service B implementation module may be used to present recommendations for maintaining physical health determined according to heart rate-related data and stress-related data.
  • both the service A implementation module 320 and the service B implementation module 321 can obtain heart rate-related data from the data 1 calculation module 318 and pressure-related data from the data 2 calculation module 319 .
  • the sports health APP may further include one or more data opening modules (not shown in FIG. 3 ).
  • Data 1 Open Module and Data 2 Open Module.
  • the data open module can be used to provide an open interface for third-party APPs to obtain corresponding data.
  • the cloud server 300 may include a data 1 storage module 322 and a data 2 storage module 323 .
  • the data 1 storage module 322 can be used to store data 1.
  • the data 2 storage module 323 can be used to store data 2.
  • the sports health APP can upload data 1 and data 2 to the cloud server 300 according to the data encapsulation protocol agreed with the cloud server 300 .
  • the cloud server 300 can determine and store the meaning of the received data according to the data encapsulation protocol agreed between the Sports Health APP and the cloud server 300 .
  • the sports health APP in the electronic device 100 needs to use different data encapsulation protocols to identify the meanings represented by different data. That is, the sports health APP needs to include modules for managing data encapsulated with different data encapsulation protocols.
  • the developers of the sports health APP need to develop identification data, analysis data, Code that processes data such as rendering data and open data.
  • the cloud server 300 and the three-party APP also need to add codes for processing the newly added type of data according to the data encapsulation protocol adopted by the newly added type of data.
  • An embodiment of the present application provides a data processing method.
  • the data acquisition device can report the data A to the data display device according to the data type definition rules in the data dictionary.
  • the data display device can determine the specific content of the received data A according to the data type definition rules in the data dictionary, and analyze the data A according to the data processing rules in the data dictionary.
  • the data display device can display data A and its analysis results, and can also upload data A to the cloud server and open it to third-party APPs.
  • the cloud server can determine the specific content of the received data A according to the data type definition rules in the data dictionary, and store it.
  • the third-party APP can determine the specific content of the received data A according to the data type definition rules in the data dictionary, and use the data A to realize the required business of the third-party APP.
  • the above-mentioned data A may be sports health data, family status data and other types of data.
  • the embodiment of the present application does not limit the specific type of data A.
  • the above rules of the data dictionary can be applied to many different types of data. It can be seen that, using the rules of the above data dictionary, in the case of adding a new type of data, the new type of data is connected to the data display device, cloud server, and third-party APP, and the data display device is connected to the newly added type. Codes that process data such as analyzing and displaying data can reuse codes that process existing types of data. This can reduce the workload of developers and improve the efficiency of data access.
  • Data dictionary refers to the definition and description of data items, data structure, data storage, and processing logic.
  • the content contained in the data dictionary can refer to the content shown in Table 1 below.
  • the data dictionary can include data type definition rules and data processing rules.
  • the data type definition rule may include the following data items in the data type definition in Table 1 above: typeID, subType, name, description, type, sensitivityLevel, validatePolicies, displayPolicies.
  • the format of the data item typeID can be, for example, 00100001, the first 3 digits can identify the grouping of the data type, and the last 5 digits can be used to ensure the global uniqueness of the typeID.
  • the data display device, the cloud server, and the third-party APP can determine the type of the data according to the type identifier of the data.
  • the embodiment of the present application does not limit the format of the data item typeID.
  • the data item subType is an optional data item.
  • one type of data can also be divided into multiple subtypes.
  • Data corresponding to the multiple subtypes may have data subtype identifiers.
  • the item of sports records can include multiple subtypes of data: running records, swimming records, mountaineering records, cycling records, and so on.
  • the data item name can be an English string.
  • the name of sleep data can be "SLEEP_RECORD".
  • the data item name can be used as a unique access identifier in the code.
  • the data item type can include single sampling data category, sequence sampling data category and other data categories.
  • the above-mentioned single-sampling data category may indicate that the data is sampled once and a data value of a category can be determined. For example, a heart rate value can be obtained every time the data collection device collects heart rate data. The aforementioned collection of heart rate once may mean that heart rate collection is performed at one moment.
  • the one-shot data category may also be referred to as single-point data.
  • the above-mentioned sequence sampling data category may indicate that data values of multiple categories can be determined once the data is sampled. For example, each time the data acquisition device collects the data of running records, it can obtain data values of multiple categories such as running speed average, running mileage, and calorie consumption.
  • the aforementioned collection of a running record may mean collecting running-related data during the time period from the start of the run to the end of the run.
  • the data item sensitivityLevel can be used to determine the sensitivity level of data.
  • the above sensitivity level can be defined according to the degree of impact that data leakage or misuse may have on individuals, organizations or the public. For example, if a type of data is leaked or misused may bring unrecoverable or catastrophic adverse effects on individuals, organizations or the public, the sensitivityLevel of this type of data may be 4. If a type of data is leaked or misused may have a significant adverse impact on individuals, organizations or the public, the sensitivityLevel of this type of data can be 3. If a type of data is leaked or misused that may have serious adverse effects on individuals, organizations or the public, the sensitivityLevel of this type of data can be 2.
  • the sensitivityLevel of this type of data can be 1. If a type of data is leaked or misused and may have negligible adverse effects on individuals, organizations or the public, then the sensitivityLevel of this type of data can be 0.
  • the specific value of the sensitivityLevel is not limited in this embodiment of the application.
  • the data item validatePolicies is an optional data item.
  • the data item validatePolicies can be used to verify the rationality of the data collection equipment.
  • the validatePolicies for body temperature data can be body temperature ⁇ 34 and body temperature ⁇ 42. If the device management APP used to manage the data collection device receives body temperature data with a value of 45, the APP can determine that the body temperature data is abnormal data.
  • the device management APP used to manage the data collection device can process (such as delete) the abnormal data, so as to reduce the situation of presenting the abnormal data to the user.
  • the data item displayPolicies can be used to determine the display policy of the data.
  • the value list of displayPolicies can include display form displayForm and display position displayPosition.
  • the data display device may display the sampling value of this type of data in the form of a line graph. If the displayForm of one type of data is 2, the data display device can display the sampling value of this type of data in the form of a histogram. If the displayForm of one type of data is 3, the data display device can display the sampling value of this type of data in the form of a pie chart. If the displayForm of a type of data is 4, the data display device can display the sampling value of this type of data in the form of a radar chart. If the displayForm of one type of data is 5, the data display device can display the sampling value of this type of data in the form of a scatter diagram.
  • the data display device may display the sampled value of this type of data in a display form A (such as a line graph) on the left side of the user interface. If the displayPosition of one type of data is Right, the data display device may display the sampling value of this type of data in display form A on the right side of the user interface. If the displayPosition of one type of data is Top, the data display device may display the sampling value of this type of data in display form A on the top of the user interface. If the displayPosition of one type of data is Bottom, the data display device may display the sampling value of this type of data in display form A at the bottom of the user interface.
  • a display form A such as a line graph
  • more displayForm and displayPosition may be included in the data dictionary.
  • the embodiment of the present application does not limit the values of displayForm and displayPosition.
  • the data dictionary can also represent different displayForms and different displayPositions through other characters such as data and letters.
  • displayPolicies may include one of displayForm and displayPosition.
  • displayPolicies may also include more rules for instructing the data display device to display data, such as alignment and so on.
  • the display policy displayPolicies may also include statistical data (such as the maximum value) of this type of data displayed , minimum value, mean value, etc.) display form and display position.
  • a data type definition rule may also contain a data item field list fields.
  • a type of data can contain one or more fields in the field list.
  • the field list of single-point data heart rate can contain one field, which is heart rate.
  • the field list of multipoint data blood pressure can contain two fields, systolic blood pressure and diastolic blood pressure. The above-mentioned multi-point data may indicate that the data collection device can obtain multiple types of data by performing data collection at one moment.
  • Data processing rules may contain other data items contained in Table 1 than the data type definition rules. For example, each data item in a field definition and each data item in a statistics policy definition.
  • one of the fields in the above field list fields can have the data items included in the field definition in Table 1: fieldType, fieldName, fieldDescription, format, unit(cn), unit(en), fieldOptional, mergePolicy, dataSourcePriority, mergePolicySameSource, statPolicies . That is, the data items included in the field definition in Table 1 can describe a field in the field list fields from different dimensions.
  • the data item fieldType can be used to identify different types of fields under one type of data.
  • the format of the fieldType of a field can be 00100001001, the first 8 bits can be the typeID of the type of data to which this field belongs, and the last 3 bits can be used to ensure that the fieldType is unique among the fields contained in the data corresponding to the above typeID.
  • the data item fieldName can be an English character string.
  • the fieldName of body temperature can be "bodyTemperature”.
  • the data item fieldOptional can be used to indicate whether a field is optional.
  • the value "M" of the data item fieldOptional may indicate that a field is mandatory.
  • the value "O" of the data item fieldOptional may indicate that a field is optional.
  • the data item mergePolicy can be used to determine the policy for processing the same type of data collected from multiple data collection devices at the same time. That is, the multi-source fusion strategy.
  • the multi-source fusion strategy may include taking the maximum value (MAX), taking the minimum value (MIN), taking the new value (NEW), taking the old value (OLD), and according to the priority of the data source (SOURCE_PRIORITY).
  • the above-mentioned data source may represent a source of data and a data collection device.
  • the data item dataSourcePriority is an optional data item that can be used to determine the priority of the data source.
  • the data item dataSourcePriority needs to be defined only when the value of the above data item mergePolicy is SOURCE_PRIORITY.
  • the data item mergePolicySameSource can be used to determine the policy for processing data of the same type collected from a data collection device. That is, the homologous fusion strategy.
  • the smart watch 201 determines whether the user falls asleep at time A
  • the smart watch 201 needs to use multiple sleep-related data monitored before time A to determine whether the user falls asleep at time A. That is to say, when the data acquisition device determines that one type of data cannot be collected and obtained immediately, but needs to be processed by multiple data collected in the previous period to obtain the result, the data display device can use the above-mentioned homologous
  • the fusion strategy determines a method for processing the multiple data collected in the preceding period of time.
  • the homologous fusion strategy may include taking the maximum value (MAX), taking the minimum value (MIN), taking the new value (NEW), and taking the old value (OLD).
  • the data item statPolicies can represent a list of statistical policies for a field.
  • One or more statistical strategies can be included in the statistical strategy list of a field. For example, a statistical strategy to calculate the maximum value, a statistical strategy to calculate the minimum value, a statistical strategy to calculate the average value, a statistical strategy to calculate the sum, and so on.
  • Each statistical policy may have the data items included in the statistical policy definition in Table 1: statType, statFieldName, statFormat, statPolicy. in:
  • the data item statType can be used to identify the statistical data type of a field.
  • the format of the data item statType please refer to the data format of the aforementioned data item fieldType.
  • the data item statPolicy can be used to determine the statistical policy of a field.
  • Statistical strategies may include calculating the maximum value (MAX), calculating the minimum value (MIN), calculating the average value (AVG), summing (SUM), counting (COUNT), calculating the variance (SD), and taking a new value (LAST).
  • the embodiment of the present application does not limit the names of the data items in the data dictionary. Not limited to the data items listed in Table 1 above, more or less data items may be included in the data dictionary.
  • the above-mentioned rules for providing a unified definition method for different types of data may also have other names. This embodiment of the present application does not limit it.
  • Different types of data can be defined as metadata according to the data dictionary shown in Table 1.
  • the metadata corresponding to one type of data can be used to determine the value of each data item of this type of data.
  • the metadata corresponding to different types of data whose metadata is defined according to the data dictionary may have the same or similar data structure.
  • Metadata corresponding to different types of data having the same data structure may indicate that the types of data items contained in these metadata are the same.
  • the metadata corresponding to different types of data are similar, which can indicate that among these metadata, some metadata contain optional data items in the data dictionary, and some metadata do not include optional data items in the data dictionary.
  • the code used to calculate and present new types of data in the device management APP (such as sports and health APP) used to manage data collection equipment can be reused
  • the code for data of an existing type For example, codes for data fusion and statistics, etc. This can reduce the workload of developers and improve the efficiency of data access.
  • a data processing method provided by the embodiment of the present application is introduced here by taking the communication system 40 composed of the electronic device 100, the smart watch 201 and the cloud server 300 in the communication system 10 as an example.
  • FIG. 4 exemplarily shows a schematic structural diagram of a communication system 40 .
  • the data collected by the smart watch 201 is connected to the electronic device 100 .
  • the smart watch 201 may include a data 1 collection module 410 , a data 2 collection module 411 , and a data reporting module 412 .
  • the data 1 collection module 410 and the data 2 collection module 411 can refer to the introduction of the aforementioned communication system 30 .
  • the data reporting module 412 can be used to report the data 1 to the sports health APP in the electronic device 100 according to the data type definition rules contained in the metadata corresponding to the data 1, and define the rules according to the data type definition rules contained in the metadata corresponding to the data 2 , and report the data 2 to the sports health APP in the electronic device 100 .
  • the smart watch 201 can be written with the data type definition rules contained in the metadata corresponding to the above data 1 and the data type definition rules contained in the metadata corresponding to the data 2 before leaving the factory.
  • the above-mentioned data type definition rules adapted to data 1 and data 2 may also be written into smart watch 201 through software update in smart watch 201 after smart watch 201 leaves the factory.
  • the smart watch 201 can determine the data type definition rules that match the data 1.
  • the smart watch 201 can report the data 1 to the sports health APP in the electronic device 100 through the data reporting module 412 according to the data type definition rules adapted to the data 1.
  • the electronic device 100 processes the data of the data collection device.
  • the electronic device 100 may include a sports and health APP.
  • the sports health APP may include a data management module 413, a data dictionary 414, a business A realization module 415, and a business B realization module 416.
  • the data management module 413 can obtain data 1 and data 2 reported by the data reporting module 412 in the smart watch 201 . It can be understood that during the process of data 1 and data 2 being transmitted from the data reporting module 412 to the data management module 413, the data 1 and data 2 have also passed through the smart watch 201 and other modules (such as Bluetooth communication modules, etc.) in the electronic device 100. deal with.
  • the embodiment of the present application simplifies the data transmission process in the communication system 40 in order to more clearly reflect the data processing process.
  • the embodiment of the present application does not limit the specific method of transferring data 1 and data 2 from the data reporting module 412 to the data management module 413 , and from the data management module 413 to the data storage module 417 in the cloud server 300 .
  • the data dictionary 414 may contain configuration files for data 1 and configuration files for data 2.
  • a configuration file of a type of data may follow the definition content in the metadata corresponding to this type of data. That is, the configuration file of data 1 may be determined according to the metadata corresponding to data 1.
  • the configuration file of data 2 may be determined according to metadata corresponding to data 2.
  • a configuration file of a type of data can be used by the device management APP to identify the received data of this type, data processing, cloud synchronization, and open to third-party APPs for processing.
  • the data management module 413 can obtain the configuration file of data 1 and the configuration file of data 2 from the data dictionary 414 .
  • the data 1 reported by the data reporting module 412 includes the data item typeID of the data 1
  • the data 2 includes the data item typeID of the data 2.
  • the data management module 413 can obtain the configuration file of data 1 from the data dictionary 414 according to the data item typeID of data 1, and obtain the configuration file of data 2 from the data dictionary 414 according to the data item typeID of data 2.
  • the data management module 413 can identify the specific content of data 1 and data 2. According to the data processing rules in the configuration file of 1 and the configuration file of data 2, the data management module 413 can perform calculation processing such as data fusion and data statistics on data 1 and data 2.
  • the data processing rules in the data dictionary may include data fusion rules and data statistics rules.
  • the above data fusion rules may include data items mergePolicy, dataSourcePriority, mergePolicySameSource.
  • the above-mentioned data statistics rule may include a data item statPolicy.
  • the data management module 413 may first determine whether there is data 1 reported by a data collection device other than the smart watch 201, and the smart watch 201 and other data collection devices collect data 1 at the same time. If the data management module 413 only receives the data 1 collected by the smart watch 201 , the data management module 413 can store the data 1 collected by the smart watch 201 .
  • the data management module 413 can determine according to the data item mergePolicy of the multi-source fusion policy in the configuration file of the data 1, Which data 1 among the above-mentioned plurality of data 1 is used as the accurate data at time A.
  • the data management module 413 may use the data 1 with the latest writing time among the above-mentioned multiple data 1 as the merged data, that is, the accurate data at time A.
  • the above writing time may be the time when data is written into the storage module of the electronic device 100 .
  • the data management module 413 may use the data 1 with the oldest writing time among the above-mentioned multiple data 1 as the merged data.
  • the data management module 413 may use the data 1 with the largest value among the above-mentioned multiple data 1 as the merged data.
  • the data management module 413 may use the data 1 with the smallest value among the above-mentioned multiple data 1 as the merged data.
  • the data management module 413 can use the data 1 collected by the device with the highest device priority among multiple data collection devices such as the smart watch 201 as the merged data 1. data.
  • the configuration file of data 1 includes the data item dataSourcePriority.
  • dataSourcePriority can be used to determine device priority.
  • the device priority determined by dataSourcePriority is a priority determined according to the category of the data collection device. For example, when collecting blood pressure data, the priority of the sphygmomanometer is higher than that of the smart watch.
  • the data management module 413 can determine the types of the above-mentioned multiple data collection devices that collect data 1 at time A, and select the data 1 collected by the data collection device with the highest category priority according to the device priority determined by dataSourcePriority.
  • the data management module 413 can combine other fusion strategies (such as MAX, MIN, NEW , OLD, etc.) select one of the data 1 collected by the data acquisition device with the highest category priority as the fused data.
  • the device priority determined by dataSourcePriority may include two levels of priority: the priority determined according to the type of the data collection device, and the priority determined according to the model of the data collection device.
  • the priority determined according to the type of the data collection device reference may be made to the description of the foregoing embodiments.
  • the above priority determined according to the model of the data collection device can be used to determine the priority of each type of data collection device. For example, when collecting blood pressure data, a data collection device classified as a blood pressure monitor has multiple models: a model A blood pressure monitor, a model B blood pressure monitor, and the like. Model A blood pressure monitors have higher priority than Model B blood pressure monitors.
  • the data management module 413 can first use the priority determined according to the type of the data collection device to select the data 1 collected by the data collection device with the highest category priority from the above-mentioned multiple data collection devices that collect data 1 at time A. Further, if there are multiple data collection devices with the highest category priority, the data management module 413 can determine the models of the data collection devices with the highest category priority, and use the above-mentioned priority determined according to the model of the data collection device Select the data collected by the data collection device with the highest model priority1.
  • the device priority determined by dataSourcePriority may only include the priority determined according to the model of the data collection device.
  • the data management module 413 can determine the models of the above-mentioned multiple data collection devices that collect data 1 at time A, and select the data 1 collected by the data collection device with the highest model priority according to the device priority determined by dataSourcePriority.
  • the above multi-source fusion strategy can reduce the situation that multiple data collection devices collect the same type of data at the same time, resulting in data conflicts. Not limited to the multi-source fusion strategies listed above, more multi-source fusion strategies may also be included in the data dictionary.
  • the data management module 413 when the data management module 413 receives multiple data of the same type collected by a data collection device, the data management module 413 may, according to the homologous fusion policy in the configuration file of this type of data
  • the data item mergePolicySameSource performs data fusion on these multiple data of the same type.
  • the data management module 413 may perform data statistics on multiple data 1 within a period of time according to the data item statPolicy of the data statistics policy in the configuration file of the data 1.
  • the aforementioned period of time may be, for example, one hour, one day, and so on.
  • the embodiment of the present application does not limit the length of the above period of time.
  • the multiple data 1 in the above period of time may be the multiple data 1 collected by the smart watch 201 in this period of time.
  • the data management module 413 receives the data 1 collected by multiple data collection devices such as the smart watch 201, the multiple data 1 in the above-mentioned period of time may be collected within the above-mentioned period of time, and have undergone the above-mentioned multi-source fusion processing Multiple data of 1.
  • the data management module 413 can calculate the average value of multiple data 1 in the above-mentioned period of time.
  • the data management module 413 may calculate the sum of multiple data 1 in the above-mentioned period of time.
  • the data management module 413 may determine the maximum value of multiple data 1 within the above period of time.
  • the data management module 413 may determine the minimum value of multiple data 1 within the above-mentioned period of time.
  • the data management module 413 may calculate the variance of multiple data 1 within the above-mentioned period of time.
  • the data management module 413 may calculate the number of data of multiple data 1 within the above-mentioned period of time.
  • the data management module 413 may determine the latest values of multiple data 1 within the above-mentioned period of time.
  • the latest value may be the latest data collected within a period of time.
  • the data management module 413 performs data statistics on the data according to the rules of data statistics, which can facilitate the business implementation module to realize the display requirements of various types of statistical data. For example, display the average value and sum of the data, and display the data in the form of a line graph, a histogram, etc.
  • Both the business A implementation module 415 and the business B implementation module 416 can obtain data 1, data 2, statistical results of data 1 under various data statistical strategies, and statistical results of data 2 under various data statistical strategies from the data management module 413 Wait for the data.
  • the service A realization module 415 may be used to present data related to data 1 and data related to data 2.
  • the business A implementation module can determine the display strategy of data 1 from the configuration file of data 1 (such as displayed in a line graph at the top of the user interface), and determine the display strategy of data 2 from the configuration file of data 2 (such as displayed in the user interface displayed as a histogram at the top of the ).
  • the service A implementation module 415 can display the data 1 obtained from the data management module 413 according to the display strategy of data 1, and display the data 2 obtained from the data management module 413 according to the display strategy of data 2.
  • the business A implementation module can also obtain data from the data management module 413 Various statistical data of 1, and display according to the display strategy of the statistical data of data 1.
  • the method of displaying statistical data of data 2 by the module of business A please refer to the method of displaying statistical data of data 1 above. I won't go into details here.
  • the user interface for displaying data related to data 1 and the user interface for displaying data related to data 2 are different user interfaces.
  • the electronic device 100 uploads the data collected by the data collection device to the cloud server 300, and opens it to the third-party APP.
  • the data management module 413 may send the data 1 to the cloud server 300 according to the data type definition rules in the configuration file of the data 1.
  • the cloud server 300 may include a data storage module 417 .
  • the cloud server 300 can determine the specific content of the data 1 according to the data type definition rules contained in the metadata corresponding to the data 1, and store the data 1 in the data storage module 417.
  • cloud server 300 For the process of cloud server 300 receiving data 2 and storing data 2 in data storage module 417 , please refer to the introduction of cloud server 300 storing data 1 in data storage module 417 .
  • the data management module 413 may open the data 1 to third-party APPs according to the data type definition rules in the configuration file of the data 1.
  • the third-party APP can determine the specific content of data 1 according to the data type definition rules contained in the metadata corresponding to data 1, and use data 1 to realize its own business needs.
  • the metadata corresponding to different types of data may have the same or similar data structure, and the different types of data have The data item typeID is globally unique. Then, during the process of connecting different types of data to the device management APP in the electronic device 100, the interface for data interaction between the data collection device and the electronic device 100 can be shared. During the cloud synchronization process of different types of data, the electronic device 100 and the cloud server The interface for data exchange between 300s can be shared, and the open interface provided by the device management APP during the process of opening different types of data to third-party APPs can also be shared.
  • the newly added type of data access electronic device 100, cloud server 300 and related interfaces open to third-party APPs can be connected with existing types of data access electronic device 100, cloud server 300 and open to third-party APPs.
  • the relevant interfaces of the three-party APP are the same.
  • the above-mentioned existing types of data are data defined according to the rules of the above-mentioned data dictionary. That is to say, when the newly added type of data is connected to the electronic device 100, the cloud server 300 and opened to third-party APPs, developers do not need to develop an additional access interface suitable for the newly added type of data. This can reduce the workload of developers when adding new types of data access, and improve the efficiency of data access.
  • configuration files of one or more types of data may be stored in the cloud server 300 .
  • a configuration file of a type of data may be determined according to metadata corresponding to this type of data.
  • the cloud server 300 may send the configuration file of the new type of data to the electronic device 100 .
  • a device management APP (such as a sports and health APP) in the electronic device 100 can use the configuration file of the newly added type of data to update the data dictionary. In this way, when receiving the new type of data collected by the data collection device, the device management APP can use the updated data dictionary to determine the content of the new type of data, and according to the configuration file of the new type of data The newly added type of data is processed for calculation and display.
  • the electronic device 100 may update the version of the device management APP in response to a user operation for updating the version of the device management APP.
  • the data dictionary in the device management APP after the version update can contain the configuration file of the newly added type of data.
  • the following takes the newly added body temperature data as an example to illustrate the data processing process of connecting the data collected by the data collection device to the data display device, cloud server and open to the third-party APP.
  • the metadata corresponding to the body temperature data can be used to determine the values of various data items of the body temperature data.
  • the metadata corresponding to the body temperature data can refer to the content shown in Table 2 below.
  • Profiles for body temperature data can include:
  • the configuration file of the body temperature data defines the value of each data item of the body temperature data. Since the body temperature data is single-point data, the data item field list fields in the body temperature data configuration file contains only one field, that is, the field name "fieldName” is “bodyTemperature”, and the field data type identifier "fieldType” is "400011975".
  • the configuration file of the body temperature data may also include a data fusion strategy and a statistics strategy for a field in the body temperature data. For example, the statistical policy list "statPolicies" in the above configuration file contains four statistical policies: calculating the average value (AVG), calculating the maximum value (MAX), calculating the minimum value (MIN), and counting (COUNT).
  • the configuration file of the above body temperature data can be used by the device management APP to identify the received body temperature data, and perform data fusion and data statistics processing on the body temperature data.
  • the manufacturer of the body temperature data collection device may write the data type definition rules in the body temperature data configuration file into the body temperature data collection device.
  • the data type definition rules in the above body temperature data configuration file may also be written into the body temperature data acquisition device when the software is updated after the body temperature data acquisition device leaves the factory.
  • the above data type definition rules may include data items: typeID, name, type, sensitivityLevel, validatePolicies, displayPolicy. Wherein, one or more of the above data items name, type, sensitivityLevel, validatePolicies, and displayPolicy may not be written into the body temperature data collection device.
  • the above-mentioned data type definition rule may also include a data item field list fields.
  • the manufacturer of the body temperature data collection device can also write one or more data items under the field definitions in the body temperature data configuration file to the body temperature data collection device. Since the body temperature data is single-point data, the body temperature data has only one field, that is, body temperature.
  • the manufacturer of the body temperature data collection device can write the data items in the field definition: fieldType, unit(en) into the body temperature data collection device. Then, the body temperature data acquisition device can report body temperature data according to the above data type definition rules, and report the fields contained in the body temperature data according to the data items in the field definition.
  • the body temperature data collection device reports the collected body temperature data to the data display device according to the data type definition rules of the body temperature data.
  • the body temperature data acquisition device can describe the body temperature data according to the data type definition rules of the body temperature data, and send the described data to the data display device.
  • the data display device may be a device that has a binding relationship with the body temperature data collection device.
  • the described body temperature data may include not only the type identifier typeID, but also the field data type identifier fieldType and the sampling value of the field.
  • the described body temperature data can be:
  • start_time and end_time may represent the start time and end time of this body temperature data collection respectively.
  • the body temperature data described above by the body temperature data collection device may also contain more data items. Such as name, type, sensitivityLevel, validatePolicies, etc.
  • the body temperature data acquisition device may only uniquely identify the body temperature data by using the field data type identifier fieldType of the fields contained in the body temperature data. That is, the described body temperature data may contain the field data type identifier fieldType and the sampled value of the field, but not the type identifier typeID.
  • the described body temperature data can be:
  • the data collection device can use the data type identifier typeID to uniquely identify the data, and use the field data type identifier fieldType to identify different fields contained in the data.
  • blood pressure data is multi-point data.
  • the blood pressure data described according to the rules of the data dictionary can include the type identifier typeID of the blood pressure data, the start time and end time of the collection, the field data type identifier fieldType of the diastolic pressure field of the blood pressure data, the sampling value of the diastolic pressure field, and the blood pressure data
  • the field data type of the field systolic pressure identifies fieldType, and the sampling value of the field systolic pressure.
  • the data display device uses the configuration file of the body temperature data to identify the body temperature data reported by the body temperature data collection device, and calculates and displays the body temperature data.
  • the data display device is the electronic device 100
  • the device management APP used to manage the body temperature data collection device in the data display device is a sports health APP as an example for illustration.
  • the electronic device 100 stores the configuration file of the above body temperature data.
  • the sports health APP in the electronic device 100 can use the configuration file of the body temperature data to identify the specific content of the body temperature data.
  • the Sports Health APP can recognize that the data is body temperature data. Among them, the sports health APP can determine that the data whose fieldType is 400011975 is the body temperature data whose field name is bodyTemperature according to the configuration file of body temperature data.
  • the data collection device when the data collection device reports the data collected by itself to the data display device, it may also report its own device identification to the data display device.
  • the device identification of each type of data acquisition device is globally unique.
  • the body temperature data collection device of model A has a device identifier of 71 .
  • the device identifier of the body temperature data collection device of model B is 72 .
  • the device identifier of the model C blood pressure data acquisition device is 73 .
  • the embodiment of the present application does not limit the format of the device identification of the data collection device.
  • the sports health APP After the sports health APP recognizes the specific content in the body temperature data, it can store the body temperature data in the data storage module in the electronic device 100 .
  • the storage format of the body temperature data in the data storage module of the electronic device 100 can refer to the content shown in the following Table 3:
  • each row in Table 3 may represent a record of body temperature data.
  • a record of body temperature data may represent body temperature data collected by a body temperature data collection device at a time.
  • the Id in Table 3 may represent the sequence number of the record corresponding to the row.
  • the device_id in Table 3 may represent the device identifier of the data acquisition device.
  • the sync_status in Table 3 can indicate the cloud synchronization status of body temperature data. For example, a sync_status of 0 may indicate that the body temperature data has not been uploaded to the cloud server.
  • a sync_status of 1 indicates that the body temperature data has been uploaded to the server.
  • the storage format of body temperature data may also include more or less contents. For example, data name, data unit, data sensitivity level, etc.
  • the Sports Health APP can identify all the data reported according to the rules of the data dictionary through the same data identification module.
  • the code used to implement the above data identification module is the program used to identify the above data reported according to the rules of the data dictionary.
  • the above-mentioned data identification module may be equivalent to an interface for data interaction between the data display device and the data collection device.
  • Developers only need to define configuration files for new types of data according to the rules of the data dictionary, without additionally developing data interaction interfaces suitable for new types of data. This can reduce the workload of developers when new types of data are connected to the data display device, and improve the efficiency of data connection.
  • the body temperature data configuration file includes a data item validation rule set validatePolicies.
  • the Sports Health APP can verify the body temperature data stored in the data storage module according to validatePolicies to determine whether there is any abnormality in the body temperature data.
  • the sports health APP can determine to perform data fusion and data statistics on the body temperature data according to the configuration file of the body temperature data.
  • the sports health APP can use the data item multi-source fusion policy mergePolicy contained in the body temperature data configuration file to Body temperature data for data fusion.
  • the aforementioned multiple body temperature data with multi-source conflicts may include body temperature data collected at the same time by multiple models of body temperature data collection devices.
  • the configuration file of body temperature data contains the data item device priority dataSourcePriority.
  • the Sports Health APP can select the body temperature data collected by the body temperature data collection device with the highest device priority among multiple body temperature data with multi-source conflicts as the fused data according to the dataSourcePriority.
  • dataSourcePriority is [1,129,384,57,72,71].
  • the device priority determined by the dataSourcePriority is the priority determined according to the model of the data collection device.
  • the device ID in the array [1,129,384,57,72,71] can identify a specific model of data acquisition device.
  • the body temperature data collection device whose device ID is 1 has the highest priority.
  • the body temperature data collection device whose device ID is 71 has the lowest priority. If the above-mentioned multiple body temperature data with multi-source conflicts come from the body temperature data collection device whose device ID is 129 and the body temperature data collection device whose device ID is 71 . Then, the Sports Health APP can select the body temperature data collected by the body temperature data collection device whose device ID is 129 as the fused body temperature data.
  • the device priority determined by the above dataSourcePriority is the priority determined according to the type of body temperature data collection device.
  • the value of dataSourcePriority may include the device class identifier.
  • a device category identifier can identify a category of body temperature data collection equipment.
  • the Sports Health APP can select the body temperature data collected by the body temperature data collection device with the highest category priority as the fused body temperature data.
  • the embodiment of the present application does not limit the representation method of the device class identifier.
  • the device class identifier may be represented by one or more characters such as numbers and letters.
  • the above fused body temperature data can be used for data statistics, data display and other processing.
  • the configuration file of the above body temperature data contains four statistical strategies of MAX, MIN, AVG and COUNT.
  • the sports health APP can perform statistical processing corresponding to the above four statistical strategies on the body temperature data within a period of time, and store the statistically processed statistical body temperature data in the data storage module in the electronic device 100 .
  • the storage format of the statistical body temperature data in the data storage module of the electronic device 100 can refer to the content shown in the following Table 4:
  • each row in Table 4 may represent a record of statistical body temperature data.
  • a record of statistical body temperature data can represent a period of time, for example, within a day, the sports health APP will collect statistical data on the received body temperature data according to a statistical strategy.
  • the Id in Table 4 may indicate the need of the record corresponding to the row.
  • the date in Table 4 may indicate the time period of the body temperature data collection time for data statistics. For example, if the date is 20210722, it can mean that the body temperature data collected within July 22, 2021 will be counted. For other contents in Table 4, reference may be made to the introduction of the foregoing embodiments.
  • the sports health APP can determine the display strategy of the body temperature data according to the configuration file of the body temperature data.
  • the data item display policy displayPolicies is [1, Top], which can indicate that the body temperature data needs to be displayed in the form of a line chart and displayed at the top of the user interface.
  • the Sports Health APP can call the code for drawing a line graph to draw a line graph of body temperature data over a period of time, and display the line graph on the top of the user interface.
  • the sports health APP can also display statistical body temperature data (such as maximum value, minimum value, etc.).
  • FIG. 5A to FIG. 5C exemplarily show schematic diagrams of scenarios in which the electronic device 100 displays body temperature data and collects body temperature data.
  • the electronic device 100 may display a user interface 510 .
  • User interface 510 displays a page on which application icons are placed.
  • the page may include multiple application icons.
  • smart life application icons sports and health application icons 511, YY sports application icons 512, and ZZ health application icons 513.
  • the electronic device 100 may start an application program corresponding to the application icon.
  • the sports and health APP corresponding to the sports and health application icon 511 may be a device management APP for managing body temperature data collection devices.
  • Both the YY Sports APP corresponding to the YY Sports application icon and the ZZ Health APP corresponding to the ZZ Health application icon 513 may be three-party APPs.
  • the electronic device 100 may display a user interface 520 shown in FIG. 5B.
  • the user interface 520 may contain multiple cards.
  • a card can be used to present one type of data.
  • heart rate card 521 may be used to present heart rate data.
  • Body temperature card 522 may be used to present body temperature data.
  • Pressure cards 523 may be used to present pressure data.
  • Athletic log card 524 may be used to present athletic log data.
  • the electronic device 100 may display more detailed content of the data corresponding to the card. For example, the sampling value of the data within a period of time, the statistical data of the data under different statistical strategies, etc.
  • the electronic device 100 may display the user interface 530 shown in FIG. 5C.
  • the user interface 530 may include a time option area 531 , a body temperature data display area 532 , a body temperature mean card 533 and a body temperature range card 534 .
  • the time option area 531 may contain multiple time options.
  • body temperature data in the time period corresponding to this time option can be displayed in the form of a line graph in the body temperature data display area 532 .
  • the body temperature data display area 532 may display a line chart of all body temperature data collected by the body temperature data collection device on January 15.
  • the body temperature data display area 532 may display a line chart of all body temperature data collected by the body temperature data collection device in January. In this way, the user can view body temperature data in different time periods through different time options in the time option area 531 .
  • the average body temperature card 533 can be used to display the average value of body temperature data for a period of time (eg within a day).
  • the body temperature range card 534 can be used to display the range of body temperature data fluctuations for a period of time (eg, within a day).
  • the range of body temperature data fluctuations within a period of time can be determined by the minimum and maximum values of body temperature data within this period of time.
  • FIG. 5A to FIG. 5C are only exemplary illustrations of the data display device displaying body temperature data in the embodiment of the present application, and should not be construed as limiting the present application.
  • the above-mentioned heart rate data, body temperature data, pressure data, and exercise record data are defined as metadata according to the rules of the data dictionary
  • the above-mentioned body temperature data is regarded as a new type of data
  • the above-mentioned heart rate data, pressure data, and exercise record data are used as existing type of data
  • data fusion, data statistics (average body temperature, body temperature range as shown in Figure 5C) and data display (body temperature data display area 532 in the final body temperature data display area 532 as shown in Figure 5C) are performed in the Sports Health APP.
  • Line chart codes can reuse the codes of Sports Health APP to process existing types of data.
  • the code for data fusion (such as a multi-source fusion strategy) for these different types of data in the Sports Health APP is Reusable
  • the code for data statistics (such as statistical strategies) of these different types of data is reusable
  • the code for data display of these different types of data (such as line chart display data) is also reusable .
  • the code for data fusion, data statistics, and data display of the newly added type of data can be reused Code for processing existing types of data in the Sports Health APP.
  • Developers may only need to modify the part of the code used to identify data (such as the type identifier typeID, etc.) in the code that processes existing types of data in the sports health APP to identify the content of the newly added type of data, without modifying the Code logic for processing data, and develop code suitable for processing the newly added type of data. This can reduce the workload of developers when new types of data are connected to the data display device, and improve the efficiency of data connection.
  • the data display device sends the body temperature data to the cloud server according to the data type definition rules of the body temperature data.
  • the data display device can send the body temperature data in the data storage module that has not been synchronized to the cloud to the cloud server.
  • the cloud server may be an application server of a device management APP for managing body temperature data collection devices.
  • the cloud server can identify the received data as body temperature data and specific content in the body temperature data according to the data type definition rules of the body temperature data.
  • the data display device can correlate the sampled value of the body temperature data with the name of the body temperature data identified according to the configuration file of the body temperature data, and then send it to the cloud server.
  • the cloud server can directly store the received body temperature data, instead of identifying whether the received data belongs to body temperature data according to the data type definition rules of the body temperature data before storing it.
  • the data display device can also download the body temperature data from the cloud server.
  • the data shows that the device uninstalls the device management APP and then downloads the device management APP again
  • the data shows that only part of the body temperature data may be stored in the device. Then, the data shows that the device can download the temperature data that is in the cloud server from the cloud server, but the data shows that the device does not have body temperature data.
  • the data display device opens the body temperature data to the third-party APP according to the data type definition rules of the body temperature data.
  • the three-party APP may request the open permission to acquire the body temperature data from the device management APP in the data display device for managing the body temperature data collection device.
  • the device management APP can provide an open interface for body temperature data for the third-party APP.
  • the device management APP can open the body temperature data to the third-party APP through the open interface of the body temperature data.
  • the body temperature data open to the third-party APP can be described according to the data type definition rules of body temperature data.
  • the three-party APP can identify the acquired data as body temperature data and the specific content of the body temperature data according to the data type definition rules of body temperature data.
  • the data display device may also associate the name of the body temperature data in the configuration file of the body temperature data with the sampling value of the body temperature data, and open it to third-party APPs.
  • the third-party APP does not need to identify whether the acquired data belongs to the body temperature data according to the configuration file of the body temperature data.
  • the three-party APP may contain data type definition rules for different types of data.
  • the above-mentioned different types of data may be defined as metadata according to the rules of the data dictionary.
  • the codes for identifying the above-mentioned different types of data in the three-party APP can be reused, and the codes for processing the above-mentioned different types of data can also be reused.
  • the code used to identify the newly added type of data and the code used to process the newly added type of data can be reused in the three-party APP and the existing type The code corresponding to the data. This can reduce the workload of the developer of the third-party APP when new types of data are connected to the third-party APP, and improve the efficiency of data access.
  • Another communication system 60 provided by the embodiment of the present application will be introduced below based on the above processing process of body temperature data.
  • the communication system 60 may include a body temperature data collection device 610 , an electronic device 100 , and a cloud server 300 . in:
  • the body temperature data collection device 610 may include a body temperature data collection module 611 and a data reporting module 612 .
  • the body temperature data collection module 611 can be used to collect body temperature data and send the body temperature data to the data reporting module 612 .
  • the data reporting module 612 the data type definition rules in the configuration file with body temperature data are written.
  • the data reporting module 612 can report to the sports health APP in the electronic device 100 according to the rules of the data dictionary.
  • the process of reporting the body temperature data by the data reporting module 612 according to the rules of the data dictionary may be a process of describing the body temperature data according to the data type definition rules in the configuration file of the body temperature data, and sending the described body temperature data.
  • the electronic device 100 may include sports and health APPs and three-party APPs.
  • the sports health APP mentioned above may be a device management APP for managing the body temperature data collection device 610 .
  • the sports health APP may include a data calculation module 621 , a data storage module 622 , a data presentation module 623 , a data opening module 624 and a data dictionary 625 .
  • the data dictionary 625 may contain configuration files of body temperature data.
  • the sports health APP can use the body temperature data configuration file in the data dictionary 625 to identify the body temperature data reported by the body temperature data collection device 610 according to the rules of the data dictionary.
  • the data calculation module 621 can perform calculation processing such as data fusion and data statistics on the body temperature data according to the configuration file of the body temperature data.
  • the data storage module 622 can store body temperature data.
  • the storage format of the body temperature data in the data storage module 622 reference may be made to the introduction of the foregoing embodiments.
  • the data display module 623 can be used to display multiple sampled values of body temperature data and statistical values of body temperature data obtained through data statistics.
  • the displayed body temperature data may be data obtained through data fusion by the data calculation module 621 .
  • the above data open module 624 can be used to provide an open interface for body temperature data for three-party APPs.
  • the sports health APP can also use the above-mentioned data calculation module 621, data storage module 622, data display module 623 and data open module 624 to correspond to other data defined by metadata according to the rules of the data dictionary. management. That is, the data calculation module 621 , data storage module 622 , data display module 623 and data opening module 624 can be reused.
  • developers do not need to develop additional modules suitable for managing the added type of data.
  • the sports health APP can open the body temperature data to third-party APPs that have the authority to obtain body temperature data through the body temperature data open interface provided by the data open module 624 .
  • the above-mentioned body temperature data open to the third-party APP may be obtained after being described according to the data type definition rules of body temperature data.
  • the body temperature data described above may include a type identifier of the body temperature data and a sampling value of the body temperature data.
  • the third-party APP can identify the acquired body temperature data according to the data type definition rules of the body temperature data, and use the body temperature data to realize its own demand business.
  • the Sports Health APP can also associate the name of the body temperature data in the configuration file of the body temperature data with the sampling value of the body temperature data, and open it to third-party apps. In this way, the third-party APP does not need to identify whether the acquired data belongs to the body temperature data according to the configuration file of the body temperature data.
  • the Sports Health APP can also perform cloud synchronization on body temperature data.
  • the sports health APP can describe according to the data type definition rules of the body temperature data, and send the described body temperature data to the cloud server 300 .
  • the body temperature data described above may include a type identifier of the body temperature data and a sampling value of the body temperature data.
  • the cloud server 300 can identify and store the received body temperature data according to the data type definition rules of the body temperature data.
  • the Sports Health APP can also associate the sampled value of the body temperature data with the name of the body temperature data identified according to the configuration file of the body temperature data, and then send it to the cloud server. In this way, the cloud server can directly store the received body temperature data, instead of identifying whether the received data belongs to body temperature data according to the data type definition rules of the body temperature data before storing it.
  • the newly added type of data is connected to the data display device, cloud server, third-party APP, and the data display device.
  • Codes for processing data of the newly added type such as analysis and display may reuse codes for processing existing types of data. This can reduce the workload of developers and improve the efficiency of data access.

Abstract

The present application provides a data processing method, a related apparatus, and a communication system. In the method, a data acquisition device can, according to a rule of a data dictionary, report data to a data display device. The data display device can identify the data according to the rule of the data dictionary, analyze and display the data, and synchronize the data to a cloud server and open the data to a third-party application. The cloud server and the third-party application can both identify the data according to the rule of the data dictionary. The described method can facilitate the reuse of codes for different types of data accessing a data display device, a cloud server, and a third-party application as defined according to rules of a data dictionary, thus reducing the workload of the developers and improving the efficiency of data access.

Description

数据处理方法、相关装置及通信系统Data processing method, related device and communication system
本申请要求于2021年10月14日提交中国专利局、申请号为202111198750.0、申请名称为“数据处理方法、相关装置及通信系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to a Chinese patent application with application number 202111198750.0 and application title "Data Processing Method, Related Device, and Communication System" filed with the China Patent Office on October 14, 2021, the entire contents of which are incorporated herein by reference Applying.
技术领域technical field
本申请涉及终端技术领域,尤其涉及数据处理方法、相关装置及通信系统。The present application relates to the technical field of terminals, and in particular to a data processing method, a related device and a communication system.
背景技术Background technique
随着物联网技术的发展,智能穿戴设备、智能家居设备等设备的类型越来越多。这些设备可以采集用户的运动健康数据、家庭状态数据等多方面的数据。这些设备的主要功能为进行数据采集,可能不具备数据分析与显示的能力,或者数据分析与显示的能力较弱。这些设备可以将采集的数据发送给具备数据分析与显示能力的电子设备,例如手机、平板电脑等。但随着数据采集设备种类增加、数据类型增加,新增类型的数据接入至数据显示设备需要多方开发人员修改代码逻辑,来确保新增类型的数据可以呈现在数据显示设备中,并且不与已有的数据冲突。这使得新增类型的数据接入效率低、开发人员工作量大。With the development of Internet of Things technology, there are more and more types of devices such as smart wearable devices and smart home devices. These devices can collect various data such as the user's sports health data and family status data. The main function of these devices is to collect data, and may not have the ability of data analysis and display, or the ability of data analysis and display is weak. These devices can send the collected data to electronic devices with data analysis and display capabilities, such as mobile phones and tablet computers. However, with the increase in the types of data acquisition devices and data types, the access of new types of data to data display devices requires multiple developers to modify the code logic to ensure that the newly added types of data can be presented in the data display device and do not interfere with Existing data conflicts. This makes the data access efficiency of new types low, and the workload of developers is heavy.
发明内容Contents of the invention
本申请提供数据处理方法、相关装置及通信系统。该方法通过按照数据字典的规则来定义数据采集设备采集的数据,不同类型的数据接入数据显示设备、云服务器和三方应用的代码可以复用。这可以减少在产生新的类型的数据接入数据显示设备、云服务器和三方应用时,开发人员的工作量,提高数据接入的效率。This application provides a data processing method, a related device and a communication system. The method defines the data collected by the data collection device according to the rules of the data dictionary, and the codes of different types of data access data display devices, cloud servers and third-party applications can be reused. This can reduce the workload of developers when generating new types of data access data display devices, cloud servers and third-party applications, and improve the efficiency of data access.
第一方面,本申请提供一种数据处理方法。在该方法中,第一设备接收到来自第一数据采集设备的第一数据。第一数据包含第一数据标识和第一类型数据的第一采样值,且符合第一配置文件的规则。第一配置文件是按照第一规则定义的。第一配置文件中可包含第一数据标识,第一数据标识可用于标识第一类型数据,第一数据标识在按照第一规则定义的数据标识中具有唯一性。第一设备可根据第一数据标识和第一配置文件,识别出第一数据属于第一类型数据。In a first aspect, the present application provides a data processing method. In the method, a first device receives first data from a first data collection device. The first data includes a first data identifier and a first sample value of the first type of data, and conforms to the rules of the first configuration file. A first profile is defined according to a first rule. The first configuration file may include a first data identifier, the first data identifier may be used to identify the first type of data, and the first data identifier is unique among the data identifiers defined according to the first rule. The first device may identify that the first data belongs to the first type of data according to the first data identifier and the first configuration file.
上述第一规则包含对数据的数据标识、数据名称、数据存储方式、数据处理方式等属性中的一项或多项的定义和描述。即第一规则可用于为不同类型的数据提供统一的定义方式。上述按照第一规则定义的各个数据标识在所有按照第一规则定义的数据标识中具有唯一性,互不冲突。其中,上述第一规则可以是数据字典的规则。The above-mentioned first rule includes the definition and description of one or more of attributes such as data identification, data name, data storage method, and data processing method. That is, the first rule can be used to provide a unified definition method for different types of data. The above data identifiers defined according to the first rule are unique among all the data identifiers defined according to the first rule and do not conflict with each other. Wherein, the above-mentioned first rule may be a rule of a data dictionary.
在一种可能的实现方式中,上述第一配置文件中可包含第一类型数据的数据类型定义规则。该数据类型定义规则可以包含上述第一数据标识。上述第一数据符合第一配置文件的规则,具体可以为符合上述第一类型数据的数据类型定义规则。第一数据采集设备中可固化有上述第一类型数据的数据类型定义规则。当采集到上述第一类型数据的第一采样值,第一数据采集设备可以根据第一类型数据的数据类型定义规则将第一数据标识和第一采样值关联,得到上述第一数据,并向第一设备发送第一数据。In a possible implementation manner, the first configuration file may include data type definition rules for the first type of data. The data type definition rule may include the above-mentioned first data identifier. The above-mentioned first data conforms to the rules of the first configuration file, and specifically may be a data type definition rule conforming to the above-mentioned first type of data. The data type definition rules for the above-mentioned first type of data may be solidified in the first data collection device. When the first sampling value of the above-mentioned first type of data is collected, the first data collection device can associate the first data identifier with the first sampling value according to the data type definition rule of the first type of data, obtain the above-mentioned first data, and send the The first device sends first data.
结合第一方面,在一些实施例中,第一设备可以接收到来自第二数据采集设备的第二数据,第二数据包含第二数据标识和第二类型数据的第二采样值,且符合第二配置文件的规则,第二配置文件是按照第一规则定义的,第二配置文件中包含第二数据标识,第二数据标识用于标识第二类型数据,第二数据标识在按照第一规则定义的数据标识中具有唯一性。第一设备可根据第二数据标识和第二配置文件,识别出第二数据属于第二类型数据。其中,第一设备中用于识别第一数据的程序和用于识别第二数据的程序相同。第一设备中用于识别数据的程序即为用于识别数据的代码。With reference to the first aspect, in some embodiments, the first device may receive the second data from the second data collection device, the second data includes the second data identifier and the second sampled value of the second type of data, and conforms to the first The rules of the second configuration file, the second configuration file is defined according to the first rule, the second configuration file contains the second data identifier, the second data identifier is used to identify the second type of data, and the second data identifier is in accordance with the first rule Unique within the defined data ID. The first device may identify that the second data belongs to the second type of data according to the second data identifier and the second configuration file. Wherein, the program for identifying the first data in the first device is the same as the program for identifying the second data. The program for identifying data in the first device is the code for identifying data.
第二数据采集设备获取第二数据的方法可以参考前述第一数据采集设备获取第一数据的方法。For the method for the second data collection device to obtain the second data, reference may be made to the aforementioned method for the first data collection device to obtain the first data.
在一些实施例中,上述第一配置文件和上述第二配置文件可以是两个不同的配置文件。即按照数据字典的规则进行定义的每一种类型的数据均可以对应有一个配置文件。可选的,上述第一配置文件和上述第二配置文件也可以是一个配置文件中的不同部分。即按照数据字典的规则进行定义的每一种类型的数据对应的定义内容均可以写入一个配置文件中。In some embodiments, the above-mentioned first configuration file and the above-mentioned second configuration file may be two different configuration files. That is, each type of data defined according to the rules of the data dictionary can correspond to a configuration file. Optionally, the above-mentioned first configuration file and the above-mentioned second configuration file may also be different parts of one configuration file. That is, the definition content corresponding to each type of data defined according to the rules of the data dictionary can be written into a configuration file.
由上述实施例可以看出,利用上述数据字典的规则,在新增一种类型的数据的情况下,第一设备可以利用识别已有类型的数据程序来识别新增类型的数据。这可以减少数据采集设备采集的数据接入第一设备过程中开发人员的工作量,提高数据接入的效率。It can be seen from the above embodiments that, using the rules of the above data dictionary, in the case of adding a new type of data, the first device can identify the newly added type of data by using the program for identifying existing types of data. This can reduce the workload of developers during the process of data collected by the data collection device being connected to the first device, and improve the efficiency of data connection.
结合第一方面,在一些实施例中,第一配置文件中还可包含第一类型数据的融合策略。例如多源融合策略、同源融合策略。With reference to the first aspect, in some embodiments, the first configuration file may further include a fusion strategy for the first type of data. For example, multi-source fusion strategy and homologous fusion strategy.
其中,在接收到多个不同的数据采集设备在同一个时间采集的同一类型的数据的情况下,第一设备可以根据这一类型的数据的配置文件中定义的多源融合策略,对来自多个不同的数据采集设备采集的数据进行数据融合。Wherein, in the case of receiving the same type of data collected by multiple different data collection devices at the same time, the first device may, according to the multi-source fusion policy defined in the configuration file of this type of data, The data collected by different data collection devices is used for data fusion.
具体的,上述第一采样值是第一数据采集设备在第一时间采集的。第一设备还接收到第一类型数据的M个采样值,M个采样值分别是M个数据采集设备在第一时间采集的。M为正整数。第一设备从第一配置文件确定出第一类型数据的数据融合策略为第一融合策略,并按照第一融合策略从第一采样值和M个采样值中确定出一个采样值,作为第一类型数据在第一时间的采样值;第一融合策略为以下任意一项:取最大值、取最小值、取存入第一设备的时间最早的值、取存入第一设备的时间最晚的值、取第一数据采集设备和M个数据采集设备中设备优先级最高的设备采集的采样值。Specifically, the above-mentioned first sampling value is collected by the first data collection device at the first time. The first device also receives M sample values of the first type of data, and the M sample values are respectively collected by M data collection devices at the first time. M is a positive integer. The first device determines from the first configuration file that the data fusion strategy for the first type of data is the first fusion strategy, and determines a sampling value from the first sampling value and M sampling values according to the first fusion strategy as the first The sampling value of type data at the first time; the first fusion strategy is any of the following: take the maximum value, take the minimum value, take the earliest value stored in the first device, and take the latest time stored in the first device The value of the first data collection device and the sampling value collected by the device with the highest device priority among the M data collection devices.
其中,在数据采集设备确定一种类型的数据不能即时采集即时得到结果,而需要利用前一段时间内采集的多个数据进行处理得到结果的情况下,第一设备可以根据这一类型的数据的配置文件中定义的同源融合策略,对来同一个数据采集设备采集的多个数据进行数据融合。Among them, when the data acquisition device determines that a type of data cannot be collected immediately to obtain the result, but needs to be processed by using multiple data collected in the previous period of time to obtain the result, the first device can The same-source fusion strategy defined in the configuration file performs data fusion on multiple data collected by the same data collection device.
在一些实施例中,第二配置文件中还可以包含第二类型数据的融合策略。第一设备还可以根据第二配置文件中的融合策略对第二类型数据的采样值进行数据融合。可以理解的,由于上述第一类型数据和上述第二类型数据均按照数据字典的规则定义,具有不同的数据标识,在第一类型数据的融合策略与第二类型数据的融合策略相同的情况下,第一设备可以调用相同的用于进行数据融合的程序来对上述第一类型数据和上述第二类型数据进行数据融合。即用于对按照数据字典的规则定义的不同类型的数据进行数据融合的程序可以复用。这可以减少开发人员的工作量,提高数据接入第一设备的效率。In some embodiments, the second configuration file may further include a fusion strategy for the second type of data. The first device may also perform data fusion on the sampled values of the second type of data according to the fusion policy in the second configuration file. It can be understood that since the above-mentioned first type of data and the above-mentioned second type of data are both defined according to the rules of the data dictionary and have different data identifiers, when the fusion strategy of the first type of data is the same as the fusion strategy of the second type of data , the first device may call the same program for performing data fusion to perform data fusion on the first type of data and the second type of data. That is, the program for data fusion of different types of data defined according to the rules of the data dictionary can be reused. This can reduce the workload of developers and improve the efficiency of data access to the first device.
结合第一方面,在一些实施例中,第一配置文件中还可包含第一类型数据的统计策略。With reference to the first aspect, in some embodiments, the first configuration file may further include statistics policies for the first type of data.
其中,第一设备可以根据一个类型的数据的配置文件中定义的统计策略,对这一个类型的数据在一段时间内的采样值进行数据统计。Wherein, the first device may perform data statistics on sampling values of a type of data within a period of time according to a statistical strategy defined in a configuration file of the type of data.
具体的,第一设备可以从第一配置文件确定出第一类型数据的数据统计策略为第一统计策略,第一统计策略包含以下一项或多项:计算最大值、计算最小值、计算均值、求和、计算方差、计算采样值的数量、确定采集时间最晚的采样值。第一设备可以按照第一统计策略对采集时间在第一时间段内第一类型数据的N个采样值进行数据统计,N为正整数。Specifically, the first device may determine from the first configuration file that the data statistics strategy of the first type of data is the first statistics strategy, and the first statistics strategy includes one or more of the following: calculating the maximum value, calculating the minimum value, and calculating the average value , sum, calculate variance, calculate the number of sampled values, determine the sampled value with the latest acquisition time. The first device may perform data statistics on N sampling values of the first type of data collected within the first time period according to the first statistical strategy, where N is a positive integer.
在一些实施例中,第二配置文件中还可以包含第二类型数据的统计策略。可以理解的,由于上述第一类型数据和上述第二类型数据均按照数据字典的规则定义,具有不同的数据标识,在第一类型数据的统计策略与第二类型数据的统计策略相同的情况下,第一设备可以调用相同的用于进行数据统计的程序来对上述第一类型数据和上述第二类型数据进行数据统计。即用于对按照数据字典的规则定义的不同类型的数据进行数据统计的程序可以复用。这可以减少开发人员的工作量,提高数据接入第一设备的效率。In some embodiments, the second configuration file may also include statistics policies for the second type of data. It can be understood that since the above-mentioned first type of data and the above-mentioned second type of data are both defined according to the rules of the data dictionary and have different data identifiers, when the statistical strategy of the first type of data is the same as the statistical strategy of the second type of data , the first device may invoke the same program for performing data statistics to perform data statistics on the first type of data and the second type of data. That is, the program used to perform data statistics on different types of data defined according to the rules of the data dictionary can be reused. This can reduce the workload of developers and improve the efficiency of data access to the first device.
结合第一方面,在一些实施例中,上述第一类型数据可以是单点数据。单点数据可以表示数据采集设备在一个时刻进行数据采集时仅采集到一个类型的数据。例如,心率数据、体温数据、体重数据均为单点数据。单点数据可以包含一个字段。例如,心率数据包含的一个字段即为心率。单点数据可以具有数据标识。单点数据包含的字段可以具有字段标识。由于单点数据仅包含一个字段,上述用于标识第一类型数据的第一数据标识可以为第一类型数据作为单点数据的数据标识,或者,也可以为第一类型数据包含的字段的字段标识。With reference to the first aspect, in some embodiments, the above-mentioned first type of data may be single point data. Single-point data can mean that the data collection device collects only one type of data when collecting data at a time. For example, heart rate data, body temperature data, and weight data are all single-point data. Single point data can contain a field. For example, heart rate data includes a field called heart rate. Single-point data can have data identifiers. Fields contained in single-point data can have field identifiers. Since the single-point data only contains one field, the above-mentioned first data identifier used to identify the first type of data may be the data identifier of the first type of data as the single-point data, or may also be a field of a field contained in the first type of data logo.
在另一些实施例中,上述第一类型数据可以是多点数据中的一个字段。多点数据可以表示数据采集设备在一个时刻进行数据采集可以得到多个类型的数据。例如,血压数据为多点数据。多点数据可以包含多个字段。例如,血压数据可以包含两个字段:舒张压、收缩压。多点数据可以具有数据标识。多点数据包含的每一个字段均可以具有不同的字段标识。上述用于标识第一类型数据的第一数据标识可以是一个字段标识。可选的,当采集到一个多点数据包含的多个字段的采样值,数据采集设备也可以将这一个多点数据的数据标识、这一个多点数据包含的多个字段的字段标识以及这多个字段的采样值发送给第一设备。In some other embodiments, the above-mentioned first type of data may be a field in multipoint data. Multi-point data can mean that the data collection equipment can obtain multiple types of data at a time for data collection. For example, blood pressure data is multi-point data. Multipoint data can contain multiple fields. For example, blood pressure data can contain two fields: diastolic, systolic. Multipoint data can have data identifiers. Each field included in the multi-point data can have a different field identifier. The above-mentioned first data identifier used to identify the first type of data may be a field identifier. Optionally, when sampling values of multiple fields contained in a multi-point data are collected, the data acquisition device may also use the data identifier of the multi-point data, the field identifiers of the multiple fields contained in the multi-point data, and the The sampled values of the multiple fields are sent to the first device.
结合第一方面,在一些实施例中,第一设备包含显示装置,第一配置文件中包含第一类型数据的第一显示策略,第一显示策略包含以下一项或多项:第一显示形式、第一显示位置。第一设备可以通过上述显示装置,在第一用户界面上按照第一显示策略显示接收到的第一类型数据的采样值。With reference to the first aspect, in some embodiments, the first device includes a display device, the first configuration file includes a first display strategy for the first type of data, and the first display strategy includes one or more of the following: a first display form , the first display position. The first device may display the received sampling value of the first type of data on the first user interface according to the first display strategy through the above display means.
结合第一方面,在一些实施例中,第二配置文件中包含第二类型数据的第二显示策略,第二显示策略与第一显示策略相同。第一设备还可以通过显示装置,在第二用户界面上按照第一显示策略显示接收到的第二类型数据的采样值;其中,用于使得第一类型数据的采样值按照第一显示策略显示的程序,与用于使得第二类型数据的采样值按照第一显示策略显示的程序相同。例如,上述第一显示形式为折线图,第一设备可以调用相同的用于绘制折线图的程序来绘制第一类型数据的采样值和第二类型数据的采样值。With reference to the first aspect, in some embodiments, the second configuration file includes a second display strategy for the second type of data, and the second display strategy is the same as the first display strategy. The first device may also use the display device to display the sampled value of the second type of data received on the second user interface according to the first display strategy; wherein, it is used to display the sampled value of the first type of data according to the first display strategy The procedure for is the same as the procedure for displaying the sampled values of the second type of data according to the first display strategy. For example, the above-mentioned first display form is a line chart, and the first device may invoke the same program for drawing a line chart to draw the sampled values of the first type of data and the sampled values of the second type of data.
可以看出,用于对按照数据字典的规则定义的不同类型的数据进行显示的程序可以复用。这可以减少开发人员的工作量,提高数据接入第一设备的效率。It can be seen that the programs for displaying different types of data defined according to the rules of the data dictionary can be reused. This can reduce the workload of developers and improve the efficiency of data access to the first device.
结合第一方面,在一些实施例中,第一配置文件还包含第一类型数据的第一描述信息。该第一描述信息可以例如是第一类型数据的名称。第一设备可以向云服务器发送第三数据,第三数据包含第一描述信息和第一类型数据的采样值。云服务器可以存储上述第三数据。这样可以实现第一类型数据云同步。With reference to the first aspect, in some embodiments, the first configuration file further includes first description information of the first type of data. The first description information may be, for example, the name of the first type of data. The first device may send third data to the cloud server, where the third data includes first description information and sampling values of the first type of data. The cloud server can store the above third data. In this way, the first type of data cloud synchronization can be realized.
在一些实施例中,第二配置文件还包含第二类型数据的第二描述信息。该第二描述信息可以例如是第二类型数据的名称。第一设备可以向云服务器发送包含第二描述信息和第二类 型数据的采样值的数据。云服务器可以存储第二类型数据的采样值。In some embodiments, the second configuration file further includes second description information of the second type of data. The second description information may be, for example, the name of the second type of data. The first device may send data including the second description information and sampled values of the second type of data to the cloud server. The cloud server may store sampled values of the second type of data.
其中,由于上述第一类型数据和上述第二类型数据均按照数据字典的规则定义,具有不同的数据标识,第一设备可以通过同一个数据交互接口向云服务器发送上述第三数据和上述包含第二描述信息和第二类型数据的采样值的数据。也即是说,在产生新的类型的数据时,开发人员可以不用另外开发第一设备中适用于新增类型数据接入云服务器的数据交互接口。这可以减少新增类型数据接入云服务器时开发人员的工作量,提高数据接入的效率。Wherein, since the above-mentioned first type of data and the above-mentioned second type of data are defined according to the rules of the data dictionary and have different data identifiers, the first device can send the above-mentioned third data and the above-mentioned 2. Data describing the information and sampled values of the second type of data. That is to say, when a new type of data is generated, the developer does not need to additionally develop a data interaction interface in the first device suitable for accessing the new type of data to the cloud server. This can reduce the workload of developers when adding new types of data to the cloud server, and improve the efficiency of data access.
结合第一方面,在一些实施例中,第一设备中安装有第一应用程序,第一应用程序具有获取第一类型数据的权限,第一配置文件包含第一类型数据的第一描述信息。第一设备可以响应于第一应用程序获取第一类型数据的请求,将第四数据提供给第一应用程序。第四数据包含第一描述信息和第一类型数据的采样值。With reference to the first aspect, in some embodiments, a first application is installed on the first device, the first application has permission to obtain the first type of data, and the first configuration file includes first description information of the first type of data. The first device may provide the fourth data to the first application in response to the first application's request for the first type of data. The fourth data includes the first description information and sample values of the first type of data.
在一些实施例中,上述第一应用程序具有获取第一类型数据的权限。第二配置文件中包含第二类型数据的第二描述信息。第一设备可以响应于第一应用程序获取第一类型数据的请求,将包含第二描述信息和第二类型数据的采样值的数据提供给第一应用程序。In some embodiments, the above-mentioned first application program has permission to obtain the first type of data. The second configuration file includes second description information of the second type of data. The first device may provide data including the second description information and the sampled value of the second type of data to the first application program in response to the first application program's request for acquiring the first type of data.
其中,由于上述第一类型数据和上述第二类型数据均按照数据字典的规则定义,具有不同的数据标识,第一设备可以通过同一个数据开放接口向第一应用程序提供上述第四数据和包含第二描述信息和第二类型数据的采样值的数据。也即是说,在产生新的类型的数据时,开发人员可以不用另外开发第一设备中适用于新增类型数据开放给第一应用程序的数据开放接口。这可以减少新增类型数据开放给第一应用程序时开发人员的工作量,提高数据接入的效率。Wherein, since the above-mentioned first-type data and the above-mentioned second-type data are both defined according to the rules of the data dictionary and have different data identifiers, the first device can provide the first application program with the above-mentioned fourth data and the The second description information and the data of the sampling value of the second type of data. That is to say, when a new type of data is generated, the developer does not need to additionally develop a data opening interface in the first device suitable for opening the newly added type of data to the first application program. This can reduce the workload of the developer when the new type of data is opened to the first application program, and improve the efficiency of data access.
结合第一方面,在一些实施例中,第一设备为云服务器。云服务器可以向数据显示设备发送第五数据,第五数据包含第一数据标识和第一类型数据的采样值。也即是说,第一数据采集设备可以将采集到的数据按照数据字典的规则发送给云服务器。云服务器可以根据遵循数据字典的规则的配置文件来识别来自数据采集设备的数据,并将来自数据采集设备的数据发送给数据显示设备。数据显示设备中存储有遵循数据字典的规则的配置文件。数据显示设备可以根据遵循数据字典的规则的配置文件来识别接收到的数据,并按照配置文件中的显示策略、数据融合策略、数据统计策略等规则对数据进行处理。例如,数据显示设备可以根据第一数据标识和第一配置文件识别出第五数据属于第一类型数据。进一步的,数据显示设备可以根据第一配置文件中的显示策略来对第一类型数据的采样值。With reference to the first aspect, in some embodiments, the first device is a cloud server. The cloud server may send fifth data to the data display device, where the fifth data includes the first data identifier and the sampling value of the first type of data. That is to say, the first data collection device can send the collected data to the cloud server according to the rules of the data dictionary. The cloud server can identify the data from the data collection device according to the configuration file following the rules of the data dictionary, and send the data from the data collection device to the data display device. The data shows that configuration files that follow the rules of the data dictionary are stored in the device. The data display device can identify the received data according to the configuration file following the rules of the data dictionary, and process the data according to the display strategy, data fusion strategy, data statistics strategy and other rules in the configuration file. For example, the data display device may identify that the fifth data belongs to the first type of data according to the first data identifier and the first configuration file. Further, the data display device may sample the first type of data according to the display strategy in the first configuration file.
在一些实施例中,第一设备为云服务器。第一配置文件中包含第一类型数据的第一描述信息。云服务器可以向数据显示设备发送第六数据。第六数据可以包含第一描述信息和第一类型数据的采样值。数据显示设备接收到第六数据,可以根据第六数据中的第一描述信息确定出第六数据属于第一类型数据。即数据显示设备可以不用依据遵循数据字典的规则的配置文件来识别第六数据的类型。其中,数据显示设备中存储有遵循数据字典的规则的配置文件。数据显示设备可以根据第一配置文件来确定第一类型数据的显示策略、数据统计策略、数据融合策略等规则,对第一类型数据的采样值进行处理。In some embodiments, the first device is a cloud server. The first configuration file includes first description information of the first type of data. The cloud server can send the sixth data to the data display device. The sixth data may include the first description information and sample values of the first type of data. After receiving the sixth data, the data display device may determine that the sixth data belongs to the first type of data according to the first description information in the sixth data. That is, the data display device may not identify the type of the sixth data according to the configuration file following the rules of the data dictionary. Wherein, the configuration file following the rules of the data dictionary is stored in the data display device. The data display device may determine rules such as a display policy, a data statistics policy, and a data fusion policy of the first type of data according to the first configuration file, and process the sampled values of the first type of data.
在一些实施例中,第一设备为云服务器。云服务器可以向数据显示设备发送第六数据。另外,云服务器还可以将第一配置文件中的显示策略、数据融合策略、数据统计策略等规则发送给数据显示设备。这样,数据显示设备中可以不用存储遵循数据字典的规则的配置文件。其中,数据显示设备接收到第六数据,可以根据第六数据中的第一描述信息确定出第六数据属于第一类型数据。数据显示设备可以根据接收到的对第一类型数据进行处理的规则对第一类型数据进行处理。In some embodiments, the first device is a cloud server. The cloud server can send the sixth data to the data display device. In addition, the cloud server may also send the display policy, data fusion policy, data statistics policy and other rules in the first configuration file to the data display device. In this way, the data display device does not need to store configuration files that comply with the rules of the data dictionary. Wherein, when the data display device receives the sixth data, it can be determined according to the first description information in the sixth data that the sixth data belongs to the first type of data. The data display device can process the first type of data according to the received rule for processing the first type of data.
结合第一方面,在一些实施例中,第一数据采集设备可以为以下任意一种设备:智能手表、智能手环、体脂秤、智能眼镜、体温计、血压计、心率监测设备。With reference to the first aspect, in some embodiments, the first data collection device may be any of the following devices: smart watch, smart bracelet, body fat scale, smart glasses, thermometer, blood pressure monitor, heart rate monitoring device.
结合第一方面,在一些实施例中,第一类型数据可以为以下任意一种数据:步行数据、跑步数据、游泳数据、骑行数据、睡眠数据、体重数据、压力数据、心率数据、血压数据、体温数据、血氧数据、血糖数据。In combination with the first aspect, in some embodiments, the first type of data can be any of the following data: walking data, running data, swimming data, cycling data, sleep data, weight data, pressure data, heart rate data, blood pressure data , body temperature data, blood oxygen data, blood sugar data.
第二方面,本申请提供一种数据处理方法。其中,第一数据采集设备可以获取第一数据,第一数据包含第一数据标识和第一类型数据的第一采样值,且符合第一配置文件的规则,第一配置文件是按照第一规则定义的,第一配置文件中包含第一数据标识,第一数据标识用于标识第一类型数据,第一数据标识在按照第一规则定义的数据标识中具有唯一性。第一数据采集设备将第一数据发送给第一设备。In a second aspect, the present application provides a data processing method. Wherein, the first data collection device can obtain the first data, the first data includes the first data identifier and the first sampling value of the first type of data, and conforms to the rules of the first configuration file, and the first configuration file is based on the first rule Defined, the first configuration file includes a first data identifier, the first data identifier is used to identify the first type of data, and the first data identifier is unique among the data identifiers defined according to the first rule. The first data collection device sends the first data to the first device.
其中,上述第一规则可以是数据字典的规则。Wherein, the above-mentioned first rule may be a rule of a data dictionary.
结合第二方面,在一些实施例中,第一数据采集设备可以为以下任意一种设备:智能手表、智能手环、体脂秤、智能眼镜、体温计、血压计、心率监测设备。With reference to the second aspect, in some embodiments, the first data collection device may be any of the following devices: smart watch, smart bracelet, body fat scale, smart glasses, thermometer, blood pressure monitor, heart rate monitoring device.
结合第二方面,在一些实施例中,第一类型数据可以为以下任意一种数据:步行数据、跑步数据、游泳数据、骑行数据、睡眠数据、体重数据、压力数据、心率数据、血压数据、体温数据、血氧数据、血糖数据。In combination with the second aspect, in some embodiments, the first type of data may be any of the following data: walking data, running data, swimming data, cycling data, sleep data, weight data, pressure data, heart rate data, blood pressure data , body temperature data, blood oxygen data, blood sugar data.
第三方面,本申请提供一种通信系统。该通信系统可包括第一数据采集设备和数据显示设备。其中,第一数据采集设备可用于获取第一数据,并将第一数据发送给数据显示设备;第一数据包含第一数据标识和第一类型数据的第一采样值,且符合第一配置文件的规则,第一配置文件是按照第一规则定义的,第一配置文件中包含第一数据标识,第一数据标识用于标识第一类型数据,第一数据标识在按照第一规则定义的数据标识中具有唯一性。数据显示设备可用于根据第一数据标识和第一配置文件,识别出第一数据属于第一类型数据。In a third aspect, the present application provides a communication system. The communication system may include a first data collection device and a data display device. Wherein, the first data acquisition device can be used to obtain the first data and send the first data to the data display device; the first data includes the first data identifier and the first sampling value of the first type of data, and conforms to the first configuration file The first configuration file is defined according to the first rule. The first configuration file contains the first data identifier. The first data identifier is used to identify the first type of data. The first data identifier is defined in accordance with the first rule. ID is unique. The data display device can be used to identify that the first data belongs to the first type of data according to the first data identifier and the first configuration file.
其中,上述第一规则可以是数据字典的规则。Wherein, the above-mentioned first rule may be a rule of a data dictionary.
由上述实施例可以看出,利用上述数据字典的规则,在新增一种类型的数据的情况下,第一设备可以利用识别已有类型的数据程序来识别新增类型的数据。这可以减少数据采集设备采集的数据接入第一设备过程中开发人员的工作量,提高数据接入的效率。It can be seen from the above embodiments that, using the rules of the above data dictionary, in the case of adding a new type of data, the first device can identify the newly added type of data by using the program for identifying existing types of data. This can reduce the workload of developers during the process of data collected by the data collection device being connected to the first device, and improve the efficiency of data connection.
结合第三方面,在一些实施例中,该通信系统还可包括云服务器,第一配置文件包含第一类型数据的第一描述信息。数据显示设备还可用于向云服务器发送第三数据,第三数据包含第一描述信息和第一类型数据的采样值。云服务器可用于存储第三数据。With reference to the third aspect, in some embodiments, the communication system may further include a cloud server, and the first configuration file includes first description information of the first type of data. The data display device can also be used to send the third data to the cloud server, the third data includes the first description information and the sampling value of the first type of data. The cloud server can be used to store the third data.
第四方面,本申请提供一种设备。上述设备包括:通信装置、存储器和处理器,上述存储器可用于存储计算机程序,上述处理器可用于调用上述计算机程序,使得上述设备执行如第一方面或第二方面中任一可能的实现方法。In a fourth aspect, the present application provides a device. The above-mentioned device includes: a communication device, a memory, and a processor. The above-mentioned memory can be used to store a computer program, and the above-mentioned processor can be used to call the above-mentioned computer program, so that the above-mentioned device executes any possible implementation method according to the first aspect or the second aspect.
第五方面,本申请提供一种芯片,该芯片应用于设备,该芯片包括一个或多个处理器,该处理器用于调用计算机指令以使得该设备执行如第一方面或第二方面中任一可能的实现方法。In a fifth aspect, the present application provides a chip, the chip is applied to a device, the chip includes one or more processors, and the processor is used to invoke computer instructions so that the device performs any one of the first aspect or the second aspect. possible implementation methods.
第六方面,本申请提供一种包含指令的计算机程序产品,其特征在于,当上述计算机程序产品在设备上运行时,使得该设备执行如第一方面或第二方面中任一可能的实现方法。In a sixth aspect, the present application provides a computer program product containing instructions, which is characterized in that, when the above computer program product is run on a device, the device is made to execute any possible implementation method as in the first aspect or the second aspect .
第七方面,本申请提供一种计算机可读存储介质,包括指令,其特征在于,当上述指令在设备上运行时,使得该设备执行如第一方面或第二方面中任一可能的实现方法。In the seventh aspect, the present application provides a computer-readable storage medium, including instructions, which is characterized in that, when the above-mentioned instructions are run on a device, the device is made to perform any possible implementation method according to the first aspect or the second aspect .
可以理解地,上述第四方面提供的设备、第五方面提供的芯片、第六方面提供的计算机程序产品、第七方面提供的计算机可读存储介质均用于执行本申请实施例所提供的方法。因 此,其所能达到的有益效果可参考对应方法中的有益效果,此处不再赘述。It can be understood that the device provided in the fourth aspect, the chip provided in the fifth aspect, the computer program product provided in the sixth aspect, and the computer-readable storage medium provided in the seventh aspect are all used to execute the method provided in the embodiment of the present application . Therefore, the beneficial effects that it can achieve can refer to the beneficial effects in the corresponding method, and will not be repeated here.
附图说明Description of drawings
图1是本申请实施例提供的一种通信系统10的结构示意图;FIG. 1 is a schematic structural diagram of a communication system 10 provided by an embodiment of the present application;
图2A是本申请实施例提供的一种电子设备100的结构示意图;FIG. 2A is a schematic structural diagram of an electronic device 100 provided in an embodiment of the present application;
图2B是本申请实施例提供的一种电子设备100的软件结构框图;FIG. 2B is a software structural block diagram of an electronic device 100 provided by an embodiment of the present application;
图3是本申请实施例提供的另一种通信系统30的结构示意图;FIG. 3 is a schematic structural diagram of another communication system 30 provided by an embodiment of the present application;
图4是本申请实施例提供的另一种通信系统40的结构示意图;FIG. 4 is a schematic structural diagram of another communication system 40 provided by an embodiment of the present application;
图5A~图5C是本申请实施例提供的一些电子设备100展示体温数据的场景示意图;5A to 5C are schematic diagrams of some electronic devices 100 displaying body temperature data provided by the embodiment of the present application;
图6是本申请实施例提供的另一种通信系统60的结构示意图。FIG. 6 is a schematic structural diagram of another communication system 60 provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图对本申请实施例中的技术方案进行清楚、详尽地描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;文本中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,另外,在本申请实施例的描述中,“多个”是指两个或多于两个。The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying drawings. Among them, in the description of the embodiments of this application, unless otherwise specified, "/" means or means, for example, A/B can mean A or B; "and/or" in the text is only a description of associated objects The association relationship indicates that there may be three kinds of relationships, for example, A and/or B, which may indicate: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiment of the present application , "plurality" means two or more than two.
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。Hereinafter, the terms "first" and "second" are used for descriptive purposes only, and cannot be understood as implying or implying relative importance or implicitly specifying the quantity of indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present application, unless otherwise specified, the "multiple" The meaning is two or more.
请参照图1,图1是本申请实施例提供的一种通信系统10的架构示意图。Please refer to FIG. 1 . FIG. 1 is a schematic structural diagram of a communication system 10 provided in an embodiment of the present application.
如图1所示,通信系统10可包括电子设备100、一个或多个数据采集设备、云服务器300和三方应用服务器301。其中:As shown in FIG. 1 , a communication system 10 may include an electronic device 100 , one or more data collection devices, a cloud server 300 and a three-party application server 301 . in:
上述一个或多个数据采集设备可以包括智能手表201、智能手环202、体脂秤203、智能眼镜204。不限于用于采集用户的运动健康数据的设备,上述数据采集设备还可以包括智能空调、智能冰箱、空气净化器、净水器、水浸监测器、燃气监测器等智能家居设备。这些智能家居设备可用于采集用户的家庭状态数据。不限于上述运动健康数据、家庭状态数据,数据采集设备采集的数据还可以包括设备的配置数据、设备的工作状态等等数据。本申请实施例对上述数据采集设备的具体类型不作限定。The one or more data collection devices mentioned above may include a smart watch 201 , a smart bracelet 202 , a body fat scale 203 , and smart glasses 204 . Not limited to the equipment used to collect the user's exercise and health data, the above-mentioned data collection equipment may also include smart home equipment such as smart air conditioners, smart refrigerators, air purifiers, water purifiers, water immersion monitors, and gas monitors. These smart home devices can be used to collect user's home status data. Not limited to the above sports health data and family status data, the data collected by the data collection device may also include device configuration data, device working status, and other data. The embodiment of the present application does not limit the specific type of the above-mentioned data acquisition device.
上述运动健康数据可以包括步数、热量、卡路里、运动记录、睡眠、体重、压力、心率、体温、血糖、血压等。上述家庭状态数据可以包括家中的温度、智能冰箱中的食材、空气质量指数、水质、燃气使用状态等等。The aforementioned exercise health data may include steps, calories, calories, exercise records, sleep, weight, stress, heart rate, body temperature, blood sugar, blood pressure, etc. The above-mentioned family status data may include the temperature at home, ingredients in the smart refrigerator, air quality index, water quality, gas usage status and so on.
在一些实施例中,数据采集设备用于显示数据的区域(如显示屏)的大小有限,可以简单呈现自己采集到的数据,并将自己采集到的数据发送给电子设备100(如手机)。电子设备100可以对来自数据采集设备的数据进行分析,并呈现丰富的分析结果和相关建议。例如,智能手表201可用于采集用户的心率。智能手表201可以仅显示当前时刻用户的心率。智能手表201可以采集到的心率发送给电子设备100。电子设备100可以根据一段时间内用户的心率,计算用户的静息心率、心率范围、心率过高的时间段、心率过低的时间段等等分析结 果,并提供提高心脏健康水平的建议。In some embodiments, the data collection device has a limited area for displaying data (such as a display screen), and can simply present the data collected by itself and send the collected data to the electronic device 100 (such as a mobile phone). The electronic device 100 can analyze the data from the data collection device, and present rich analysis results and relevant suggestions. For example, the smart watch 201 can be used to collect the user's heart rate. The smart watch 201 may only display the user's heart rate at the current moment. The heart rate collected by the smart watch 201 can be sent to the electronic device 100 . The electronic device 100 can calculate the user's resting heart rate, heart rate range, time period of high heart rate, time period of low heart rate and other analysis results according to the user's heart rate within a period of time, and provide suggestions for improving heart health.
可选的,数据采集设备不具备显示数据的能力。数据采集设备也可以仅采集数据,并将采集到的数据发送给电子设备100。电子设备100可以对接收到的数据进行分析和显示。Optionally, the data collection device does not have the ability to display data. The data collection device may also only collect data, and send the collected data to the electronic device 100 . The electronic device 100 can analyze and display the received data.
电子设备100可以作为数据显示设备对来自数据采集设备的数据进行分析,并呈现丰富的分析结果和相关建议。电子设备100可具有显示装置。例如,显示屏。电子设备100可以是搭载
Figure PCTCN2022124595-appb-000001
或者其它操作系统的便携式电子设备,例如手机、平板电脑等等,还可以是具有触敏表面或触控面板的膝上型计算机(Laptop)、具有触敏表面或触控面板的台式计算机等非便携式电子设备。本申请实施例对电子设备100的具体类型不作限定。
The electronic device 100 can be used as a data display device to analyze the data from the data collection device, and present rich analysis results and relevant suggestions. The electronic device 100 may have a display device. For example, the display. Electronic device 100 may be equipped with
Figure PCTCN2022124595-appb-000001
Or portable electronic devices with other operating systems, such as mobile phones, tablet computers, etc., can also be laptop computers (Laptop) with touch-sensitive surfaces or touch panels, desktop computers with touch-sensitive surfaces or touch panels, etc. Portable Electronic Devices. The embodiment of the present application does not limit the specific type of the electronic device 100 .
电子设备100中可安装有用于管理数据采集设备的设备管理应用程序(application,APP)。示例性的,在数据采集设备是采集运动健康数据的设备的情况下,上述用于管理数据采集设备的设备管理APP可以包括运动健康APP。在数据采集设备是采集家庭状态数据的设备的情况下,上述用于管理数据采集设备的设备管理APP可以包括智能家居APP(如智慧生活APP)。A device management application (application, APP) for managing the data collection device may be installed in the electronic device 100 . Exemplarily, in the case that the data collection device is a device for collecting sports and health data, the above-mentioned device management APP for managing the data collection device may include a sports and health APP. In the case that the data collection device is a device that collects family status data, the above-mentioned device management APP for managing the data collection device may include a smart home APP (such as a smart life APP).
电子设备100与一个或多个数据采集设备之间可以建立有绑定关系。其中,电子设备100与数据采集设备之间可以通过账号建立绑定关系。即电子设备100中用于控制数据采集设备的APP上登录的账号与数据采集设备上登录的账号相同。可选的,电子设备100和数据采集设备之间还可以通过扫描二维码、蓝牙配对等方式建立绑定关系。本申请实施例对电子设备100与数据采集设备建立绑定关系的方法不作具体限定。A binding relationship may be established between the electronic device 100 and one or more data collection devices. Wherein, a binding relationship may be established between the electronic device 100 and the data collection device through an account. That is, the account registered on the APP used to control the data collection device in the electronic device 100 is the same as the account registered on the data collection device. Optionally, a binding relationship may also be established between the electronic device 100 and the data collection device by scanning a two-dimensional code, Bluetooth pairing, and the like. The embodiment of the present application does not specifically limit the method for establishing a binding relationship between the electronic device 100 and the data collection device.
数据采集设备可以向与自己建立有绑定关系的电子设备(如电子设备100)发送自己采集到的数据。其中,数据采集设备可以通过蓝牙通信连接、无线保真(wireless fidelity,Wi-Fi)通信连接、ZigBee通信连接等短距离通信连接向电子设备100发送自己采集到的数据。The data collection device may send the data collected by itself to an electronic device (such as the electronic device 100 ) that has established a binding relationship with itself. Wherein, the data collection device can send the data collected by itself to the electronic device 100 through a short-distance communication connection such as a Bluetooth communication connection, a wireless fidelity (Wi-Fi) communication connection, a ZigBee communication connection, or the like.
电子设备100还可以将来自数据采集设备的数据上传至云服务器300。可选的,电子设备100还可以将对数据采集设备采集的数据进行分析的分析结果、相关建议上传至云服务器300。The electronic device 100 can also upload the data from the data collection device to the cloud server 300 . Optionally, the electronic device 100 may also upload the analysis results and related suggestions of the data collected by the data collection device to the cloud server 300 .
云服务器300可以接收并存储来自电子设备100的数据。其中,云服务器300可以是上述用于管理数据采集设备的设备管理APP的应用服务器。云服务器300中可存储有电子设备100与数据采集设备之间的绑定关系。在一些实施例中,云服务器300可用于电子设备100远程控制数据采集设备。The cloud server 300 may receive and store data from the electronic device 100 . Wherein, the cloud server 300 may be an application server of the above-mentioned device management APP for managing data collection devices. The cloud server 300 may store the binding relationship between the electronic device 100 and the data collection device. In some embodiments, the cloud server 300 can be used for the electronic device 100 to remotely control the data collection device.
在一些实施例中,数据采集设备也可以将自己采集到的数据通过网络上传至云服务器300。例如,数据采集设备可以通过网络接入设备联网。或者,数据采集设备具有移动数据上网功能(如数据采集设备中插入有SIM卡)。云服务器300可以存储数据采集设备采集的数据,并将数据采集设备采集的数据发送给与该数据采集设备具有绑定关系的数据显示设备(如电子设备100)。数据显示设备可以对来自数据采集设备的数据进行分析,并呈现数据的分析结果和相关建议。In some embodiments, the data collection device may also upload the data collected by itself to the cloud server 300 through the network. For example, the data collection device can be connected to the Internet through the network access device. Alternatively, the data collection device has a mobile data access function (for example, a SIM card is inserted into the data collection device). The cloud server 300 can store the data collected by the data collection device, and send the data collected by the data collection device to a data display device (such as the electronic device 100 ) that has a binding relationship with the data collection device. The data display device can analyze the data from the data acquisition device, and present the analysis results of the data and relevant suggestions.
本申请后续实施例中将以数据采集设备将数据发送给与自己建立有绑定关系的数据显示设备,数据显示设备再将数据采集设备的数据发送至云服务器300的场景为例进行介绍。In the subsequent embodiments of this application, the scenario where the data collection device sends data to the data display device that has established a binding relationship with itself, and the data display device sends the data of the data collection device to the cloud server 300 as an example will be introduced.
在一些实施例中,电子设备100中安装的APP可以包括用于管理数据采集设备的设备管理APP,也可以包括三方APP。其中,设备管理APP可以是与数据采集设备配套的APP。数据采集设备可以将自己采集的数据发送给电子设备100中用于管理自己的设备管理APP。数据采集设备与管理该数据采集设备的设备管理APP可以是由同一生产商开发制造的。三方APP可以是设备管理APP以外的APP。三方APP可以请求获取数据采集设备采集的数据的 权限。在获取上述数据采集设备采集的数据的开放权限后,三方APP可以通过开放接口来获取上述数据采集设备采集的数据,并利用数据采集设备采集的数据实现自己的业务。上述开放接口可以是设备管理APP提供的。In some embodiments, the APP installed in the electronic device 100 may include a device management APP for managing the data collection device, or may include a third-party APP. Wherein, the device management APP may be an APP matched with the data collection device. The data collection device can send the data collected by itself to the device management APP in the electronic device 100 for managing itself. The data collection device and the device management APP that manages the data collection device may be developed and manufactured by the same manufacturer. The third-party APP may be an APP other than the device management APP. The three-party APP can request permission to obtain the data collected by the data collection device. After obtaining the open permission of the data collected by the above-mentioned data collection equipment, the third-party APP can obtain the data collected by the above-mentioned data collection equipment through the open interface, and use the data collected by the data collection equipment to realize its own business. The above-mentioned open interface may be provided by the device management APP.
示例性的,电子设备100中安装有运动健康APP和YY运动APP。其中,运动健康APP可以是电子设备100中的设备管理APP,可用于管理与电子设备100建立有绑定关系的数据采集设备。例如,智能手表201、智能手环202等。YY运动APP可以是电子设备100中的三方APP。YY运动APP可以通过运动健康APP提供的开放接口,获取到智能手表201、智能手环202等被运动健康APP管理的数据采集设备采集的数据,并利用这些数据实现自己的业务。例如,为用户提供运动建议等。Exemplarily, the electronic device 100 is installed with a sports health APP and a YY sports APP. Wherein, the sports health APP may be a device management APP in the electronic device 100 , and may be used to manage data collection devices that have a binding relationship with the electronic device 100 . For example, smart watch 201, smart bracelet 202, etc. The YY sports APP can be a three-party APP in the electronic device 100 . Through the open interface provided by the Sports Health APP, the YY Sports APP can obtain data collected by smart watches 201, smart bracelets 202 and other data collection devices managed by the Sports Health APP, and use these data to realize its own business. For example, to provide users with exercise suggestions, etc.
三方APP可以通过上述设备管理APP提供的开放接口获取数据采集设备采集的数据。三方APP还可以将数据采集设备采集的数据,以及利用数据采集设备采集的数据实现相关业务过程中产生的数据等数据上传至三方应用服务器301。三方应用服务器301可以存储上述来自三方APP的数据。其中,三方APP向三方应用服务器301发送数据的过程具体可以是安装有三方APP的电子设备(如电子设备100)将三方APP的数据发送给三方应用服务器301的过程。本申请实施例对电子设备100向服务器(如云服务器300、三方应用服务器301)发送数据的具体实现方式不作限定。The third-party APP can obtain the data collected by the data collection device through the open interface provided by the above-mentioned device management APP. The third-party APP can also upload the data collected by the data collection device and the data generated in the process of implementing related business processes using the data collected by the data collection device to the third-party application server 301 . The third-party application server 301 may store the above-mentioned data from the third-party APP. Wherein, the process of the third-party APP sending data to the third-party application server 301 may specifically be a process in which the electronic device (such as the electronic device 100 ) installed with the third-party APP sends the data of the third-party APP to the third-party application server 301 . The embodiment of the present application does not limit the specific implementation manner of sending data from the electronic device 100 to the server (such as the cloud server 300 and the third-party application server 301 ).
请参考图2A,图2A示例性示出了本申请实施例提供的一种电子设备100的结构示意图。Please refer to FIG. 2A . FIG. 2A exemplarily shows a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application.
如图2A所示,电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。As shown in Figure 2A, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, and a battery 142 , antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193 , a display screen 194, and a subscriber identification module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复 存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100 , and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through them. This interface can also be used to connect other electronic devices, such as AR devices.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is configured to receive a charging input from a charger. Wherein, the charger may be a wireless charger or a wired charger. While the charging management module 140 is charging the battery 142 , it can also provide power for electronic devices through the power management module 141 .
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the display screen 194 , the camera 193 , and the wireless communication module 160 .
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite, etc. applied on the electronic device 100. System (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos and the like. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处 理器等实现拍摄功能。The electronic device 100 can realize the shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。The ISP is used for processing the data fed back by the camera 193 . For example, when taking a picture, open the shutter, the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。Camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects it to the photosensitive element. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other image signals. In some embodiments, the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。The NPU is a neural-network (NN) computing processor. By referring to the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process input information and continuously learn by itself. Applications such as intelligent cognition of the electronic device 100 can be realized through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
内部存储器121可以包括一个或多个随机存取存储器(random access memory,RAM)和一个或多个非易失性存储器(non-volatile memory,NVM)。The internal memory 121 may include one or more random access memories (random access memory, RAM) and one or more non-volatile memories (non-volatile memory, NVM).
随机存取存储器可以包括静态随机存储器(static random-access memory,SRAM)、动态随机存储器(dynamic random access memory,DRAM)、同步动态随机存储器(synchronous dynamic random access memory,SDRAM)、双倍资料率同步动态随机存取存储器(double data rate synchronous dynamic random access memory,DDR SDRAM,例如第五代DDR SDRAM一般称为DDR5SDRAM)等;Random access memory can include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (synchronous dynamic random access memory, SDRAM), double data rate synchronous Dynamic random access memory (double data rate synchronous dynamic random access memory, DDR SDRAM, such as the fifth generation DDR SDRAM is generally called DDR5SDRAM), etc.;
非易失性存储器可以包括磁盘存储器件、快闪存储器(flash memory)。Non-volatile memory may include magnetic disk storage devices, flash memory (flash memory).
快闪存储器按照运作原理划分可以包括NOR FLASH、NAND FLASH、3D NAND FLASH等,按照存储单元电位阶数划分可以包括单阶存储单元(single-level cell,SLC)、多阶存储单元(multi-level cell,MLC)、三阶储存单元(triple-level cell,TLC)、四阶储存单元(quad-level cell,QLC)等,按照存储规范划分可以包括通用闪存存储(英文:universal flash storage,UFS)、嵌入式多媒体存储卡(embedded multi media Card,eMMC)等。According to the operating principle, flash memory can include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. According to the potential order of storage cells, it can include single-level storage cells (single-level cell, SLC), multi-level storage cells (multi-level cell, MLC), triple-level cell (TLC), quad-level cell (QLC), etc., can include universal flash storage (English: universal flash storage, UFS) according to storage specifications , embedded multimedia memory card (embedded multi media Card, eMMC), etc.
随机存取存储器可以由处理器110直接进行读写,可以用于存储操作系统或其他正在运行中的程序的可执行程序(例如机器指令),还可以用于存储用户及应用程序的数据等。The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of an operating system or other running programs, and can also be used to store data of users and application programs.
非易失性存储器也可以存储可执行程序和存储用户及应用程序的数据等,可以提前加载到随机存取存储器中,用于处理器110直接进行读写。The non-volatile memory can also store executable programs and data of users and application programs, etc., and can be loaded into the random access memory in advance for the processor 110 to directly read and write.
外部存储器接口120可以用于连接外部的非易失性存储器,实现扩展电子设备100的存储能力。外部的非易失性存储器通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部的非易失性存储器中。The external memory interface 120 can be used to connect an external non-volatile memory, so as to expand the storage capacity of the electronic device 100 . The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and video are stored in an external non-volatile memory.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转 换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used to convert digital audio information into an analog audio signal output, and is also used to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。Speaker 170A, also referred to as a "horn", is used to convert audio electrical signals into sound signals. Electronic device 100 can listen to music through speaker 170A, or listen to hands-free calls.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。Receiver 170B, also called "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the receiver 170B can be placed close to the human ear to receive the voice.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。The microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone interface 170D is used for connecting wired earphones. The earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。The pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal. In some embodiments, pressure sensor 180A may be disposed on display screen 194 .
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。The gyro sensor 180B can be used to determine the motion posture of the electronic device 100 . In some embodiments, the angular velocity of the electronic device 100 around three axes (ie, x, y and z axes) may be determined by the gyro sensor 180B.
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。The magnetic sensor 180D includes a Hall sensor. The electronic device 100 may use the magnetic sensor 180D to detect the opening and closing of the flip leather case.
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。The distance sensor 180F is used to measure the distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F for distance measurement to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes. The light emitting diodes may be infrared light emitting diodes. The electronic device 100 emits infrared light through the light emitting diode. Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 .
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。The ambient light sensor 180L is used for sensing ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access to application locks, take pictures with fingerprints, answer incoming calls with fingerprints, and the like.
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to implement a temperature treatment strategy. For example, when the temperature reported by the temperature sensor 180J exceeds the threshold, the electronic device 100 may reduce the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。The touch sensor 180K is also called "touch device". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”. The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the human pulse and receive the blood pressure beating signal.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The keys 190 include a power key, a volume key and the like. The key 190 may be a mechanical key. It can also be a touch button. The electronic device 100 can receive key input and generate key signal input related to user settings and function control of the electronic device 100 .
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。The motor 191 can generate a vibrating reminder. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。The SIM card interface 195 is used for connecting a SIM card. The SIM card can be connected and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195 . The electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards may be the same or different. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calling and data communication. In some embodiments, the electronic device 100 adopts an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 .
图2B是本申请实施例的电子设备100的软件结构框图。FIG. 2B is a block diagram of the software structure of the electronic device 100 according to the embodiment of the present application.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces. In some embodiments, the Android system is divided into four layers, which are respectively the application program layer, the application program framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer from top to bottom.
应用程序层可以包括一系列应用程序包。The application layer can consist of a series of application packages.
如图3所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,运动健康等应用程序。除了运动健康APP,应用程序包中还可以包含更多用于管理数据采集设备的应用程序。As shown in Figure 3, the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, sports and health. In addition to the sports and health APP, the application package can also contain more applications for managing data collection equipment.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
如图3所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown in Figure 3, the application framework layer can include window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,来自数据采集设备采集的数据(如运动健康数据、家庭状态数据)等。Content providers are used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, data collected from data collection devices (such as exercise health data, family status data) and the like.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面, 可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. The view system can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide communication functions of the electronic device 100 . For example, the management of call status (including connected, hung up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify the download completion, message reminder, etc. The notification manager can also be a notification that appears on the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, issuing a prompt sound, vibrating the electronic device, and flashing the indicator light, etc.
在一些实施例中,电子设备100可以将数据采集设备发送的数据存放在上述内容提供器中。运动健康APP可以从内容提供器获取来自数据采集设备的数据,并对来自数据采集设备的数据进行分析。运动健康APP可以调用上述视图系统来显示来自数据采集设备的数据以及这些数据的分析结果等内容。In some embodiments, the electronic device 100 may store the data sent by the data collection device in the content provider. The sports health APP can obtain the data from the data collection device from the content provider, and analyze the data from the data collection device. The sports health APP can call the above-mentioned view system to display the data from the data collection equipment and the analysis results of these data, etc.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core library and virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in virtual machines. The virtual machine executes the java files of the application program layer and the application program framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。A system library can include multiple function modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing, etc.
2D图形引擎是2D绘图的绘图引擎。2D graphics engine is a drawing engine for 2D drawing.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.
下面结合捕获拍照场景,示例性说明电子设备100软件以及硬件的工作流程。The workflow of the software and hardware of the electronic device 100 will be exemplarily described below in conjunction with capturing and photographing scenes.
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。以该触摸操作是触摸单击操作,该单击操作所对应的控件为相机应用图标的控件为例,相机应用调用应用框架层的接口,启动相机应用,进而通过调用内核层启动摄像头驱动,通过摄像头193捕获静态图像或视频。When the touch sensor 180K receives a touch operation, a corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes touch operations into original input events (including touch coordinates, time stamps of touch operations, and other information). Raw input events are stored at the kernel level. The application framework layer obtains the original input event from the kernel layer, and identifies the control corresponding to the input event. Take the touch operation as a touch click operation, and the control corresponding to the click operation is the control of the camera application icon as an example. The camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer. Camera 193 captures still images or video.
下面以上述通信系统10中的电子设备100、智能手表201和云服务器300组成的通信系统30为例来介绍一种数据处理方法。A data processing method will be introduced below by taking the communication system 30 composed of the electronic device 100 , the smart watch 201 and the cloud server 300 in the communication system 10 as an example.
请参考图3,图3示例性示出了通信系统30的结构示意图。Please refer to FIG. 3 . FIG. 3 exemplarily shows a schematic structural diagram of a communication system 30 .
如图3所示,智能手表201中可包含数据①采集模块310、数据②采集模块311、数据① 封装模块312、数据②封装模块313。其中,数据①采集模块310可用于采集数据①。数据②采集模块311可用于采集数据②。可以理解的,智能手表201具有采集数据①和数据②的硬件装置。例如,在数据①是心率的情况下,数据①采集模块310可以包含心率监测装置。As shown in FIG. 3 , the smart watch 201 may include a data ① collection module 310 , a data ② collection module 311 , a data ① packaging module 312 , and a data ② packaging module 313 . Wherein, the data ① collection module 310 can be used to collect data ①. The data ② collection module 311 can be used to collect data ②. It can be understood that the smart watch 201 has hardware devices for collecting data ① and data ②. For example, in the case that the data ① is heart rate, the data ① acquisition module 310 may include a heart rate monitoring device.
不限于上述数据①采集模块310、数据②采集模块311,智能手表201中还可以包含更多或更少的数据采集模块。Not limited to the data ① collection module 310 and the data ② collection module 311 mentioned above, the smart watch 201 may also include more or less data collection modules.
数据①封装模块312可用于按照智能手表201与电子设备100之间约定的数据封装协议来封装采集到的数据①。The data ① encapsulation module 312 can be used for encapsulating the collected data ① according to the data encapsulation protocol agreed between the smart watch 201 and the electronic device 100 .
数据②封装模块313可用于按照智能手表201与电子设备100之间约定的数据封装协议来封装采集到的数据②。The data ② encapsulation module 313 can be used for encapsulating the collected data ② according to the data encapsulation protocol agreed between the smart watch 201 and the electronic device 100 .
上述用于封装数据①和数据②的数据封装协议可以确定封装后的数据中各个字段所表示的含义。上述用于封装数据①和数据②的数据封装协议可以是相同的,也可以是不同的。The above data encapsulation protocol for encapsulating data ① and data ② can determine the meaning of each field in the encapsulated data. The above data encapsulation protocols for encapsulating data ① and data ② may be the same or different.
示例性的,上述数据①为心率,上述数据②为压力。数据①采集模块310采集到用户的心率为81。数据②采集模块311采集到用户的压力为52。数据①封装模块312可以对心率数据进行封装。封装后的心率数据可以包括“0181”。数据②封装模块313可以对压力数据进行封装。封装后的压力数据可以包括“0152”。Exemplarily, the above data ① is heart rate, and the above data ② is pressure. The data ① collection module 310 collects the user's heart rate as 81. The data ② collection module 311 collects the pressure of the user as 52. The data ① packaging module 312 can package the heart rate data. The encapsulated heart rate data may include "0181". The data ② packaging module 313 can package the pressure data. Packed pressure data may include "0152".
智能手表201可以将经过封装后的数据①和数据②发送给电子设备100。The smart watch 201 can send the packaged data ① and data ② to the electronic device 100 .
可以理解的,智能手表201中还包含通信模块(如蓝牙通信模块)。数据①封装模块312、数据②封装模块313可以将封装后的数据传递至智能手表201中的通信模块。例如,智能手表201与电子设备100之间建立有蓝牙通信连接。智能手表201中的蓝牙通信模块可以将封装后的数据①和数据②按照蓝牙通信协议发送给电子设备100。电子设备100中也可包含通信模块。电子设备100中的通信模块可以接收到来自智能手表201发送的数据,并将来自智能手表201发送的数据传输给相应的应用程序(如运动健康APP)。本申请实施例为了更清楚地体现数据的处理过程,简化了数据在通信系统30中的传输过程。It can be understood that the smart watch 201 also includes a communication module (such as a Bluetooth communication module). The data ① encapsulation module 312 and the data ② encapsulation module 313 can transmit the encapsulated data to the communication module in the smart watch 201 . For example, a Bluetooth communication connection is established between the smart watch 201 and the electronic device 100 . The Bluetooth communication module in the smart watch 201 can send the encapsulated data ① and data ② to the electronic device 100 according to the Bluetooth communication protocol. The electronic device 100 may also include a communication module. The communication module in the electronic device 100 can receive the data sent from the smart watch 201, and transmit the data sent from the smart watch 201 to a corresponding application program (such as a sports health APP). In order to reflect the data processing process more clearly, the embodiment of the present application simplifies the data transmission process in the communication system 30 .
电子设备100中可包含运动健康APP。不限于运动健康APP,电子设备100中还可以包含其它用于管理数据采集设备的设备管理APP。本申请后续实施例中具体以运动健康APP为例进行说明。The electronic device 100 may include a sports and health APP. Not limited to sports and health APP, the electronic device 100 may also include other device management APPs for managing data collection devices. In the subsequent embodiments of the present application, the sports health APP is specifically used as an example for illustration.
运动健康APP中可包含设备管理模块314、一个或多个数据存储及云同步模块、一个或多个数据计算模块、一个或多个业务实现模块。The sports health APP may include a device management module 314, one or more data storage and cloud synchronization modules, one or more data calculation modules, and one or more business realization modules.
上述设备管理模块314中可包含一个或多个数据解封装模块。例如,数据①解封装模块314A和数据②解封装模块314B。数据①解封装模块314A可用于按照智能手表201与电子设备100之间约定的数据封装协议对经过封装的数据①进行解封装处理。数据②解封装模块314B可用于按照智能手表201与电子设备100之间约定的数据封装协议对经过封装的数据②进行解封装处理。The device management module 314 may include one or more data decapsulation modules. For example, the data ① decapsulation module 314A and the data ② decapsulation module 314B. The data ① decapsulation module 314A can be used to decapsulate the encapsulated data ① according to the data encapsulation protocol agreed between the smart watch 201 and the electronic device 100 . The data ② decapsulation module 314B can be used for decapsulating the encapsulated data ② according to the data encapsulation protocol agreed between the smart watch 201 and the electronic device 100 .
示例性的,数据①解封装模块314A可以对封装后的心率数据“0181”进行解封装处理,得到以下心率数据“数据类型:心率,数据值81”。其中,上述“数据类型:心率”可以是数据①解封装模块314A根据“0181”中的前2位“01”确定出来的。上述“数据值81”可以是数据①解封装模块314A根据“0181”中的后2位“81”确定出来的。Exemplarily, the data ① decapsulation module 314A may decapsulate the encapsulated heart rate data "0181" to obtain the following heart rate data "data type: heart rate, data value 81". Wherein, the above-mentioned "data type: heart rate" can be determined by the data ① decapsulation module 314A according to the first two digits "01" in "0181". The above "data value 81" may be determined by the data ① decapsulation module 314A according to the last two digits "81" in "0181".
数据②解封装模块314B可以对封装后的压力数据“0152”进行解封装处理,得到以下压力数据“数据类型:压力,数据值52”。其中,上述“数据类型:压力”可以是数据②解封装模块314B根据“0152”中的前2位“01”确定出来的。上述“数据值52”可以是数据②解封装模块314B根据“0152”中的后2位“52”确定出来的。The data ② decapsulation module 314B can decapsulate the encapsulated pressure data "0152" to obtain the following pressure data "data type: pressure, data value 52". Wherein, the above-mentioned "data type: pressure" can be determined by the data② decapsulation module 314B according to the first two digits "01" in "0152". The above "data value 52" may be determined by the data ② decapsulating module 314B according to the last 2 digits "52" in "0152".
可以看出,运动健康APP中无法通过同一个数据解封装模块对封装后的心率数据和封装后的压力数据进行解封装,否则会出现无法确定数据内容“01”所表示的含义的情况。It can be seen that the encapsulated heart rate data and encapsulated pressure data cannot be decapsulated through the same data decapsulation module in the Sports Health APP, otherwise there will be situations where the meaning of the data content "01" cannot be determined.
可以理解的,在智能手表201等数据采集设备对不同数据进行封装所使用的数据封装协议不同的情况下,不同数据中相同的数据内容可能表示不同的含义,电子设备100中运动健康APP需要按照不同的数据封装协议来解封装数据,从而确定接收到的数据所表示的含义。It can be understood that when data collection devices such as the smart watch 201 use different data encapsulation protocols for encapsulating different data, the same data content in different data may have different meanings, and the sports health APP in the electronic device 100 needs to follow the Different data encapsulation protocols are used to decapsulate data to determine what the received data represents.
不限于上述数据封装模块,设备管理模块314中还可以包含其它用于管理智能手表201等运动健康数据采集设备的模块。Not limited to the above-mentioned data encapsulation module, the device management module 314 may also include other modules for managing sports and health data collection devices such as the smart watch 201 .
运动健康APP中的数据存储及云端同步模块可以包含数据①存储及云同步模块316、数据②存储及云同步模块317。其中,数据①存储及云同步模块316可用于存储经过数据①解封装模块314A进行解封装后得到的数据①,并将数据①上传至云服务器300。数据②存储及云同步模块317可用于存储经过数据②解封装模块314B进行解封装后得到的数据②,并将数据②上传至云服务器300。The data storage and cloud synchronization module in the Sports Health APP may include a data ① storage and cloud synchronization module 316 , and a data ② storage and cloud synchronization module 317 . Among them, the data ① storage and cloud synchronization module 316 can be used to store the data ① obtained after being decapsulated by the data ① decapsulation module 314A, and upload the data ① to the cloud server 300 . The data ② storage and cloud synchronization module 317 can be used to store the data ② obtained after being decapsulated by the data ② decapsulation module 314B, and upload the data ② to the cloud server 300 .
运动健康APP中的数据计算模块可以包含数据①计算模块318、数据②计算模块319。其中,数据①计算模块318可以从数据①存储及云同步模块316获取数据①,并对数据①进行以下一项或多项计算处理:确定均值、确定变化范围、确定最大值、确定最小值、确定总和、确定一段时间内数据①的计数个数。数据②计算模块319可以从数据②存储及云同步模块317获取数据②,并对数据②进行计算处理。The data calculation module in the sports health APP can include a data ① calculation module 318 and a data ② calculation module 319 . Among them, the data ① calculation module 318 can obtain data ① from the data ① storage and cloud synchronization module 316, and perform one or more of the following calculations on the data ①: determine the mean value, determine the variation range, determine the maximum value, determine the minimum value, Determine the sum and determine the number of counts of data ① within a period of time. The data ② calculation module 319 can obtain the data ② from the data ② storage and cloud synchronization module 317, and perform calculation processing on the data ②.
一个业务实现模块可用于实现一项业务。上述业务可以表示运动健康APP能够为用户提供的服务。运动健康APP中的业务实现模块可以包含业务A实现模块320和业务B实现模块321。例如,业务A实现模块可用于呈现心率相关的数据和压力相关的数据。业务B实现模块可用于呈现根据心率相关的数据和压力相关的数据所确定的保持身体健康的建议。那么,业务A实现模块320和业务B实现模块321均可以从数据①计算模块318获取心率相关的数据,并从数据②计算模块319获取压力相关的数据。A business realization module can be used to realize a business. The above business can represent the services that the Sports Health APP can provide to users. The business realization module in the sports health APP may include a business A realization module 320 and a business B realization module 321 . For example, the business A implementation module can be used to present heart rate-related data and stress-related data. The service B implementation module may be used to present recommendations for maintaining physical health determined according to heart rate-related data and stress-related data. Then, both the service A implementation module 320 and the service B implementation module 321 can obtain heart rate-related data from the data ① calculation module 318 and pressure-related data from the data ② calculation module 319 .
在一些实施例中,运动健康APP中还可包含一个或多个数据开放模块(图3中未示出)。例如,数据①开放模块和数据②开放模块。数据开放模块可用于为三方APP提供获取对应数据的开放接口。In some embodiments, the sports health APP may further include one or more data opening modules (not shown in FIG. 3 ). For example, Data ① Open Module and Data ② Open Module. The data open module can be used to provide an open interface for third-party APPs to obtain corresponding data.
云服务器300中可包含数据①存储模块322和数据②存储模块323。数据①存储模块322可用于存储数据①。数据②存储模块323可用于存储数据②。其中,运动健康APP可以按照与云服务器300约定的数据封装协议将数据①和数据②上传至云服务器300。进一步的,云服务器300可以按照运动健康APP与云服务器300约定的数据封装协议确定接收到的数据所表示的含义,并进行存储。The cloud server 300 may include a data ① storage module 322 and a data ② storage module 323 . The data ① storage module 322 can be used to store data ①. The data ② storage module 323 can be used to store data ②. Among them, the sports health APP can upload data ① and data ② to the cloud server 300 according to the data encapsulation protocol agreed with the cloud server 300 . Further, the cloud server 300 can determine and store the meaning of the received data according to the data encapsulation protocol agreed between the Sports Health APP and the cloud server 300 .
由上述图3所示的通信系统30可知,由于智能手表201中不同类型的数据可能是按照不同的数据封装协议进行封装的,以及智能手表201等多个数据采集设备对各自采集的数据可能是按照不同的数据封装协议进行封装的,电子设备100中的运动健康APP需要采用不同的数据封装协议来识别不同的数据所表示的含义。即运动健康APP中需要包含用于管理采用不同的数据封装协议进行封装的数据的模块。那么,在新增一种类型的数据交由电子设备100显示,云服务器300存储并开放给三方APP的情况下,运动健康APP的开发人员需要针对新增类型的数据开发识别数据、分析数据、呈现数据和开放数据等处理数据的代码。云服务器300和三方APP中也需要按照该新增类型的数据所采用的数据封装协议,增加处理该新增类型的数据的代码。From the communication system 30 shown in FIG. 3 above, it can be seen that since different types of data in the smart watch 201 may be encapsulated according to different data encapsulation protocols, and the data collected by multiple data collection devices such as the smart watch 201 may be Encapsulated according to different data encapsulation protocols, the sports health APP in the electronic device 100 needs to use different data encapsulation protocols to identify the meanings represented by different data. That is, the sports health APP needs to include modules for managing data encapsulated with different data encapsulation protocols. Then, when a new type of data is added to be displayed by the electronic device 100, and the cloud server 300 stores and opens it to the third-party APP, the developers of the sports health APP need to develop identification data, analysis data, Code that processes data such as rendering data and open data. The cloud server 300 and the three-party APP also need to add codes for processing the newly added type of data according to the data encapsulation protocol adopted by the newly added type of data.
可以看出,上述处理方法在新增一种类型数据接入数据显示设备、云服务器、三方APP 时,需要多方开发人员对处理数据的代码进行修改和适配。这使得开发人员工作量大,数据接入效率低。It can be seen that when adding a new type of data to access data display devices, cloud servers, and third-party APPs in the above processing method, multiple developers need to modify and adapt the code for processing data. This makes developers have a heavy workload and low data access efficiency.
本申请实施例提供一种数据处理方法。在该方法中,数据采集设备可以按照数据字典中的数据类型定义规则向数据显示设备上报数据A。数据显示设备可以按照数据字典中的数据类型定义规则确定接收到的数据A的具体内容,并根据数据字典中的数据处理规则对数据A进行分析。数据显示设备可以显示数据A及其分析结果,还可以将数据A上传给云服务器以及开放给三方APP。其中,云服务器可以根据数据字典中的数据类型定义规则确定接收到的数据A的具体内容,并进行存储。三方APP可以根据数据字典中数据类型定义规则确定接收到的数据A的具体内容,并利用数据A来实现三方APP的需求业务。An embodiment of the present application provides a data processing method. In this method, the data acquisition device can report the data A to the data display device according to the data type definition rules in the data dictionary. The data display device can determine the specific content of the received data A according to the data type definition rules in the data dictionary, and analyze the data A according to the data processing rules in the data dictionary. The data display device can display data A and its analysis results, and can also upload data A to the cloud server and open it to third-party APPs. Wherein, the cloud server can determine the specific content of the received data A according to the data type definition rules in the data dictionary, and store it. The third-party APP can determine the specific content of the received data A according to the data type definition rules in the data dictionary, and use the data A to realize the required business of the third-party APP.
上述数据A可以是运动健康数据、家庭状态数据等等类型的数据。本申请实施例对数据A的具体类型不作限定。The above-mentioned data A may be sports health data, family status data and other types of data. The embodiment of the present application does not limit the specific type of data A.
上述数据字典的规则(如数据类型定义规则、数据处理规则等)可适用于多种不同类型的数据。可以看出,利用上述数据字典的规则,在新增一种类型的数据的情况下,新增类型的数据接入数据显示设备、云服务器、三方APP,以及数据显示设备对该新增类型的数据进行分析和显示等处理数据的代码可以复用用于处理已有类型的数据的代码。这可以减少开发人员的工作量,提高数据接入的效率。The above rules of the data dictionary (such as data type definition rules, data processing rules, etc.) can be applied to many different types of data. It can be seen that, using the rules of the above data dictionary, in the case of adding a new type of data, the new type of data is connected to the data display device, cloud server, and third-party APP, and the data display device is connected to the newly added type. Codes that process data such as analyzing and displaying data can reuse codes that process existing types of data. This can reduce the workload of developers and improve the efficiency of data access.
为了便于理解本申请提供的数据处理方法,下面对本申请涉及的数据字典的概念进行介绍。In order to facilitate the understanding of the data processing method provided by this application, the concept of the data dictionary involved in this application will be introduced below.
数据字典是指对数据的数据项、数据结构、数据存储、处理逻辑进行定义和描述。数据字典中包含的内容可以参考下述表1所示的内容。Data dictionary refers to the definition and description of data items, data structure, data storage, and processing logic. The content contained in the data dictionary can refer to the content shown in Table 1 below.
Figure PCTCN2022124595-appb-000002
Figure PCTCN2022124595-appb-000002
Figure PCTCN2022124595-appb-000003
Figure PCTCN2022124595-appb-000003
Figure PCTCN2022124595-appb-000004
Figure PCTCN2022124595-appb-000004
表1Table 1
数据字典中可包括数据类型定义规则、数据处理规则。The data dictionary can include data type definition rules and data processing rules.
数据类型定义规则可以包含上述表1中数据类型定义中的以下数据项:typeID、subType、name、description、type、sensitivityLevel、validatePolicies、displayPolicies。The data type definition rule may include the following data items in the data type definition in Table 1 above: typeID, subType, name, description, type, sensitivityLevel, validatePolicies, displayPolicies.
其中,数据项typeID的格式可以例如是00100001,前3位可以标识数据类型的分组,后5位可用于保证typeID具有全局唯一性。这样可以便于数据显示设备、云服务器、三方APP能根据数据的类型标识确定出该数据的类型。本申请实施例对数据项typeID的格式不作限定。Wherein, the format of the data item typeID can be, for example, 00100001, the first 3 digits can identify the grouping of the data type, and the last 5 digits can be used to ensure the global uniqueness of the typeID. In this way, the data display device, the cloud server, and the third-party APP can determine the type of the data according to the type identifier of the data. The embodiment of the present application does not limit the format of the data item typeID.
数据项subType为可选数据项。在一些实施例中,一种类型的数据下还可划分出多个子类型。这多个子类型对应的数据可以具有数据子类型标识。例如,运动记录这一项数据下可包括多个子类型的数据:跑步记录、游泳记录、登山记录、骑行记录等等。The data item subType is an optional data item. In some embodiments, one type of data can also be divided into multiple subtypes. Data corresponding to the multiple subtypes may have data subtype identifiers. For example, the item of sports records can include multiple subtypes of data: running records, swimming records, mountaineering records, cycling records, and so on.
数据项name可以为英文字符串。例如睡眠数据的name可以为“SLEEP_RECORD”。数据项name可用于代码中的唯一访问标识。The data item name can be an English string. For example, the name of sleep data can be "SLEEP_RECORD". The data item name can be used as a unique access identifier in the code.
数据项type可包含单次采样数据类别、序列采样数据类别等等数据类别。上述单次采样数据类别可以表示数据被采样一次可以确定出一个类别的数据值。例如,数据采集设备每采集一次心率数据可以得到一个心率值。上述采集一次心率可以表示在一个时刻进行心率采集。单次采样数据类别也可称为单点数据。上述序列采样数据类别可以表示数据被采样一次可以确定出多个类别的数据值。例如,数据采集设备每采集一次跑步记录的数据,可以得到跑步速度均值、跑步里程、消耗热量等多个类别的数据值。上述采集一次跑步记录可以表示采集从开始跑步到结束跑步这一时间段内跑步相关的数据。The data item type can include single sampling data category, sequence sampling data category and other data categories. The above-mentioned single-sampling data category may indicate that the data is sampled once and a data value of a category can be determined. For example, a heart rate value can be obtained every time the data collection device collects heart rate data. The aforementioned collection of heart rate once may mean that heart rate collection is performed at one moment. The one-shot data category may also be referred to as single-point data. The above-mentioned sequence sampling data category may indicate that data values of multiple categories can be determined once the data is sampled. For example, each time the data acquisition device collects the data of running records, it can obtain data values of multiple categories such as running speed average, running mileage, and calorie consumption. The aforementioned collection of a running record may mean collecting running-related data during the time period from the start of the run to the end of the run.
数据项sensitivityLevel可用于确定数据的敏感等级。上述敏感等级可以根据数据遭到泄露或者滥用可能给个人、组织或公众带来的影响程度进行定义。例如,若一种类型的数据遭到泄露或者滥用可能给个人、组织或公众带来不可恢复或灾难性的不利影响,则这一种类型的数据的sensitivityLevel可以为4。若一种类型的数据遭到泄露或者滥用可能给个人、组织或公众带来重大不利影响,则这一种类型的数据的sensitivityLevel可以为3。若一种类型的数据遭到泄露或者滥用可能给个人、组织或公众带来较为严重的不利影响,则这一种类型的数据的sensitivityLevel可以为2。若一种类型的数据遭到泄露或者滥用可能给个人、组织或公众带来有限程度的不利影响,则这一种类型的数据的sensitivityLevel可以为1。若一种类型的数据遭到泄露或者滥用可能给个人、组织或公众带来的不利影响可以忽略不计,则这一种类型的 数据的sensitivityLevel可以为0。本申请实施例对sensitivityLevel的具体取值不作限定。The data item sensitivityLevel can be used to determine the sensitivity level of data. The above sensitivity level can be defined according to the degree of impact that data leakage or misuse may have on individuals, organizations or the public. For example, if a type of data is leaked or misused may bring unrecoverable or catastrophic adverse effects on individuals, organizations or the public, the sensitivityLevel of this type of data may be 4. If a type of data is leaked or misused may have a significant adverse impact on individuals, organizations or the public, the sensitivityLevel of this type of data can be 3. If a type of data is leaked or misused that may have serious adverse effects on individuals, organizations or the public, the sensitivityLevel of this type of data can be 2. If a type of data is leaked or misused may have a limited degree of adverse impact on individuals, organizations or the public, the sensitivityLevel of this type of data can be 1. If a type of data is leaked or misused and may have negligible adverse effects on individuals, organizations or the public, then the sensitivityLevel of this type of data can be 0. The specific value of the sensitivityLevel is not limited in this embodiment of the application.
数据项validatePolicies为可选数据项。数据项validatePolicies可用于校验数据采集设备的合理性。例如,体温数据的validatePolicies可以为体温≥34且体温≤42。若用于管理数据采集设备的设备管理APP接收到值为45的体温数据,则该APP可以确定该体温数据为异常数据。用于管理数据采集设备的设备管理APP可以对异常数据进行处理(如删除),来减少将异常数据呈现给用户的情况。The data item validatePolicies is an optional data item. The data item validatePolicies can be used to verify the rationality of the data collection equipment. For example, the validatePolicies for body temperature data can be body temperature ≥ 34 and body temperature ≤ 42. If the device management APP used to manage the data collection device receives body temperature data with a value of 45, the APP can determine that the body temperature data is abnormal data. The device management APP used to manage the data collection device can process (such as delete) the abnormal data, so as to reduce the situation of presenting the abnormal data to the user.
数据项displayPolicies可用于确定数据的显示策略。displayPolicies的取值列表中可包含显示形式displayForm和显示位置displayPosition。The data item displayPolicies can be used to determine the display policy of the data. The value list of displayPolicies can include display form displayForm and display position displayPosition.
例如,若一种类型的数据的displayForm为1,数据显示设备可以利用折线图的形式显示这一种类型的数据的采样值。若一种类型的数据的displayForm为2,数据显示设备可以利用柱状图的形式显示这一种类型的数据的采样值。若一种类型的数据的displayForm为3,数据显示设备可以利用饼图的形式显示这一种类型的数据的采样值。若一种类型的数据的displayForm为4,数据显示设备可以利用雷达图的形式显示这一种类型的数据的采样值。若一种类型的数据的displayForm为5,数据显示设备可以利用散点图的形式显示这一种类型的数据的采样值。For example, if the displayForm of a type of data is 1, the data display device may display the sampling value of this type of data in the form of a line graph. If the displayForm of one type of data is 2, the data display device can display the sampling value of this type of data in the form of a histogram. If the displayForm of one type of data is 3, the data display device can display the sampling value of this type of data in the form of a pie chart. If the displayForm of a type of data is 4, the data display device can display the sampling value of this type of data in the form of a radar chart. If the displayForm of one type of data is 5, the data display device can display the sampling value of this type of data in the form of a scatter diagram.
若一种类型的数据的displayPosition为Left,数据显示设备可以将具有显示形式A(如折线图)的这一种类型的数据的采样值显示在用户界面的左侧。若一种类型的数据的displayPosition为Right,数据显示设备可以将具有显示形式A的这一种类型的数据的采样值显示在用户界面的右侧。若一种类型的数据的displayPosition为Top,数据显示设备可以将具有显示形式A的这一种类型的数据的采样值显示在用户界面的顶部。若一种类型的数据的displayPosition为Bottom,数据显示设备可以将具有显示形式A的这一种类型的数据的采样值显示在用户界面的底部。If the displayPosition of a type of data is Left, the data display device may display the sampled value of this type of data in a display form A (such as a line graph) on the left side of the user interface. If the displayPosition of one type of data is Right, the data display device may display the sampling value of this type of data in display form A on the right side of the user interface. If the displayPosition of one type of data is Top, the data display device may display the sampling value of this type of data in display form A on the top of the user interface. If the displayPosition of one type of data is Bottom, the data display device may display the sampling value of this type of data in display form A at the bottom of the user interface.
不限于上述列举的displayForm、displayPosition,数据字典中还可以包含更多的displayForm、displayPosition。本申请实施例对displayForm、displayPosition的取值不作限定。数据字典还可以通过其它的数据、字母等字符来表示不同的displayForm和不同的displayPosition。Not limited to the displayForm and displayPosition listed above, more displayForm and displayPosition may be included in the data dictionary. The embodiment of the present application does not limit the values of displayForm and displayPosition. The data dictionary can also represent different displayForms and different displayPositions through other characters such as data and letters.
上述displayForm和上述displayPosition的取值仅为本申请示例性说明,不应对本申请构成限定。The values of the above displayForm and the above displayPosition are only exemplary descriptions of the present application, and shall not limit the present application.
在一些实施例中,displayPolicies可以包含displayForm、displayPosition中的一项。可选的,不限于displayForm、displayPosition,displayPolicies中还可以包含更多用于指示数据显示设备显示数据的规则,例如对齐方式等等。In some embodiments, displayPolicies may include one of displayForm and displayPosition. Optionally, not limited to displayForm and displayPosition, displayPolicies may also include more rules for instructing the data display device to display data, such as alignment and so on.
在一些实施例中,除了包含上述显示一种类型的数据在一段时间内的采样值的显示形式和显示位置,显示策略displayPolicies中还可包含显示这一种类型的数据的统计数据(如最大值、最小值、均值等)的显示形式和显示位置。In some embodiments, in addition to including the above-mentioned display form and display position of sampling values of a type of data displayed over a period of time, the display policy displayPolicies may also include statistical data (such as the maximum value) of this type of data displayed , minimum value, mean value, etc.) display form and display position.
数据类型定义规则还可以包含数据项字段列表fields。一种类型的数据的字段列表中可以包含一个或多个字段。例如,单点数据心率的字段列表中可以包含一个字段,即心率。多点数据血压的字段列表中可以包含两个字段,及收缩压和舒张压。上述多点数据可以表示数据采集设备在一个时刻进行数据采集可以得到多个类型的数据。A data type definition rule may also contain a data item field list fields. A type of data can contain one or more fields in the field list. For example, the field list of single-point data heart rate can contain one field, which is heart rate. The field list of multipoint data blood pressure can contain two fields, systolic blood pressure and diastolic blood pressure. The above-mentioned multi-point data may indicate that the data collection device can obtain multiple types of data by performing data collection at one moment.
数据处理规则可以包含表1中包含于数据类型定义规则以外的其它数据项。例如,字段定义中的各数据项以及统计策略定义中的各数据项。Data processing rules may contain other data items contained in Table 1 than the data type definition rules. For example, each data item in a field definition and each data item in a statistics policy definition.
其中,上述字段列表fields中的一个字段可以具有表1中字段定义所包含的数据项:fieldType、fieldName、fieldDescription、format、unit(cn)、unit(en)、fieldOptional、mergePolicy、dataSourcePriority、mergePolicySameSource、statPolicies。即表1中字段定义所包含的数据项可以从不同的维度来描述字段列表fields中的一个字段。Among them, one of the fields in the above field list fields can have the data items included in the field definition in Table 1: fieldType, fieldName, fieldDescription, format, unit(cn), unit(en), fieldOptional, mergePolicy, dataSourcePriority, mergePolicySameSource, statPolicies . That is, the data items included in the field definition in Table 1 can describe a field in the field list fields from different dimensions.
数据项fieldType可用于标识一种类型的数据下不同类型的字段。一个字段的fieldType的格式可以为00100001001,前8位可以为这一个字段所属类型的数据的typeID,后3位可用于保证fieldType在上述typeID对应的数据所包含的字段中具有唯一性。The data item fieldType can be used to identify different types of fields under one type of data. The format of the fieldType of a field can be 00100001001, the first 8 bits can be the typeID of the type of data to which this field belongs, and the last 3 bits can be used to ensure that the fieldType is unique among the fields contained in the data corresponding to the above typeID.
数据项fieldName可以为英文字符串。例如,体温的fieldName可以为“bodyTemperature”。The data item fieldName can be an English character string. For example, the fieldName of body temperature can be "bodyTemperature".
数据项fieldOptional可用于表示一个字段是否是可选的。例如,数据项fieldOptional的值为“M”可以表示一个字段是必选的。数据项fieldOptional的值为“O”可以表示一个字段是可选的。在一种类型的数据按照数据字典的规则进行定义时,这一种类型的数据中包含的必选字段是必须被定义的。The data item fieldOptional can be used to indicate whether a field is optional. For example, the value "M" of the data item fieldOptional may indicate that a field is mandatory. The value "O" of the data item fieldOptional may indicate that a field is optional. When a type of data is defined according to the rules of the data dictionary, the mandatory fields contained in this type of data must be defined.
数据项mergePolicy可用于确定对来自于多个数据采集设备在同一时间采集的同一类型的数据进行处理的策略。即多源融合策略。多源融合策略可以包括取最大值(MAX)、取最小值(MIN)、取新值(NEW)、取旧值(OLD)、按数据源的优先级(SOURCE_PRIORITY)。上述数据源可以表示数据的来源,及数据采集设备。The data item mergePolicy can be used to determine the policy for processing the same type of data collected from multiple data collection devices at the same time. That is, the multi-source fusion strategy. The multi-source fusion strategy may include taking the maximum value (MAX), taking the minimum value (MIN), taking the new value (NEW), taking the old value (OLD), and according to the priority of the data source (SOURCE_PRIORITY). The above-mentioned data source may represent a source of data and a data collection device.
数据项dataSourcePriority是可选数据项,可用于确定数据源的优先级。数据项dataSourcePriority仅在上述数据项mergePolicy的取值为SOURCE_PRIORITY时需要进行定义。The data item dataSourcePriority is an optional data item that can be used to determine the priority of the data source. The data item dataSourcePriority needs to be defined only when the value of the above data item mergePolicy is SOURCE_PRIORITY.
数据项mergePolicySameSource可用于确定对来自于一个数据采集设备采集的同一类型的数据进行处理的策略。即同源融合策略。例如,在智能手表201确定用户在时刻A是否入睡的场景中,智能手表201需要利用在时刻A之前监测的多个与睡眠相关的数据才能判断用户是否在时刻A是否入睡。也即是说,在数据采集设备确定一种类型的数据不能即时采集即时得到结果,而需要利用前一段时间内采集的多个数据进行处理得到结果的情况下,数据显示设备可以利用上述同源融合策略确定对上述前一段时间内采集的多个数据进行处理的方法。同源融合策略可以包括取最大值(MAX)、取最小值(MIN)、取新值(NEW)、取旧值(OLD)。The data item mergePolicySameSource can be used to determine the policy for processing data of the same type collected from a data collection device. That is, the homologous fusion strategy. For example, in the scenario where the smart watch 201 determines whether the user falls asleep at time A, the smart watch 201 needs to use multiple sleep-related data monitored before time A to determine whether the user falls asleep at time A. That is to say, when the data acquisition device determines that one type of data cannot be collected and obtained immediately, but needs to be processed by multiple data collected in the previous period to obtain the result, the data display device can use the above-mentioned homologous The fusion strategy determines a method for processing the multiple data collected in the preceding period of time. The homologous fusion strategy may include taking the maximum value (MAX), taking the minimum value (MIN), taking the new value (NEW), and taking the old value (OLD).
数据项statPolicies可以表示字段的统计策略列表。一个字段的统计策略列表中可以包含一个或多个统计策略。例如,计算最大值的统计策略、计算最小值的统计策略、计算平均值的统计策略、计算总和的统计策略等等。The data item statPolicies can represent a list of statistical policies for a field. One or more statistical strategies can be included in the statistical strategy list of a field. For example, a statistical strategy to calculate the maximum value, a statistical strategy to calculate the minimum value, a statistical strategy to calculate the average value, a statistical strategy to calculate the sum, and so on.
每一个统计策略可以具有表1中统计策略定义所包含的数据项:statType、statFieldName、statFormat、statPolicy。其中:Each statistical policy may have the data items included in the statistical policy definition in Table 1: statType, statFieldName, statFormat, statPolicy. in:
数据项statType可用于标识一个字段的统计数据类型。数据项statType的格式可以参考前述数据项fieldType的数据格式。The data item statType can be used to identify the statistical data type of a field. For the format of the data item statType, please refer to the data format of the aforementioned data item fieldType.
数据项statPolicy可用于确定一个字段的统计策略。统计策略可以包括计算最大值(MAX)、计算最小值(MIN)、计算平均值(AVG)、求和(SUM)、计数(COUNT)、计算方差(SD)、取新值(LAST)。The data item statPolicy can be used to determine the statistical policy of a field. Statistical strategies may include calculating the maximum value (MAX), calculating the minimum value (MIN), calculating the average value (AVG), summing (SUM), counting (COUNT), calculating the variance (SD), and taking a new value (LAST).
本申请实施例对数据字典中各数据项的名称不作限定。不限于上述表1所列举的数据项,数据字典中还可以包含更多或更少的数据项。The embodiment of the present application does not limit the names of the data items in the data dictionary. Not limited to the data items listed in Table 1 above, more or less data items may be included in the data dictionary.
不限于上述数字字典,上述用于为不同类型的数据提供统一的定义方式的规则也可以为其它的名称。本申请实施例对此不作限定。Not limited to the above-mentioned digital dictionary, the above-mentioned rules for providing a unified definition method for different types of data may also have other names. This embodiment of the present application does not limit it.
不同类型的数据均可以按照表1所示数据字典进行元数据定义。一种类型的数据对应的元数据可用于确定这一种类型的数据所具有的各项数据项的取值。那么,按照数据字典进行元数据定义的不同类型的数据对应的元数据可具有相同或相近的数据结构。不同类型的数据对应的元数据具有相同的数据结构可以表示这些元数据中包含的数据项的种类相同。不同类型的数据对应的元数据具有相近可以表示这些元数据中,有的元数据中包含有数据字典中可选的数据项,有的元数据中不包含数据字典中可选的数据项。Different types of data can be defined as metadata according to the data dictionary shown in Table 1. The metadata corresponding to one type of data can be used to determine the value of each data item of this type of data. Then, the metadata corresponding to different types of data whose metadata is defined according to the data dictionary may have the same or similar data structure. Metadata corresponding to different types of data having the same data structure may indicate that the types of data items contained in these metadata are the same. The metadata corresponding to different types of data are similar, which can indicate that among these metadata, some metadata contain optional data items in the data dictionary, and some metadata do not include optional data items in the data dictionary.
由于不同类型的数据对应的元数据可具有相同或相近的数据结构,用于管理数据采集设备的设备管理APP(如运动健康APP)中用于计算和呈现新增类型的数据的代码可以复用已有类型的数据的代码。例如,用于进行数据融合和数据统计的代码等等。这可以减少开发人员的工作量,提高数据接入的效率。Since the metadata corresponding to different types of data can have the same or similar data structure, the code used to calculate and present new types of data in the device management APP (such as sports and health APP) used to manage data collection equipment can be reused The code for data of an existing type. For example, codes for data fusion and statistics, etc. This can reduce the workload of developers and improve the efficiency of data access.
基于上述数据字典,这里以上述通信系统10中的电子设备100、智能手表201和云服务器300组成的通信系统40为例来介绍本申请实施例提供的一种数据处理方法。Based on the above data dictionary, a data processing method provided by the embodiment of the present application is introduced here by taking the communication system 40 composed of the electronic device 100, the smart watch 201 and the cloud server 300 in the communication system 10 as an example.
请参考图4,图4示例性示出了通信系统40的结构示意图。Please refer to FIG. 4 , which exemplarily shows a schematic structural diagram of a communication system 40 .
(1)智能手表201采集的数据接入电子设备100。(1) The data collected by the smart watch 201 is connected to the electronic device 100 .
如图4所示,智能手表201中可包含数据①采集模块410、数据②采集模块411、数据上报模块412。其中,数据①采集模块410、数据②采集模块411可参考前述通信系统30的介绍。数据上报模块412可用于按照数据①对应的元数据中包含的数据类型定义规则,将数据①上报给电子设备100中的运动健康APP,并按照数据②对应的元数据中包含的数据类型定义规则,将数据②上报给电子设备100中的运动健康APP。As shown in FIG. 4 , the smart watch 201 may include a data ① collection module 410 , a data ② collection module 411 , and a data reporting module 412 . Wherein, the data ① collection module 410 and the data ② collection module 411 can refer to the introduction of the aforementioned communication system 30 . The data reporting module 412 can be used to report the data ① to the sports health APP in the electronic device 100 according to the data type definition rules contained in the metadata corresponding to the data ①, and define the rules according to the data type definition rules contained in the metadata corresponding to the data ② , and report the data ② to the sports health APP in the electronic device 100 .
在一种可能的实现方式中,智能手表201在出厂前可写入有上述数据①对应的元数据中包含的数据类型定义规则,以及数据②对应的元数据中包含的数据类型定义规则。可选的,上述与数据①和数据②适配的数据类型定义规则也可也以是智能手表201出厂之后,通过智能手表201中的软件更新写入智能手表201中的。In a possible implementation, the smart watch 201 can be written with the data type definition rules contained in the metadata corresponding to the above data ① and the data type definition rules contained in the metadata corresponding to the data ② before leaving the factory. Optionally, the above-mentioned data type definition rules adapted to data ① and data ② may also be written into smart watch 201 through software update in smart watch 201 after smart watch 201 leaves the factory.
当采集到数据①,智能手表201可以确定出与数据①适配的数据类型定义规则。智能手表201可以通过数据上报模块412将数据①按照与数据①适配的数据类型定义规则上报给电子设备100中的运动健康APP。When the data ① is collected, the smart watch 201 can determine the data type definition rules that match the data ①. The smart watch 201 can report the data ① to the sports health APP in the electronic device 100 through the data reporting module 412 according to the data type definition rules adapted to the data ①.
(2)电子设备100对数据采集设备的数据进行处理。(2) The electronic device 100 processes the data of the data collection device.
电子设备100中可包含运动健康APP。运动健康APP中可包含数据管理模块413、数据字典414、业务A实现模块415、业务B实现模块416。其中,数据管理模块413可以获取由智能手表201中数据上报模块412上报的数据①和数据②。可以理解的,数据①和数据②从数据上报模块412传输至数据管理模块413的过程中,数据①和数据②还经过了智能手表201和电子设备100中其它模块(如蓝牙通信模块等)的处理。本申请实施例为了更清楚地体现数据的处理过程,简化了数据在通信系统40中的传输过程。本申请实施例对数据①和数据②从数据上报模块412传输至数据管理模块413,以及从数据管理模块413传输至云服务器300中的数据存储模块417的具体方法不作限定。The electronic device 100 may include a sports and health APP. The sports health APP may include a data management module 413, a data dictionary 414, a business A realization module 415, and a business B realization module 416. Wherein, the data management module 413 can obtain data ① and data ② reported by the data reporting module 412 in the smart watch 201 . It can be understood that during the process of data ① and data ② being transmitted from the data reporting module 412 to the data management module 413, the data ① and data ② have also passed through the smart watch 201 and other modules (such as Bluetooth communication modules, etc.) in the electronic device 100. deal with. The embodiment of the present application simplifies the data transmission process in the communication system 40 in order to more clearly reflect the data processing process. The embodiment of the present application does not limit the specific method of transferring data ① and data ② from the data reporting module 412 to the data management module 413 , and from the data management module 413 to the data storage module 417 in the cloud server 300 .
数据字典414可包含数据①的配置文件和数据②的配置文件。一种类型的数据的配置文件可以遵循这一种类型的数据对应的元数据中的定义内容。即数据①的配置文件可以是根据数据①对应的元数据确定的。数据②的配置文件可以是根据数据②对应的元数据确定的。一 种类型的数据的配置文件可用于设备管理APP对接收到的这一种类型的数据进行识别、数据处理、云同步以及开放给三方APP等处理。The data dictionary 414 may contain configuration files for data ① and configuration files for data ②. A configuration file of a type of data may follow the definition content in the metadata corresponding to this type of data. That is, the configuration file of data ① may be determined according to the metadata corresponding to data ①. The configuration file of data ② may be determined according to metadata corresponding to data ②. A configuration file of a type of data can be used by the device management APP to identify the received data of this type, data processing, cloud synchronization, and open to third-party APPs for processing.
当接收到来自数据上报模块412的数据①和数据②,数据管理模块413可以从数据字典414中获取数据①的配置文件和数据②的配置文件。其中,数据上报模块412上报的数据①中包含数据①的数据项typeID,数据②中包含数据②的数据项typeID。数据管理模块413可以根据数据①的数据项typeID从数据字典414中获取数据①的配置文件,并根据数据②的数据项typeID从数据字典414中获取数据②的配置文件。When receiving data ① and data ② from the data reporting module 412 , the data management module 413 can obtain the configuration file of data ① and the configuration file of data ② from the data dictionary 414 . Wherein, the data ① reported by the data reporting module 412 includes the data item typeID of the data ①, and the data ② includes the data item typeID of the data ②. The data management module 413 can obtain the configuration file of data ① from the data dictionary 414 according to the data item typeID of data ①, and obtain the configuration file of data ② from the data dictionary 414 according to the data item typeID of data ②.
根据①的配置文件和数据②的配置文件中的数据类型定义规则,数据管理模块413可以识别数据①和数据②的具体内容。根据①的配置文件和数据②的配置文件中的数据处理规则,数据管理模块413可以对数据①和数据②进行数据融合、数据统计等计算处理。According to the data type definition rules in the configuration file of ① and the configuration file of data ②, the data management module 413 can identify the specific content of data ① and data ②. According to the data processing rules in the configuration file of ① and the configuration file of data ②, the data management module 413 can perform calculation processing such as data fusion and data statistics on data ① and data ②.
由上述表1可知,数据字典中的数据处理规则可包含数据融合的规则、数据统计的规则。上述数据融合的规则可包含数据项mergePolicy、dataSourcePriority、mergePolicySameSource。上述数据统计的规则可包含数据项statPolicy。It can be known from the above Table 1 that the data processing rules in the data dictionary may include data fusion rules and data statistics rules. The above data fusion rules may include data items mergePolicy, dataSourcePriority, mergePolicySameSource. The above-mentioned data statistics rule may include a data item statPolicy.
(a)数据融合(a) Data Fusion
在一种可能的实现方式中,数据管理模块413可以先判断是否有智能手表201以外的数据采集设备上报了数据①,且智能手表201以及其它数据采集设备采集数据①的时间相同。若数据管理模块413仅接收到智能手表201采集的数据①,数据管理模块413可以存储智能手表201采集的数据①。In a possible implementation, the data management module 413 may first determine whether there is data ① reported by a data collection device other than the smart watch 201, and the smart watch 201 and other data collection devices collect data ① at the same time. If the data management module 413 only receives the data ① collected by the smart watch 201 , the data management module 413 can store the data ① collected by the smart watch 201 .
若数据管理模块413接收到智能手表201等多个数据采集设备均在时刻A采集的多个数据①,数据管理模块413可以根据数据①的配置文件中多源融合策略的数据项mergePolicy来确定,在上述多个数据①中以哪个数据①作为时刻A的准确数据。If the data management module 413 receives multiple data ① collected by multiple data collection devices such as the smart watch 201 at time A, the data management module 413 can determine according to the data item mergePolicy of the multi-source fusion policy in the configuration file of the data ①, Which data ① among the above-mentioned plurality of data ① is used as the accurate data at time A.
例如,在数据①的配置文件中数据项mergePolicy为NEW的情况下,数据管理模块413可以将上述多个数据①中写入时间最新的数据①作为融合后的数据,即时刻A的准确数据。上述写入时间可以为数据写入电子设备100的存储模块的时间。For example, when the data item mergePolicy in the configuration file of data ① is NEW, the data management module 413 may use the data ① with the latest writing time among the above-mentioned multiple data ① as the merged data, that is, the accurate data at time A. The above writing time may be the time when data is written into the storage module of the electronic device 100 .
再例如,在数据①的配置文件中数据项mergePolicy为OLD的情况下,数据管理模块413可以将上述多个数据①中写入时间最旧的数据①作为融合后的数据。For another example, when the data item mergePolicy in the configuration file of data ① is OLD, the data management module 413 may use the data ① with the oldest writing time among the above-mentioned multiple data ① as the merged data.
再例如,在数据①的配置文件中数据项mergePolicy为MAX的情况下,数据管理模块413可以将上述多个数据①中取值最大的数据①作为融合后的数据。For another example, when the data item mergePolicy in the configuration file of data ① is MAX, the data management module 413 may use the data ① with the largest value among the above-mentioned multiple data ① as the merged data.
再例如,在数据①的配置文件中数据项mergePolicy为MIN的情况下,数据管理模块413可以将上述多个数据①中取值最小的数据①作为融合后的数据。For another example, when the data item mergePolicy in the configuration file of data ① is MIN, the data management module 413 may use the data ① with the smallest value among the above-mentioned multiple data ① as the merged data.
再例如,在数据①的配置文件中数据项mergePolicy为SOURCE_PRIORITY的情况下,数据管理模块413可以将上述智能手表201等多个数据采集设备中设备优先级最高的设备采集的数据①作为融合后的数据。For another example, in the case that the data item mergePolicy in the configuration file of data ① is SOURCE_PRIORITY, the data management module 413 can use the data ① collected by the device with the highest device priority among multiple data collection devices such as the smart watch 201 as the merged data ①. data.
其中,在数据项mergePolicy为SOURCE_PRIORITY的情况下,数据①的配置文件中包含数据项dataSourcePriority。dataSourcePriority可用于确定设备优先级。Wherein, when the data item mergePolicy is SOURCE_PRIORITY, the configuration file of data ① includes the data item dataSourcePriority. dataSourcePriority can be used to determine device priority.
在一种可能的实现方式中,dataSourcePriority确定的设备优先级是根据数据采集设备的类别确定的优先级。例如,在采集血压数据时,血压计的优先级高于智能手表的优先级。数据管理模块413可以判断上述多个在时刻A采集数据①的数据采集设备的类别,并根据dataSourcePriority确定的设备优先级选择类别优先级最高的数据采集设备采集的数据①。若在上述多个在时刻A采集数据①的数据采集设备中,有多个数据采集设备均为类别优先级最高的数据采集设备,数据管理模块413可以结合其它融合策略(如MAX、MIN、NEW、OLD 等)选择多个类别优先级最高的数据采集设备采集的数据①中的一个作为融合后的数据。In a possible implementation manner, the device priority determined by dataSourcePriority is a priority determined according to the category of the data collection device. For example, when collecting blood pressure data, the priority of the sphygmomanometer is higher than that of the smart watch. The data management module 413 can determine the types of the above-mentioned multiple data collection devices that collect data ① at time A, and select the data ① collected by the data collection device with the highest category priority according to the device priority determined by dataSourcePriority. If among the above-mentioned multiple data collection devices that collect data ① at time A, there are multiple data collection devices that are all data collection devices with the highest category priority, the data management module 413 can combine other fusion strategies (such as MAX, MIN, NEW , OLD, etc.) select one of the data ① collected by the data acquisition device with the highest category priority as the fused data.
在一种可能的实现方式中,dataSourcePriority确定的设备优先级可包含两个层级的优先级:根据数据采集设备的类别确定的优先级,以及根据数据采集设备的型号确定的优先级。上述根据数据采集设备的类别确定的优先级可以参考前述实施例的说明。上述根据数据采集设备的型号确定的优先级可用于确定每一种型号的数据采集设备的优先级。例如,在采集血压数据时,类别为血压计的数据采集设备有多个型号:型号A血压计、型号B血压计等。型号A血压计的优先级高于型号B血压计的优先级。那么,数据管理模块413可以先利用根据数据采集设备的类别确定的优先级,从上述多个在时刻A采集数据①的数据采集设备中,选择类别优先级最高的数据采集设备采集的数据①。进一步的,若上述类别优先级最高的数据采集设备有多个,数据管理模块413可以判断这多个类别优先级最高的数据采集设备的型号,并利用上述根据数据采集设备的型号确定的优先级选择型号优先级最高的数据采集设备采集的数据①。In a possible implementation manner, the device priority determined by dataSourcePriority may include two levels of priority: the priority determined according to the type of the data collection device, and the priority determined according to the model of the data collection device. For the above priority determined according to the type of the data collection device, reference may be made to the description of the foregoing embodiments. The above priority determined according to the model of the data collection device can be used to determine the priority of each type of data collection device. For example, when collecting blood pressure data, a data collection device classified as a blood pressure monitor has multiple models: a model A blood pressure monitor, a model B blood pressure monitor, and the like. Model A blood pressure monitors have higher priority than Model B blood pressure monitors. Then, the data management module 413 can first use the priority determined according to the type of the data collection device to select the data ① collected by the data collection device with the highest category priority from the above-mentioned multiple data collection devices that collect data ① at time A. Further, if there are multiple data collection devices with the highest category priority, the data management module 413 can determine the models of the data collection devices with the highest category priority, and use the above-mentioned priority determined according to the model of the data collection device Select the data collected by the data collection device with the highest model priority①.
在一种可能的实现方式中,dataSourcePriority确定的设备优先级可仅包含根据数据采集设备的型号确定的优先级。数据管理模块413可以判断上述多个在时刻A采集数据①的数据采集设备的型号,并根据dataSourcePriority确定的设备优先级选择型号优先级最高的数据采集设备采集的数据①。In a possible implementation manner, the device priority determined by dataSourcePriority may only include the priority determined according to the model of the data collection device. The data management module 413 can determine the models of the above-mentioned multiple data collection devices that collect data ① at time A, and select the data ① collected by the data collection device with the highest model priority according to the device priority determined by dataSourcePriority.
数据管理模块413对数据②进行数据融合的方法可以参考上述对数据①进行数据融合的介绍。这里不再赘述。For the method for the data management module 413 to perform data fusion on data ②, please refer to the above-mentioned introduction to data fusion on data ①. I won't go into details here.
上述多源融合策略可以减少多个数据采集设备再同一时间采集到同一类型的数据,导致数据冲突的情况。不限于上述列举的多源融合策略,数据字典中还可包含更多的多源融合策略。The above multi-source fusion strategy can reduce the situation that multiple data collection devices collect the same type of data at the same time, resulting in data conflicts. Not limited to the multi-source fusion strategies listed above, more multi-source fusion strategies may also be included in the data dictionary.
在一些实施例中,在数据管理模块413接收到来自一个数据采集设备采集的多个同一类型的数据的情况下,数据管理模块413可以根据这一类型的数据的配置文件中同源融合策略的数据项mergePolicySameSource对这多个同一类型的数据进行数据融合。数据管理模块413对数据进行同源融合的方法可以参考上述对数据进行多源融合的介绍。In some embodiments, when the data management module 413 receives multiple data of the same type collected by a data collection device, the data management module 413 may, according to the homologous fusion policy in the configuration file of this type of data The data item mergePolicySameSource performs data fusion on these multiple data of the same type. For the method of performing homologous fusion of data by the data management module 413, reference may be made to the above-mentioned introduction of multi-source fusion of data.
(b)数据统计(b) Statistics
在一种可能的实现方式中,数据管理模块413可以根据数据①的配置文件中数据统计策略的数据项statPolicy对一段时间内的多个数据①进行数据统计。上述一段时间可以例如是一个小时、一天等等。本申请实施例对上述一段时间的长度不作限定。In a possible implementation manner, the data management module 413 may perform data statistics on multiple data ① within a period of time according to the data item statPolicy of the data statistics policy in the configuration file of the data ①. The aforementioned period of time may be, for example, one hour, one day, and so on. The embodiment of the present application does not limit the length of the above period of time.
其中,在数据管理模块413仅接收到智能手表201采集的数据①的情况下,上述一段时间内的多个数据①可以是智能手表201在这一段时间内采集的多个数据①。在数据管理模块413接收到智能手表201等多个数据采集设备采集的数据①的情况下,上述一段时间内的多个数据①可以是采集时间在上述一段时间内,且经过上述多源融合处理的多个数据①。Wherein, in the case that the data management module 413 only receives the data ① collected by the smart watch 201 , the multiple data ① in the above period of time may be the multiple data ① collected by the smart watch 201 in this period of time. When the data management module 413 receives the data ① collected by multiple data collection devices such as the smart watch 201, the multiple data ① in the above-mentioned period of time may be collected within the above-mentioned period of time, and have undergone the above-mentioned multi-source fusion processing Multiple data of ①.
例如,在数据①的配置文件中数据项statPolicy为AVG的情况下,数据管理模块413可以计算上述一段时间内多个数据①的平均值。For example, in the case that the data item statPolicy in the configuration file of data ① is AVG, the data management module 413 can calculate the average value of multiple data ① in the above-mentioned period of time.
再例如,在数据①的配置文件中数据项statPolicy为SUM的情况下,数据管理模块413可以计算上述一段时间内多个数据①的总和。For another example, when the data item statPolicy in the configuration file of data ① is SUM, the data management module 413 may calculate the sum of multiple data ① in the above-mentioned period of time.
再例如,在数据①的配置文件中数据项statPolicy为MAX的情况下,数据管理模块413可以确定出上述一段时间内多个数据①的最大值。For another example, when the data item statPolicy in the configuration file of data ① is MAX, the data management module 413 may determine the maximum value of multiple data ① within the above period of time.
再例如,在数据①的配置文件中数据项statPolicy为MIN的情况下,数据管理模块413可以确定出上述一段时间内多个数据①的最小值。For another example, when the data item statPolicy in the configuration file of data ① is MIN, the data management module 413 may determine the minimum value of multiple data ① within the above-mentioned period of time.
再例如,在数据①的配置文件中数据项statPolicy为SD的情况下,数据管理模块413可以计算上述一段时间内多个数据①的方差。For another example, in the case where the data item statPolicy in the configuration file of data ① is SD, the data management module 413 may calculate the variance of multiple data ① within the above-mentioned period of time.
再例如,在数据①的配置文件中数据项statPolicy为COUNT的情况下,数据管理模块413可以计算上述一段时间内多个数据①的数据个数。For another example, when the data item statPolicy in the configuration file of data ① is COUNT, the data management module 413 may calculate the number of data of multiple data ① within the above-mentioned period of time.
再例如,在数据①的配置文件中数据项statPolicy为LAST的情况下,数据管理模块413可以确定出上述一段时间内多个数据①的最新值。该最新值可以是一段时间内采集时间最晚的数据。For another example, in the case that the data item statPolicy in the configuration file of data ① is LAST, the data management module 413 may determine the latest values of multiple data ① within the above-mentioned period of time. The latest value may be the latest data collected within a period of time.
不限于上述列举的数据统计策略,数据字典中还可包含更多的数据统计策略。Not limited to the data statistics strategies listed above, more data statistics strategies may be included in the data dictionary.
数据管理模块413对按照数据统计的规则对数据进行数据统计,可便于业务实现模块实现各种类型的统计数据进行展示的需求。例如,展示数据的平均值、总和,以及将数据以折线图、柱状图等形式进行展示等等。The data management module 413 performs data statistics on the data according to the rules of data statistics, which can facilitate the business implementation module to realize the display requirements of various types of statistical data. For example, display the average value and sum of the data, and display the data in the form of a line graph, a histogram, etc.
业务A实现模块415和业务B实现模块416需要实现的业务可以参考前述图3所示通信系统30中的介绍。业务A实现模块415和业务B实现模块416均可从数据管理模块413获取数据①、数据②、数据①在各类数据统计策略下的统计结果、数据②在各类数据统计策略下的统计结果等等数据。For the services to be implemented by the service A realization module 415 and the service B realization module 416, reference may be made to the introduction in the aforementioned communication system 30 shown in FIG. 3 . Both the business A implementation module 415 and the business B implementation module 416 can obtain data ①, data ②, statistical results of data ① under various data statistical strategies, and statistical results of data ② under various data statistical strategies from the data management module 413 Wait for the data.
示例性的,业务A实现模块415可用于呈现数据①相关的数据和数据②相关的数据。业务A实现模块可以从数据①的配置文件中确定数据①的显示策略(如在用户界面的顶部以折线图显示),以及从数据②的配置文件中确定数据②的显示策略(如在用户界面的顶部以柱状图显示)。业务A实现模块415可以按照数据①的显示策略对从数据管理模块413获取的数据①进行显示,并按照数据②的显示策略对从数据管理模块413获取的数据②进行显示。Exemplarily, the service A realization module 415 may be used to present data related to data ① and data related to data ②. The business A implementation module can determine the display strategy of data ① from the configuration file of data ① (such as displayed in a line graph at the top of the user interface), and determine the display strategy of data ② from the configuration file of data ② (such as displayed in the user interface displayed as a histogram at the top of the ). The service A implementation module 415 can display the data ① obtained from the data management module 413 according to the display strategy of data ①, and display the data ② obtained from the data management module 413 according to the display strategy of data ②.
另外,若数据①的配置文件中定义有数据①的统计数据的显示策略(如在用户界面数据①的折线图的下侧显示平均值),业务A实现模块还可以从数据管理模块413获取数据①的各项统计数据,并按照数据①的统计数据的显示策略进行显示。业务A实现模块显示数据②的统计数据的方法可以参考上述显示数据①的统计数据的方法。这里不再赘述。In addition, if the configuration file of data ① defines a display strategy for statistical data of data ① (such as displaying the average value on the lower side of the line graph of data ① in the user interface), the business A implementation module can also obtain data from the data management module 413 Various statistical data of ①, and display according to the display strategy of the statistical data of data ①. For the method of displaying statistical data of data ② by the module of business A, please refer to the method of displaying statistical data of data ① above. I won't go into details here.
可以理解的,上述用于显示数据①相关的数据的用户界面与用于显示数据②相关的数据的用户界面是不同的用户界面。It can be understood that the user interface for displaying data related to data ① and the user interface for displaying data related to data ② are different user interfaces.
(3)电子设备100将数据采集设备采集的数据上传云服务器300,并开放给三方APP。(3) The electronic device 100 uploads the data collected by the data collection device to the cloud server 300, and opens it to the third-party APP.
在一些实施例中,数据管理模块413可以按照数据①的配置文件中数据类型定义规则,将数据①发送给云服务器300。云服务器300中可包含数据存储模块417。当接收到上述数据①,云服务器300可以根据数据①对应的元数据中包含的数据类型定义规则确定数据①的具体内容,并将数据①存储至数据存储模块417。In some embodiments, the data management module 413 may send the data ① to the cloud server 300 according to the data type definition rules in the configuration file of the data ①. The cloud server 300 may include a data storage module 417 . When the above data ① is received, the cloud server 300 can determine the specific content of the data ① according to the data type definition rules contained in the metadata corresponding to the data ①, and store the data ① in the data storage module 417.
云服务器300接收到数据②并将数据②存储至数据存储模块417的过程可以参考云服务器300将数据①存储至数据存储模块417的介绍。For the process of cloud server 300 receiving data ② and storing data ② in data storage module 417 , please refer to the introduction of cloud server 300 storing data ① in data storage module 417 .
在一些实施例中,数据管理模块413可以按照数据①的配置文件中数据类型定义规则,将数据①开放给三方APP。三方APP可以根据数据①对应的元数据中包含的数据类型定义规则确定数据①的具体内容,并利用数据①实现自己的需求业务。In some embodiments, the data management module 413 may open the data ① to third-party APPs according to the data type definition rules in the configuration file of the data ①. The third-party APP can determine the specific content of data ① according to the data type definition rules contained in the metadata corresponding to data ①, and use data ① to realize its own business needs.
由前述实施例可知,在不同类型的数据均按照数据字典的规则进行元数据定义的情况下,不同类型的数据对应的元数据可具有相同或相近的数据结构,并且不同类型的数据所具有的数据项typeID是全局唯一的。那么,不同类型的数据接入电子设备100中设备管理APP的过 程中数据采集设备与电子设备100之间进行数据交互的接口可以共用,不同类型的数据进行云同步过程中电子设备100和云服务器300之间进行数据交互的接口可以共用,不同类型的数据开放给三方APP的过程中设备管理APP提供的开放接口也可以共用。当新增一种类型的数据,新增类型的数据接入电子设备100、云服务器300以及开放给三方APP的相关接口可以与已有类型的数据接入电子设备100、云服务器300以及开放给三方APP的相关接口相同。上述已有类型的数据为按照上述数据字典的规则进行定义的数据。也即是说,在新增类型的数据接入电子设备100、云服务器300以及开放给三方APP时,开发人员可以不用另外开发适用于该新增类型的数据的接入接口。这可以减少新增类型的数据接入时开发人员的工作量,提高数据接入的效率。It can be seen from the above-mentioned embodiments that when different types of data are defined according to the rules of the data dictionary, the metadata corresponding to different types of data may have the same or similar data structure, and the different types of data have The data item typeID is globally unique. Then, during the process of connecting different types of data to the device management APP in the electronic device 100, the interface for data interaction between the data collection device and the electronic device 100 can be shared. During the cloud synchronization process of different types of data, the electronic device 100 and the cloud server The interface for data exchange between 300s can be shared, and the open interface provided by the device management APP during the process of opening different types of data to third-party APPs can also be shared. When a new type of data is added, the newly added type of data access electronic device 100, cloud server 300 and related interfaces open to third-party APPs can be connected with existing types of data access electronic device 100, cloud server 300 and open to third-party APPs. The relevant interfaces of the three-party APP are the same. The above-mentioned existing types of data are data defined according to the rules of the above-mentioned data dictionary. That is to say, when the newly added type of data is connected to the electronic device 100, the cloud server 300 and opened to third-party APPs, developers do not need to develop an additional access interface suitable for the newly added type of data. This can reduce the workload of developers when adding new types of data access, and improve the efficiency of data access.
在一些实施例中,云服务器300中可存储有一种或多种类型的数据的配置文件。一种类型的数据的配置文件可以根据这一种类型的数据对应的元数据确定。当有新增类型的数据产生时,云服务器300可以将该新增类型的数据的配置文件发送给电子设备100。电子设备100中的设备管理APP(如运动健康APP)可以利用该新增类型的数据的配置文件更新数据字典。这样,当接收到数据采集设备采集的该新增类型的数据,设备管理APP可以利用更新后的数据字典来确定该新增类型的数据的内容,并根据该新增类型的数据的配置文件对该新增类型的数据进行计算、显示等处理。In some embodiments, configuration files of one or more types of data may be stored in the cloud server 300 . A configuration file of a type of data may be determined according to metadata corresponding to this type of data. When a new type of data is generated, the cloud server 300 may send the configuration file of the new type of data to the electronic device 100 . A device management APP (such as a sports and health APP) in the electronic device 100 can use the configuration file of the newly added type of data to update the data dictionary. In this way, when receiving the new type of data collected by the data collection device, the device management APP can use the updated data dictionary to determine the content of the new type of data, and according to the configuration file of the new type of data The newly added type of data is processed for calculation and display.
在一些实施例中,当有新增类型的数据产生时,电子设备100可以响应用于更新设备管理APP的版本的用户操作,更新设备管理APP的版本。版本更新后的设备管理APP中的数据字典中可包含该新增类型的数据的配置文件。In some embodiments, when a new type of data is generated, the electronic device 100 may update the version of the device management APP in response to a user operation for updating the version of the device management APP. The data dictionary in the device management APP after the version update can contain the configuration file of the newly added type of data.
下面以新增体温数据为例,说明将数据采集设备采集的数据接入数据显示设备、云服务器以及开放给三方APP的数据处理过程。The following takes the newly added body temperature data as an example to illustrate the data processing process of connecting the data collected by the data collection device to the data display device, cloud server and open to the third-party APP.
(1)按照数据字典的规则定义与体温数据对应的元数据。(1) Define metadata corresponding to body temperature data according to the rules of the data dictionary.
体温数据对应的元数据可用于确定体温数据所具有的各项数据项的取值。体温数据对应的元数据可以参考下述表2所示的内容。The metadata corresponding to the body temperature data can be used to determine the values of various data items of the body temperature data. The metadata corresponding to the body temperature data can refer to the content shown in Table 2 below.
Figure PCTCN2022124595-appb-000005
Figure PCTCN2022124595-appb-000005
Figure PCTCN2022124595-appb-000006
Figure PCTCN2022124595-appb-000006
表2Table 2
表2中各数据项的取值可以参考前述实施例中数据字典的介绍。这里不再赘述。For the value of each data item in Table 2, reference may be made to the introduction of the data dictionary in the foregoing embodiments. I won't go into details here.
(2)根据体温数据对应的元数据确定体温数据的配置文件。(2) Determine the configuration file of the body temperature data according to the metadata corresponding to the body temperature data.
体温数据的配置文件可以包括:Profiles for body temperature data can include:
Figure PCTCN2022124595-appb-000007
Figure PCTCN2022124595-appb-000007
Figure PCTCN2022124595-appb-000008
Figure PCTCN2022124595-appb-000008
可以看出,体温数据的配置文件中定义了体温数据的各数据项的取值。由于体温数据为单点数据,体温数据的配置文件中数据项字段列表fields中仅包含一个字段,即字段名称“fieldName”为“bodyTemperature”,字段数据类型标识“fieldType”为“400011975”的字段。体温数据的配置文件中还可包含对体温数据中一个字段的数据融合策略以及统计策略。例如,上述配置文件中的统计策略列表“statPolicies”中包含四种统计策略:计算平均值(AVG)、计算最大值(MAX)、计算最小值(MIN)、计数(COUNT)。It can be seen that the configuration file of the body temperature data defines the value of each data item of the body temperature data. Since the body temperature data is single-point data, the data item field list fields in the body temperature data configuration file contains only one field, that is, the field name "fieldName" is "bodyTemperature", and the field data type identifier "fieldType" is "400011975". The configuration file of the body temperature data may also include a data fusion strategy and a statistics strategy for a field in the body temperature data. For example, the statistical policy list "statPolicies" in the above configuration file contains four statistical policies: calculating the average value (AVG), calculating the maximum value (MAX), calculating the minimum value (MIN), and counting (COUNT).
上述体温数据的配置文件可用于设备管理APP识别接收到的体温数据,并对体温数据进行数据融合、数据统计等处理。The configuration file of the above body temperature data can be used by the device management APP to identify the received body temperature data, and perform data fusion and data statistics processing on the body temperature data.
(3)将体温数据的配置文件中的数据类型定义规则固化至体温数据采集设备。(3) Solidify the data type definition rules in the configuration file of body temperature data to the body temperature data acquisition device.
在一种可能的实现方式中,体温数据采集设备在出厂之前,体温数据采集设备的生产商可以将体温数据的配置文件中的数据类型定义规则写入体温数据采集设备。可选的,上述体温数据配置文件中的数据类型定义规则也可以是体温数据采集设备出厂后,进行软件更新时写入体温数据采集设备的。In a possible implementation manner, before the body temperature data collection device leaves the factory, the manufacturer of the body temperature data collection device may write the data type definition rules in the body temperature data configuration file into the body temperature data collection device. Optionally, the data type definition rules in the above body temperature data configuration file may also be written into the body temperature data acquisition device when the software is updated after the body temperature data acquisition device leaves the factory.
上述数据类型定义规则可以包括数据项:typeID、name、type、sensitivityLevel、validatePolicies、displayPoliciy。其中,上述数据项name、type、sensitivityLevel、validatePolicies、displayPoliciy中的一项或多项也可不写入体温数据采集设备。The above data type definition rules may include data items: typeID, name, type, sensitivityLevel, validatePolicies, displayPolicy. Wherein, one or more of the above data items name, type, sensitivityLevel, validatePolicies, and displayPolicy may not be written into the body temperature data collection device.
其中,上述数据类型定义规则中还可包含数据项字段列表fields。体温数据采集设备的生产商还可以将体温数据的配置文件中字段定义下的一个或多个数据项写入体温数据采集设备。由于体温数据为单点数据,体温数据仅有一个字段,即体温。体温数据采集设备的生产商可以将字段定义中的数据项:fieldType、unit(en),写入体温数据采集设备。那么,体温 数据采集设备可以按照上述数据类型定义规则上报体温数据,并按照字段定义中的数据项上报体温数据包含的字段。Wherein, the above-mentioned data type definition rule may also include a data item field list fields. The manufacturer of the body temperature data collection device can also write one or more data items under the field definitions in the body temperature data configuration file to the body temperature data collection device. Since the body temperature data is single-point data, the body temperature data has only one field, that is, body temperature. The manufacturer of the body temperature data collection device can write the data items in the field definition: fieldType, unit(en) into the body temperature data collection device. Then, the body temperature data acquisition device can report body temperature data according to the above data type definition rules, and report the fields contained in the body temperature data according to the data items in the field definition.
(4)体温数据采集设备将采集到的体温数据按照体温数据的数据类型定义规则上报给数据显示设备。(4) The body temperature data collection device reports the collected body temperature data to the data display device according to the data type definition rules of the body temperature data.
当采集到体温数据,体温数据采集设备可以按照体温数据的数据类型定义规则对体温数据进行描述,并将描述后的数据发送给数据显示设备。该数据显示设备可以是与体温数据采集设备建立有绑定关系的设备。When the body temperature data is collected, the body temperature data acquisition device can describe the body temperature data according to the data type definition rules of the body temperature data, and send the described data to the data display device. The data display device may be a device that has a binding relationship with the body temperature data collection device.
在一种可能的实现方式中,经过描述后的体温数据中可以既可包含类型标识typeID,还可以包含字段数据类型标识fieldType以及该字段的采样值。In a possible implementation manner, the described body temperature data may include not only the type identifier typeID, but also the field data type identifier fieldType and the sampling value of the field.
例如,经过描述后的体温数据可以为:For example, the described body temperature data can be:
"typeID":400011"typeID":400011
"fieldType":400011975"fieldType":400011975
"start_time":1626836477471"start_time": 1626836477471
"end_time":1626836477471"end_time": 1626836477471
"value":36.0"value":36.0
可以理解的,上述"start_time"和"end_time"可以分别表示这一个体温数据采集的开始时间和结束时间。上述经体温数据采集设备描述后的体温数据还可以包含更多的数据项。例如name、type、sensitivityLevel、validatePolicies等。It can be understood that the above "start_time" and "end_time" may represent the start time and end time of this body temperature data collection respectively. The body temperature data described above by the body temperature data collection device may also contain more data items. Such as name, type, sensitivityLevel, validatePolicies, etc.
在另一种可能的实现方式中,由于体温数据为单点数据,体温数据采集设备可以仅用体温数据所包含字段的字段数据类型标识fieldType来唯一标识体温数据。即经过描述后的体温数据中可包含字段数据类型标识fieldType以及该字段的采样值,而不包含类型标识typeID。In another possible implementation manner, since the body temperature data is single-point data, the body temperature data acquisition device may only uniquely identify the body temperature data by using the field data type identifier fieldType of the fields contained in the body temperature data. That is, the described body temperature data may contain the field data type identifier fieldType and the sampled value of the field, but not the type identifier typeID.
例如,经过描述后的体温数据可以为:For example, the described body temperature data can be:
"fieldType":400011975"fieldType":400011975
"start_time":1626836477471"start_time": 1626836477471
"end_time":1626836477471"end_time": 1626836477471
"value":36.0"value":36.0
在数据采集设备描述的数据为多点数据的情况下,数据采集设备可以用数据的类型标识typeID来唯一标识该数据,并利用字段数据类型标识fieldType来标识该数据包含的不同字段。例如,血压数据为多点数据。按照数据字典的规则描述后的血压数据可以包含血压数据的类型标识typeID、采集的开始时间和结束时间、血压数据的字段舒张压的字段数据类型标识fieldType、字段舒张压的采样值、血压数据的字段收缩压的字段数据类型标识fieldType、字段收缩压的采样值。When the data described by the data collection device is multi-point data, the data collection device can use the data type identifier typeID to uniquely identify the data, and use the field data type identifier fieldType to identify different fields contained in the data. For example, blood pressure data is multi-point data. The blood pressure data described according to the rules of the data dictionary can include the type identifier typeID of the blood pressure data, the start time and end time of the collection, the field data type identifier fieldType of the diastolic pressure field of the blood pressure data, the sampling value of the diastolic pressure field, and the blood pressure data The field data type of the field systolic pressure identifies fieldType, and the sampling value of the field systolic pressure.
(5)数据显示设备利用体温数据的配置文件识别体温数据采集设备上报的体温数据,并对体温数据进行计算和展示等处理。(5) The data display device uses the configuration file of the body temperature data to identify the body temperature data reported by the body temperature data collection device, and calculates and displays the body temperature data.
这里以数据显示设备为电子设备100,数据显示设备中用于管理体温数据采集设备的设备管理APP为运动健康APP为例进行说明。Here, the data display device is the electronic device 100, and the device management APP used to manage the body temperature data collection device in the data display device is a sports health APP as an example for illustration.
电子设备100存储有上述体温数据的配置文件。当电子设备100接收到来自体温数据采集设备上报的体温数据,电子设备100中的运动健康APP可以利用体温数据的配置文件来识别体温数据中的具体内容。The electronic device 100 stores the configuration file of the above body temperature data. When the electronic device 100 receives the body temperature data reported by the body temperature data collection device, the sports health APP in the electronic device 100 can use the configuration file of the body temperature data to identify the specific content of the body temperature data.
例如,根据接收到的数据中的数据项"fieldType":400011975,运动健康APP可以识别出该数据为体温数据。其中,运动健康APP可以根据体温数据的配置文件确定出fieldType为400011975的数据为字段名称为bodyTemperature的体温数据。For example, according to the data item "fieldType": 400011975 in the received data, the Sports Health APP can recognize that the data is body temperature data. Among them, the sports health APP can determine that the data whose fieldType is 400011975 is the body temperature data whose field name is bodyTemperature according to the configuration file of body temperature data.
在一些实施例中,数据采集设备向数据显示设备上报自己采集的数据时,还可以将自己的设备标识上报给数据显示设备。每一种型号的数据采集设备所具有的设备标识是全局唯一的。例如,型号A的体温数据采集设备所具有的设备标识为71。型号B的体温数据采集设备所具有的设备标识为72。型号C的血压数据采集设备所具有的设备标识为73。本申请实施例对数据采集设备所具有的设备标识的格式不作限定。In some embodiments, when the data collection device reports the data collected by itself to the data display device, it may also report its own device identification to the data display device. The device identification of each type of data acquisition device is globally unique. For example, the body temperature data collection device of model A has a device identifier of 71 . The device identifier of the body temperature data collection device of model B is 72 . The device identifier of the model C blood pressure data acquisition device is 73 . The embodiment of the present application does not limit the format of the device identification of the data collection device.
运动健康APP识别出体温数据中的具体内容后,可以在电子设备100中的数据存储模块中存储体温数据。示例性的,体温数据在电子设备100的数据存储模块中的存储格式可以参考下述表3所示的内容:After the sports health APP recognizes the specific content in the body temperature data, it can store the body temperature data in the data storage module in the electronic device 100 . Exemplarily, the storage format of the body temperature data in the data storage module of the electronic device 100 can refer to the content shown in the following Table 3:
IdID start_timestart_time end_timeend_time fieldTypefieldType valuevalue device_iddevice_id sync_statussync_status
11 16268364774711626836477471 16268364774711626836477471 400011975400011975 36.036.0 7171 00
22 16268364774811626836477481 16268364774811626836477481 400011975400011975 36.236.2 7171 00
表3table 3
其中,表3中的每一行可以表示一条体温数据的记录。一条体温数据的记录可以表示一个体温数据采集设备在一个时间采集到的体温数据。表3中的Id可以表示所在行对应的记录的序号。表3中的device_id可以表示数据采集设备的设备标识。表3中的sync_status可以表示体温数据的云同步状态。例如,sync_status为0可以表示体温数据还未上传到云服务器。sync_status为1可以表示体温数据已上传到服务器。不限于表3所列举的内容,体温数据的存储格式还可以包含更多或更少的内容。例如,数据名称、数据单位、数据敏感等级等。Wherein, each row in Table 3 may represent a record of body temperature data. A record of body temperature data may represent body temperature data collected by a body temperature data collection device at a time. The Id in Table 3 may represent the sequence number of the record corresponding to the row. The device_id in Table 3 may represent the device identifier of the data acquisition device. The sync_status in Table 3 can indicate the cloud synchronization status of body temperature data. For example, a sync_status of 0 may indicate that the body temperature data has not been uploaded to the cloud server. A sync_status of 1 indicates that the body temperature data has been uploaded to the server. Not limited to the contents listed in Table 3, the storage format of body temperature data may also include more or less contents. For example, data name, data unit, data sensitivity level, etc.
由前述实施例可知,所有按照数据字典的规则进行元数据定义的数据均具有全局唯一的类型标识typeID,且具有相同或相近数据结构。那么,运动健康APP可以通过同一个数据识别模块对所有按照数据字典的规则上报的数据进行识别。用于实现上述数据识别模块的代码即为用于识别上述按照数据字典的规则上报的数据的程序。上述数据识别模块可以相当于数据显示设备与数据采集设备之间进行数据交互的接口。当新增一种类型的数据,且新增类型的数据按照数据字典的规则上报,则该新增类型的数据在上报过程中可以复用已有类型的数据的数据交互接口。开发人员仅需要按照数据字典的规则定义新增类型的数据的配置文件,而无需另外开发适用于新增类型的数据的数据交互接口。这可以减少新增类型的数据接入数据显示设备时开发人员的工作量,提高数据接入的效率。It can be known from the foregoing embodiments that all data whose metadata is defined according to the rules of the data dictionary have a globally unique type identifier typeID and have the same or similar data structure. Then, the Sports Health APP can identify all the data reported according to the rules of the data dictionary through the same data identification module. The code used to implement the above data identification module is the program used to identify the above data reported according to the rules of the data dictionary. The above-mentioned data identification module may be equivalent to an interface for data interaction between the data display device and the data collection device. When a new type of data is added, and the new type of data is reported according to the rules of the data dictionary, the new type of data can reuse the data interaction interface of the existing type of data during the reporting process. Developers only need to define configuration files for new types of data according to the rules of the data dictionary, without additionally developing data interaction interfaces suitable for new types of data. This can reduce the workload of developers when new types of data are connected to the data display device, and improve the efficiency of data connection.
在一些实施例中,体温数据的配置文件中包含数据项校验规则集validatePolicies。运动健康APP可以根据validatePolicies对数据存储模块中存储的体温数据进行校验,来判断体温数据是否存在异常。In some embodiments, the body temperature data configuration file includes a data item validation rule set validatePolicies. The Sports Health APP can verify the body temperature data stored in the data storage module according to validatePolicies to determine whether there is any abnormality in the body temperature data.
在一些实施例中,运动健康APP可以根据体温数据的配置文件来确定对体温数据进行数据融合和数据统计。In some embodiments, the sports health APP can determine to perform data fusion and data statistics on the body temperature data according to the configuration file of the body temperature data.
示例性的,当判断出数据存储模块中存储的多个体温数据存在多源冲突,运动健康APP可以利用体温数据的配置文件中包含的数据项多源融合策略mergePolicy对存在多源冲突的多个体温数据进行数据融合。上述存在多源冲突的多个体温数据可以包含多个型号的体温数据采集设备采集在同一时间采集的体温数据。Exemplarily, when it is determined that multiple body temperature data stored in the data storage module have multi-source conflicts, the sports health APP can use the data item multi-source fusion policy mergePolicy contained in the body temperature data configuration file to Body temperature data for data fusion. The aforementioned multiple body temperature data with multi-source conflicts may include body temperature data collected at the same time by multiple models of body temperature data collection devices.
由体温数据的配置文件可知,mergePolicy为“SOURCE_PRIORITY”,即根据数据采集设备的优先级来确定融合后的数据。体温数据的配置文件中包含数据项设备优先级dataSourcePriority。运动健康APP可以根据dataSourcePriority,在存在多源冲突的多个体温数据中选择设备优先级最高的体温数据采集设备采集的体温数据作为融合后的数据。例如,dataSourcePriority为[1,129,384,57,72,71]。该dataSourcePriority确定的设备优先级为根据数据采集设备的型号确定的优先级。数组[1,129,384,57,72,71]中的设备标识可以标识一个具体型号的数据采集设备。其中,设备标识为1的体温数据采集设备的优先级最高。设备标识为71的体温数据采集设备的优先级最低。若上述存在多源冲突的多个体温数据来自于设备标识为129的体温数据采集设备和设备标识为71的体温数据采集的数据。那么,运动健康APP可以选择设备标识为129的体温数据采集设备采集的体温数据为融合后的体温数据。It can be seen from the configuration file of body temperature data that the mergePolicy is "SOURCE_PRIORITY", that is, the merged data is determined according to the priority of the data acquisition device. The configuration file of body temperature data contains the data item device priority dataSourcePriority. The Sports Health APP can select the body temperature data collected by the body temperature data collection device with the highest device priority among multiple body temperature data with multi-source conflicts as the fused data according to the dataSourcePriority. For example, dataSourcePriority is [1,129,384,57,72,71]. The device priority determined by the dataSourcePriority is the priority determined according to the model of the data collection device. The device ID in the array [1,129,384,57,72,71] can identify a specific model of data acquisition device. Among them, the body temperature data collection device whose device ID is 1 has the highest priority. The body temperature data collection device whose device ID is 71 has the lowest priority. If the above-mentioned multiple body temperature data with multi-source conflicts come from the body temperature data collection device whose device ID is 129 and the body temperature data collection device whose device ID is 71 . Then, the Sports Health APP can select the body temperature data collected by the body temperature data collection device whose device ID is 129 as the fused body temperature data.
在一些实施例中,上述dataSourcePriority确定的设备优先级为根据体温数据采集设备的类别确定的优先级。dataSourcePriority的取值中可以包括设备类别标识。一个设备类别标识可以标识一种类别的体温数据采集设备。运动健康APP可以选择类别优先级最高的体温数据采集设备采集的体温数据作为融合后的体温数据。本申请实施例对设备类别标识的表示方法不作限定。例如,设备类别标识可以通过数字、字母等字符中的一种或多种进行表示。In some embodiments, the device priority determined by the above dataSourcePriority is the priority determined according to the type of body temperature data collection device. The value of dataSourcePriority may include the device class identifier. A device category identifier can identify a category of body temperature data collection equipment. The Sports Health APP can select the body temperature data collected by the body temperature data collection device with the highest category priority as the fused body temperature data. The embodiment of the present application does not limit the representation method of the device class identifier. For example, the device class identifier may be represented by one or more characters such as numbers and letters.
上述融合后的体温数据可用于进行数据统计、数据展示等处理。The above fused body temperature data can be used for data statistics, data display and other processing.
上述体温数据的配置文件中包含MAX、MIN、AVG和COUNT这四种统计策略。运动健康APP可以对一段时间内的体温数据进行上述四种统计策略对应的统计处理,并将经过统计处理的统计体温数据存储在电子设备100中的数据存储模块。示例性的,统计体温数据在电子设备100中的数据存储模块中的存储格式可以参考下述表4所示的内容:The configuration file of the above body temperature data contains four statistical strategies of MAX, MIN, AVG and COUNT. The sports health APP can perform statistical processing corresponding to the above four statistical strategies on the body temperature data within a period of time, and store the statistically processed statistical body temperature data in the data storage module in the electronic device 100 . Exemplarily, the storage format of the statistical body temperature data in the data storage module of the electronic device 100 can refer to the content shown in the following Table 4:
IdID datedate fieldTypefieldType statTypestatType valuevalue sync_statussync_status
11 2021072220210722 400011975400011975 400011740400011740 37.037.0 00
22 2021072220210722 400011975400011975 400011854400011854 38.038.0 00
33 2021072220210722 400011975400011975 400011708400011708 36.036.0 00
44 2021072220210722 400011975400011975 400011375400011375 2.02.0 00
表4Table 4
其中,表4中的每一行可以表示一条统计体温数据的记录。一条统计体温数据的记录可以表示一段时间,例如一天内,运动健康APP对接收到的体温数据按照一种统计策略进行数据统计得到的统计值。表4中的Id可以表示所在行对应的记录的需要。表4中的date可以表示用于进行数据统计的体温数据采集时间所在的时间段。例如,date为20210722可以表示对采集时间在2021年7月22日内的体温数据进行数据统计。表4中的其它内容可以参考前述实施例的介绍。Wherein, each row in Table 4 may represent a record of statistical body temperature data. A record of statistical body temperature data can represent a period of time, for example, within a day, the sports health APP will collect statistical data on the received body temperature data according to a statistical strategy. The Id in Table 4 may indicate the need of the record corresponding to the row. The date in Table 4 may indicate the time period of the body temperature data collection time for data statistics. For example, if the date is 20210722, it can mean that the body temperature data collected within July 22, 2021 will be counted. For other contents in Table 4, reference may be made to the introduction of the foregoing embodiments.
在一些实施例中,运动健康APP可以体温数据的配置文件来确定体温数据的显示策略。例如,在体温数据的配置文件中,数据项显示策略displayPolicies为[1,Top],可以表示体温数据需要以折线图的形式进行显示,并显示在用户界面的顶部。运动健康APP可以调用绘制折线图的代码来绘制一段时间内体温数据的折线图,并将该折线图显示在用户界面的顶部。可选的,运动健康APP还可以显示统计体温数据(如最大值、最小值等)。In some embodiments, the sports health APP can determine the display strategy of the body temperature data according to the configuration file of the body temperature data. For example, in the body temperature data configuration file, the data item display policy displayPolicies is [1, Top], which can indicate that the body temperature data needs to be displayed in the form of a line chart and displayed at the top of the user interface. The Sports Health APP can call the code for drawing a line graph to draw a line graph of body temperature data over a period of time, and display the line graph on the top of the user interface. Optionally, the sports health APP can also display statistical body temperature data (such as maximum value, minimum value, etc.).
图5A~图5C示例性示出了电子设备100展示体温数据以及统计体温数据的场景示意图。FIG. 5A to FIG. 5C exemplarily show schematic diagrams of scenarios in which the electronic device 100 displays body temperature data and collects body temperature data.
如图5A所示,电子设备100可以显示用户界面510。用户界面510显示了一个放置有应用图标的页面。该页面可包括多个应用图标。例如,智慧生活应用图标、运动健康应用图标 511、YY运动应用图标512、ZZ健康用图标513。响应于作用在上述应用图标上的用户操作,例如触摸操作,电子设备100可以开启与该应用图标对应的应用程序。可以理解的,运动健康应用图标511对应的运动健康APP可以是用于管理体温数据采集设备的设备管理APP。YY运动应用图标对应的YY运动APP和ZZ健康应用图标513对应的ZZ健康APP均可以是三方APP。响应于作用在运动健康应用图标511的用户操作,电子设备100可以显示图5B所示的用户界面520。As shown in FIG. 5A , the electronic device 100 may display a user interface 510 . User interface 510 displays a page on which application icons are placed. The page may include multiple application icons. For example, smart life application icons, sports and health application icons 511, YY sports application icons 512, and ZZ health application icons 513. In response to a user operation, such as a touch operation, on the above-mentioned application icon, the electronic device 100 may start an application program corresponding to the application icon. It can be understood that the sports and health APP corresponding to the sports and health application icon 511 may be a device management APP for managing body temperature data collection devices. Both the YY Sports APP corresponding to the YY Sports application icon and the ZZ Health APP corresponding to the ZZ Health application icon 513 may be three-party APPs. In response to user operations acting on the sports and health application icon 511, the electronic device 100 may display a user interface 520 shown in FIG. 5B.
如图5B所示,用户界面520中可包含有多个卡片。一个卡片可用于呈现一种类型的数据。例如,心率卡片521可用于呈现心率数据。体温卡片522可用于呈现体温数据。压力卡片523可用于呈现压力数据。运动记录卡片524可用于呈现运动记录数据。响应于作用在一个卡片上的用户操作,例如触摸操作,电子设备100可以显示与这一个卡片对应的数据更详细的内容。例如,该数据在一段时间内的采样值、该数据在不同统计策略下的统计数据等。响应于作用在体温卡片522的用户操作,电子设备100可以显示图5C所示的用户界面530。As shown in FIG. 5B , the user interface 520 may contain multiple cards. A card can be used to present one type of data. For example, heart rate card 521 may be used to present heart rate data. Body temperature card 522 may be used to present body temperature data. Pressure cards 523 may be used to present pressure data. Athletic log card 524 may be used to present athletic log data. In response to a user operation, such as a touch operation, on a card, the electronic device 100 may display more detailed content of the data corresponding to the card. For example, the sampling value of the data within a period of time, the statistical data of the data under different statistical strategies, etc. In response to user operations acting on the body temperature card 522, the electronic device 100 may display the user interface 530 shown in FIG. 5C.
如图5C所示,用户界面530可以包含时间选项区域531、体温数据显示区域532、体温均值卡片533和体温范围卡片534。其中,时间选项区域531中可包含多个时间选项。当一个时间选项处于选中状态,体温数据显示区域532中可利用折线图的形式显示这一个时间选项对应时间段内的体温数据。例如,当指示1月15日的时间选项处于选中状态,体温数据显示区域532中可显示有体温数据采集设备在1月15日采集的所有体温数据的折线图。当指示1月的时间选项处于选中状态,体温数据显示区域532中可显示有体温数据采集设备在1月采集的所有体温数据的折线图。这样,用户可以通过时间选项区域531中不同的时间选项来查看不同时间段内的体温数据。As shown in FIG. 5C , the user interface 530 may include a time option area 531 , a body temperature data display area 532 , a body temperature mean card 533 and a body temperature range card 534 . Wherein, the time option area 531 may contain multiple time options. When a time option is selected, body temperature data in the time period corresponding to this time option can be displayed in the form of a line graph in the body temperature data display area 532 . For example, when the time option indicating January 15 is selected, the body temperature data display area 532 may display a line chart of all body temperature data collected by the body temperature data collection device on January 15. When the time option indicating January is selected, the body temperature data display area 532 may display a line chart of all body temperature data collected by the body temperature data collection device in January. In this way, the user can view body temperature data in different time periods through different time options in the time option area 531 .
体温均值卡片533可用于显示一段时间(如一天内)体温数据的均值。The average body temperature card 533 can be used to display the average value of body temperature data for a period of time (eg within a day).
体温范围卡片534可用于显示一段时间(如一天内)体温数据波动的范围。一段时间内体温数据波动的范围可以由这一段时间内体温数据的最小值和最大值确定。The body temperature range card 534 can be used to display the range of body temperature data fluctuations for a period of time (eg, within a day). The range of body temperature data fluctuations within a period of time can be determined by the minimum and maximum values of body temperature data within this period of time.
上述图5A~图5C所示的用户界面仅为本申请实施例对数据显示设备展示体温数据的示例性说明,不应对本申请构成限定。The above user interfaces shown in FIG. 5A to FIG. 5C are only exemplary illustrations of the data display device displaying body temperature data in the embodiment of the present application, and should not be construed as limiting the present application.
若上述心率数据、体温数据、压力数据、运动记录数据均是按照数据字典的规则进行元数据定义的,上述体温数据作为新增类型的数据,上述心率数据、压力数据、运动记录数据作为已有类型的数据,那么,运动健康APP中对上述体温数据进行数据融合、数据统计(如图5C所示的体温均值、体温范围)和数据展示(如图5C所示体温数据显示区域532终中的折线图)的代码均可以复用运动健康APP对已有类型的数据进行处理的代码。If the above-mentioned heart rate data, body temperature data, pressure data, and exercise record data are defined as metadata according to the rules of the data dictionary, the above-mentioned body temperature data is regarded as a new type of data, and the above-mentioned heart rate data, pressure data, and exercise record data are used as existing type of data, then, in the Sports Health APP, data fusion, data statistics (average body temperature, body temperature range as shown in Figure 5C) and data display (body temperature data display area 532 in the final body temperature data display area 532 as shown in Figure 5C) are performed in the Sports Health APP. Line chart) codes can reuse the codes of Sports Health APP to process existing types of data.
由上述实施例可知,在不同类型的数据均按照数据字典的规则进行元数据定义的情况下,运动健康APP中用于对这些不同类型的数据进行数据融合(如多源融合策略)的代码是可以复用的,对这些不同类型的数据进行数据统计(如统计策略)的代码是可以复用的,对这些不同类型的数据进行数据展示(如折线图展示数据)的代码也是可以复用的。当新增一种类型的数据,且新增类型的数据是按照数据字典的规则进行元数据定义的,则对该新增类型的数据进行数据融合、数据统计和数据展示的代码均可以复用运动健康APP中对已有类型的数据进行处理的代码。开发人员可以仅需将运动健康APP中对已有类型的数据进行处理的代码中用于标识数据的部分(如类型标识typeID等)修改为标识该新增类型数据的内容,而无需修改用于处理数据的代码逻辑,开发适用于处理该新增类型的数据的代码。这可以减少新增类型的数据接入数据显示设备时开发人员的工作量,提高数据接入的效率。It can be seen from the above-mentioned embodiments that when different types of data are defined as metadata according to the rules of the data dictionary, the code for data fusion (such as a multi-source fusion strategy) for these different types of data in the Sports Health APP is Reusable, the code for data statistics (such as statistical strategies) of these different types of data is reusable, and the code for data display of these different types of data (such as line chart display data) is also reusable . When a new type of data is added, and the new type of data is defined as metadata according to the rules of the data dictionary, the code for data fusion, data statistics, and data display of the newly added type of data can be reused Code for processing existing types of data in the Sports Health APP. Developers may only need to modify the part of the code used to identify data (such as the type identifier typeID, etc.) in the code that processes existing types of data in the sports health APP to identify the content of the newly added type of data, without modifying the Code logic for processing data, and develop code suitable for processing the newly added type of data. This can reduce the workload of developers when new types of data are connected to the data display device, and improve the efficiency of data connection.
(6)数据显示设备将体温数据按照体温数据的数据类型定义规则发送给云服务器。(6) The data display device sends the body temperature data to the cloud server according to the data type definition rules of the body temperature data.
在一些实施例中,数据显示设备可以将数据存储模块中未进行云同步的体温数据发送给云服务器。该云服务器可以是用于管理体温数据采集设备的设备管理APP的应用服务器。云服务器可以根据体温数据的数据类型定义规则来识别接收到的数据属于体温数据,以及体温数据中的具体内容。In some embodiments, the data display device can send the body temperature data in the data storage module that has not been synchronized to the cloud to the cloud server. The cloud server may be an application server of a device management APP for managing body temperature data collection devices. The cloud server can identify the received data as body temperature data and specific content in the body temperature data according to the data type definition rules of the body temperature data.
其中,在接收到体温数据采集设备上报的体温数据后,数据显示设备可以将体温数据的采样值以及按照体温数据的配置文件识别出来的体温数据的名称关联后,发送给云服务器。这样,云服务器可以直接存储接收到的体温数据,而不用根据体温数据的数据类型定义规则来识别接收到的数据是否属于体温数据后再进行存储。Wherein, after receiving the body temperature data reported by the body temperature data acquisition device, the data display device can correlate the sampled value of the body temperature data with the name of the body temperature data identified according to the configuration file of the body temperature data, and then send it to the cloud server. In this way, the cloud server can directly store the received body temperature data, instead of identifying whether the received data belongs to body temperature data according to the data type definition rules of the body temperature data before storing it.
在一些实施例中,数据显示设备还可以从云服务器下载体温数据。在数据显示设备卸载设备管理APP又重新下载该设备管理APP的情况下,数据显示设备中可能仅存储有部分体温数据。那么,数据显示设备可以从云服务器下载云服务器中有,但数据显示设备中没有的体温数据。In some embodiments, the data display device can also download the body temperature data from the cloud server. In the case where the data shows that the device uninstalls the device management APP and then downloads the device management APP again, the data shows that only part of the body temperature data may be stored in the device. Then, the data shows that the device can download the temperature data that is in the cloud server from the cloud server, but the data shows that the device does not have body temperature data.
参考前述按照数据字典的规则进行元数据定义的不同类型的数据由数据采集设备接入数据显示设备的介绍,按照数据字典的规则进行元数据定义的不同类型由数据显示设备接入云服务器时,可以共用一个数据上传的交互接口,这些数据从云服务器下载至数据显示设备时,可以共用一个数据下载的交互接口。这样,在有新增类型的数据产生的情况下,开发人员可以不用每次都单独开发适用于数据显示设备与云服务器之间传输该新增类型的数据的交互接口。这可以减少新增类型的数据接入云服务器时开发人员的工作量,提高数据接入的效率。Refer to the introduction of different types of data defined by metadata according to the rules of the data dictionary connected to the data display device by the data acquisition device. When different types of data defined by the metadata according to the rules of the data dictionary are connected to the cloud server by the data display device, An interactive interface for data upload can be shared, and when the data is downloaded from the cloud server to the data display device, an interactive interface for data download can be shared. In this way, when a new type of data is generated, the developer does not need to separately develop an interactive interface suitable for transmitting the new type of data between the data display device and the cloud server every time. This can reduce the workload of developers when adding new types of data to the cloud server, and improve the efficiency of data access.
(7)数据显示设备将体温数据按照体温数据的数据类型定义规则开放给三方APP。(7) The data display device opens the body temperature data to the third-party APP according to the data type definition rules of the body temperature data.
在一些实施例中,三方APP可以向数据显示设备中用于管理体温数据采集设备的设备管理APP请求获取体温数据的开放权限。在请求到获取体温数据的开放权限的情况下,设备管理APP可以为三方APP提供体温数据的开放接口。其中,设备管理APP可以通过该体温数据的开放接口将体温数据开放给三方APP。其中,开放给三方APP的体温数据可以是按照体温数据的数据类型定义规则进行描述的。三方APP可以根据体温数据的数据类型定义规则来识别获取到的数据属于体温数据,以及体温数据的具体内容。可选的,数据显示设备也可以将体温数据的配置文件中体温数据的名称与体温数据采样值关联后,开放给三方APP。这样,三方APP也可以不用根据体温数据的配置文件来识别获取到的数据是否属于体温数据。In some embodiments, the three-party APP may request the open permission to acquire the body temperature data from the device management APP in the data display device for managing the body temperature data collection device. In the case of requesting open permission to obtain body temperature data, the device management APP can provide an open interface for body temperature data for the third-party APP. Among them, the device management APP can open the body temperature data to the third-party APP through the open interface of the body temperature data. Among them, the body temperature data open to the third-party APP can be described according to the data type definition rules of body temperature data. The three-party APP can identify the acquired data as body temperature data and the specific content of the body temperature data according to the data type definition rules of body temperature data. Optionally, the data display device may also associate the name of the body temperature data in the configuration file of the body temperature data with the sampling value of the body temperature data, and open it to third-party APPs. In this way, the third-party APP does not need to identify whether the acquired data belongs to the body temperature data according to the configuration file of the body temperature data.
在一些实施例中,三方APP中可包含不同类型的数据的数据类型定义规则。其中,上述不同类型的数据可以是按照数据字典的规则进行元数据定义的。那么,三方APP中用于识别上述不同类型的数据的代码可以复用、用于对上述不同类型的数据进行处理的代码也可以复用。这样,在由新增类型的数据产生的情况下,用于识别该新增类型的数据的代码、用于对该新增类型的数据进行处理的代码可以复用三方APP中与已有类型的数据对应的代码。这可以减少新增类型的数据接入三方APP时三方APP的开发人员的工作量,提高数据接入的效率。In some embodiments, the three-party APP may contain data type definition rules for different types of data. Wherein, the above-mentioned different types of data may be defined as metadata according to the rules of the data dictionary. Then, the codes for identifying the above-mentioned different types of data in the three-party APP can be reused, and the codes for processing the above-mentioned different types of data can also be reused. In this way, in the case of a newly added type of data, the code used to identify the newly added type of data and the code used to process the newly added type of data can be reused in the three-party APP and the existing type The code corresponding to the data. This can reduce the workload of the developer of the third-party APP when new types of data are connected to the third-party APP, and improve the efficiency of data access.
下面基于上述体温数据的处理过程,介绍本申请实施例提供的另一种通信系统60。Another communication system 60 provided by the embodiment of the present application will be introduced below based on the above processing process of body temperature data.
如图6所示,通信系统60可以包含体温数据采集设备610、电子设备100、云服务器300。其中:As shown in FIG. 6 , the communication system 60 may include a body temperature data collection device 610 , an electronic device 100 , and a cloud server 300 . in:
体温数据采集设备610可以包含体温数据采集模块611和数据上报模块612。体温数据采集模块611可用于采集体温数据,并将体温数据发送给数据上报模块612。数据上报模块612中写入有体温数据的配置文件中的数据类型定义规则。数据上报模块612可以按照数据字典的规则向电子设备100中的运动健康APP。The body temperature data collection device 610 may include a body temperature data collection module 611 and a data reporting module 612 . The body temperature data collection module 611 can be used to collect body temperature data and send the body temperature data to the data reporting module 612 . In the data reporting module 612, the data type definition rules in the configuration file with body temperature data are written. The data reporting module 612 can report to the sports health APP in the electronic device 100 according to the rules of the data dictionary.
其中,数据上报模块612按照数据字典的规则上报体温数据的过程可以为,按照体温数据的配置文件中的数据类型定义规则对体温数据进行描述,并发送经过描述的体温数据的过程。Wherein, the process of reporting the body temperature data by the data reporting module 612 according to the rules of the data dictionary may be a process of describing the body temperature data according to the data type definition rules in the configuration file of the body temperature data, and sending the described body temperature data.
电子设备100中可包含运动健康APP和三方APP。上述运动健康APP可以为用于管理体温数据采集设备610的设备管理APP。运动健康APP中可包含数据计算模块621、数据存储模块622、数据展示模块623、数据开放模块624和数据字典625。The electronic device 100 may include sports and health APPs and three-party APPs. The sports health APP mentioned above may be a device management APP for managing the body temperature data collection device 610 . The sports health APP may include a data calculation module 621 , a data storage module 622 , a data presentation module 623 , a data opening module 624 and a data dictionary 625 .
数据字典625中可包含体温数据的配置文件。运动健康APP可以利用数据字典625中体温数据的配置文件来识别上述体温数据采集设备610按照数据字典的规则上报的体温数据。The data dictionary 625 may contain configuration files of body temperature data. The sports health APP can use the body temperature data configuration file in the data dictionary 625 to identify the body temperature data reported by the body temperature data collection device 610 according to the rules of the data dictionary.
数据计算模块621可以根据上述体温数据的配置文件对体温数据进行数据融合、数据统计等计算处理。The data calculation module 621 can perform calculation processing such as data fusion and data statistics on the body temperature data according to the configuration file of the body temperature data.
数据存储模块622可以存储体温数据。体温数据在数据存储模块622中的存储格式可以参考前述实施例的介绍。The data storage module 622 can store body temperature data. For the storage format of the body temperature data in the data storage module 622, reference may be made to the introduction of the foregoing embodiments.
数据展示模块623可用于展示体温数据的多个采样值以及体温数据经过数据统计得到的统计值等。在一些实施例中,被展示的体温数据可以是经过数据计算模块621进行数据融合得到的数据。The data display module 623 can be used to display multiple sampled values of body temperature data and statistical values of body temperature data obtained through data statistics. In some embodiments, the displayed body temperature data may be data obtained through data fusion by the data calculation module 621 .
上述数据开放模块624可用于为三方APP提供体温数据的开放接口。The above data open module 624 can be used to provide an open interface for body temperature data for three-party APPs.
由前述实施例可知,所有按照数据字典的规则进行元数据定义的数据均具有全局唯一的类型标识typeID,且具有相同或相近数据结构。那么,不限于上述体温数据,运动健康APP还可以通过上述数据计算模块621、数据存储模块622、数据展示模块623和数据开放模块624来对其它按照数据字典的规则进行元数据定义的数据进行相应的管理。即述数据计算模块621、数据存储模块622、数据展示模块623和数据开放模块624可以复用。当新增一种类型的数据,且新增类型的数据按照数据字典的规则上报,开发人员可不用另外开发适用于管理该新增类型的数据的各个模块。It can be known from the foregoing embodiments that all data whose metadata is defined according to the rules of the data dictionary have a globally unique type identifier typeID and have the same or similar data structure. Then, not limited to the above-mentioned body temperature data, the sports health APP can also use the above-mentioned data calculation module 621, data storage module 622, data display module 623 and data open module 624 to correspond to other data defined by metadata according to the rules of the data dictionary. management. That is, the data calculation module 621 , data storage module 622 , data display module 623 and data opening module 624 can be reused. When a new type of data is added, and the added type of data is reported according to the rules of the data dictionary, developers do not need to develop additional modules suitable for managing the added type of data.
运动健康APP可以通过数据开放模块624提供的体温数据开放接口,向有获取体温数据的权限的三方APP开放体温数据。上述开放给三方APP的体温数据可以是按照体温数据的数据类型定义规则进行描述后得到的。上述经过描述后的体温数据可以包含体温数据的类型标识和体温数据的采样值。三方APP可以根据体温数据的数据类型定义规则来识别获取到的体温数据,并利用该体温数据实现自己的需求业务。可选的,运动健康APP也可以将体温数据的配置文件中体温数据的名称与体温数据采样值关联后,开放给三方APP。这样,三方APP也可以不用根据体温数据的配置文件来识别获取到的数据是否属于体温数据。The sports health APP can open the body temperature data to third-party APPs that have the authority to obtain body temperature data through the body temperature data open interface provided by the data open module 624 . The above-mentioned body temperature data open to the third-party APP may be obtained after being described according to the data type definition rules of body temperature data. The body temperature data described above may include a type identifier of the body temperature data and a sampling value of the body temperature data. The third-party APP can identify the acquired body temperature data according to the data type definition rules of the body temperature data, and use the body temperature data to realize its own demand business. Optionally, the Sports Health APP can also associate the name of the body temperature data in the configuration file of the body temperature data with the sampling value of the body temperature data, and open it to third-party apps. In this way, the third-party APP does not need to identify whether the acquired data belongs to the body temperature data according to the configuration file of the body temperature data.
运动健康APP还可以对体温数据进行云同步处理。其中,运动健康APP可以按照体温数据的数据类型定义规则进行描述,将经过描述的体温数据发送给云服务器300。上述经过描述的体温数据可以包含体温数据的类型标识和体温数据的采样值。云服务器300可以根据体温数据的数据类型定义规则来识别接收到的体温数据,并进行存储。可选的,运动健康APP也可以将体温数据的采样值以及按照体温数据的配置文件识别出来的体温数据的名称关联后,发送给云服务器。这样,云服务器可以直接存储接收到的体温数据,而不用根据体温数据的数据类型定义规则来识别接收到的数据是否属于体温数据后再进行存储。The Sports Health APP can also perform cloud synchronization on body temperature data. Wherein, the sports health APP can describe according to the data type definition rules of the body temperature data, and send the described body temperature data to the cloud server 300 . The body temperature data described above may include a type identifier of the body temperature data and a sampling value of the body temperature data. The cloud server 300 can identify and store the received body temperature data according to the data type definition rules of the body temperature data. Optionally, the Sports Health APP can also associate the sampled value of the body temperature data with the name of the body temperature data identified according to the configuration file of the body temperature data, and then send it to the cloud server. In this way, the cloud server can directly store the received body temperature data, instead of identifying whether the received data belongs to body temperature data according to the data type definition rules of the body temperature data before storing it.
可以看出,利用本申请实施例设计的数据字典的规则,在新增一种类型的数据的情况下,新增类型的数据接入数据显示设备、云服务器、三方APP,以及数据显示设备对该新增类型的数据进行分析和显示等处理数据的代码可以复用用于处理已有类型的数据的代码。这可以减少开发人员的工作量,提高数据接入的效率。It can be seen that using the rules of the data dictionary designed in the embodiment of the present application, in the case of adding a type of data, the newly added type of data is connected to the data display device, cloud server, third-party APP, and the data display device. Codes for processing data of the newly added type such as analysis and display may reuse codes for processing existing types of data. This can reduce the workload of developers and improve the efficiency of data access.
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。As mentioned above, the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still understand the foregoing The technical solutions described in each embodiment are modified, or some of the technical features are replaced equivalently; and these modifications or replacements do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the various embodiments of the application.

Claims (21)

  1. 一种数据处理方法,其特征在于,所述方法包括:A data processing method, characterized in that the method comprises:
    第一设备接收到来自第一数据采集设备的第一数据,所述第一数据包含第一数据标识和第一类型数据的第一采样值,且符合第一配置文件的规则,所述第一配置文件是按照第一规则定义的,所述第一配置文件中包含所述第一数据标识,所述第一数据标识用于标识所述第一类型数据,所述第一数据标识在按照所述第一规则定义的数据标识中具有唯一性;The first device receives the first data from the first data acquisition device, the first data includes the first data identifier and the first sampling value of the first type of data, and conforms to the rules of the first configuration file, the first The configuration file is defined according to the first rule, the first configuration file contains the first data identifier, the first data identifier is used to identify the first type of data, and the first data identifier is used according to the uniqueness among the data identifiers defined by the first rule above;
    所述第一设备根据所述第一数据标识和所述第一配置文件,识别出所述第一数据属于所述第一类型数据。The first device identifies, according to the first data identifier and the first configuration file, that the first data belongs to the first type of data.
  2. 根据权利要求1所述的方法,其特征在于,所述第一规则为数据字典的规则。The method according to claim 1, wherein the first rule is a rule of a data dictionary.
  3. 根据权利要求1或2所述的方法,所述方法还包括:The method according to claim 1 or 2, said method further comprising:
    所述第一设备接收到来自第二数据采集设备的第二数据,所述第二数据包含第二数据标识和第二类型数据的第二采样值,且符合第二配置文件的规则,所述第二配置文件是按照所述第一规则定义的,所述第二配置文件中包含所述第二数据标识,所述第二数据标识用于标识所述第二类型数据,所述第二数据标识在按照所述第一规则定义的数据标识中具有唯一性;The first device receives the second data from the second data collection device, the second data includes a second data identifier and a second sampling value of the second type of data, and conforms to the rules of the second configuration file, the The second configuration file is defined according to the first rule, the second configuration file contains the second data identifier, the second data identifier is used to identify the second type of data, and the second data The identifier is unique among the data identifiers defined according to the first rule;
    所述第一设备根据所述第二数据标识和所述第二配置文件,识别出所述第二数据属于所述第二类型数据;其中,所述第一设备中用于识别所述第一数据的程序和用于识别所述第二数据的程序相同。The first device identifies that the second data belongs to the second type of data according to the second data identifier and the second configuration file; wherein, the first device is used to identify the first The procedure for the data is the same as for identifying said second data.
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,所述第一采样值是所述第一数据采集设备在第一时间采集的,所述方法还包括:The method according to any one of claims 1-3, wherein the first sampling value is collected by the first data acquisition device at the first time, and the method further comprises:
    所述第一设备接收到所述第一类型数据的M个采样值,所述M个采样值分别是M个数据采集设备在所述第一时间采集的;所述M为正整数;The first device receives M sample values of the first type of data, and the M sample values are respectively collected by M data collection devices at the first time; the M is a positive integer;
    所述第一设备从所述第一配置文件确定出所述第一类型数据的数据融合策略为第一融合策略,并按照所述第一融合策略从所述第一采样值和所述M个采样值中确定出一个采样值,作为所述第一类型数据在所述第一时间的采样值;所述第一融合策略为以下任意一项:取最大值、取最小值、取存入所述第一设备的时间最早的值、取存入所述第一设备的时间最晚的值、取所述第一数据采集设备和所述M个数据采集设备中设备优先级最高的设备采集的采样值。The first device determines from the first configuration file that the data fusion strategy of the first type of data is a first fusion strategy, and according to the first fusion strategy, from the first sampled value and the M A sampling value is determined from the sampling values as the sampling value of the first type of data at the first time; the first fusion strategy is any of the following: take the maximum value, take the minimum value, take and store in the The earliest value of the time of the first device, the latest value stored in the first device, the value collected by the device with the highest priority among the first data collection device and the M data collection devices sample value.
  5. 根据权利要求1-4中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-4, wherein the method further comprises:
    所述第一设备从所述第一配置文件确定出所述第一类型数据的数据统计策略为第一统计策略,所述第一统计策略包含以下一项或多项:计算最大值、计算最小值、计算均值、求和、计算方差、计算采样值的数量、确定采集时间最晚的采样值;The first device determines from the first configuration file that the data statistics strategy of the first type of data is a first statistics strategy, and the first statistics strategy includes one or more of the following: calculating the maximum value, calculating the minimum value value, calculate the mean, sum, calculate the variance, calculate the number of sampled values, determine the sampled value with the latest collection time;
    所述第一设备按照所述第一统计策略对采集时间在第一时间段内所述第一类型数据的N个采样值进行数据统计,所述N为正整数。The first device performs data statistics on N sampling values of the first type of data within a first time period of collection time according to the first statistical strategy, where N is a positive integer.
  6. 根据权利要求1-5中任一项所述的方法,其特征在于,所述第一设备包含显示装置, 所述第一配置文件中包含第一类型数据的第一显示策略,所述第一显示策略包含以下一项或多项:第一显示形式、第一显示位置;所述方法还包括:The method according to any one of claims 1-5, wherein the first device includes a display device, the first configuration file includes a first display strategy for the first type of data, and the first The display strategy includes one or more of the following: the first display form, the first display position; the method also includes:
    所述第一设备通过所述显示装置,在第一用户界面上按照所述第一显示策略显示接收到的所述第一类型数据的采样值。The first device displays the received sampling value of the first type of data on the first user interface according to the first display strategy through the display device.
  7. 根据权利要求6所述的方法,其特征在于,所述第二配置文件中包含第二类型数据的第二显示策略,所述第二显示策略与所述第一显示策略相同;所述方法还包括:The method according to claim 6, wherein the second configuration file includes a second display strategy for the second type of data, and the second display strategy is the same as the first display strategy; the method further include:
    所述第一设备通过所述显示装置,在第二用户界面上按照所述第一显示策略显示接收到的所述第二类型数据的采样值;其中,用于使得所述第一类型数据的采样值按照所述第一显示策略显示的程序,与用于使得所述第二类型数据的采样值按照所述第一显示策略显示的程序相同。The first device displays the received sampling value of the second type of data on the second user interface according to the first display strategy through the display device; The procedure for displaying the sampled values according to the first display strategy is the same as the procedure for displaying the sampled values of the second type of data according to the first display strategy.
  8. 根据权利要求1-7中任一项所述的方法,其特征在于,所述第一配置文件包含所述第一类型数据的第一描述信息,所述方法还包括:The method according to any one of claims 1-7, wherein the first configuration file includes first description information of the first type of data, and the method further comprises:
    所述第一设备向云服务器发送第三数据,所述第三数据包含所述第一描述信息和所述第一类型数据的采样值。The first device sends third data to the cloud server, where the third data includes the first description information and a sampling value of the first type of data.
  9. 根据权利要求1-8中任一项所述的方法,其特征在于,所述第一设备中安装有第一应用程序,所述第一应用程序具有获取所述第一类型数据的权限,所述第一配置文件包含所述第一类型数据的第一描述信息,所述方法还包括:The method according to any one of claims 1-8, wherein a first application program is installed in the first device, and the first application program has permission to obtain the first type of data, so The first configuration file includes first description information of the first type of data, and the method further includes:
    所述第一设备响应于所述第一应用程序获取所述第一类型数据的请求,将所述第四数据提供给所述第一应用程序;所述第四数据包含所述第一描述信息和所述第一类型数据的采样值。The first device provides the fourth data to the first application in response to the first application's request to obtain the first type of data; the fourth data includes the first description information and the sampled value of the first type of data.
  10. 根据权利要求1-5中任一项所述的方法,其特征在于,所述第一设备为云服务器,所述方法还包括:The method according to any one of claims 1-5, wherein the first device is a cloud server, and the method further comprises:
    所述云服务器向数据显示设备发送第五数据,所述第五数据包含所述第一数据标识和所述第一类型数据的采样值。The cloud server sends fifth data to the data display device, where the fifth data includes the first data identifier and a sampling value of the first type of data.
  11. 根据权利要求1-10中任一项所述的方法,其特征在于,所述第一数据采集设备为以下任意一种设备:智能手表、智能手环、体脂秤、智能眼镜、体温计、血压计、心率监测设备。The method according to any one of claims 1-10, wherein the first data collection device is any of the following devices: smart watch, smart bracelet, body fat scale, smart glasses, thermometer, blood pressure Meter, heart rate monitoring equipment.
  12. 根据权利要求1-11中任一项所述的方法,其特征在于,所述第一类型数据为以下任意一种数据:步行数据、跑步数据、游泳数据、骑行数据、睡眠数据、体重数据、压力数据、心率数据、血压数据、体温数据、血氧数据、血糖数据。The method according to any one of claims 1-11, wherein the first type of data is any of the following data: walking data, running data, swimming data, cycling data, sleep data, body weight data , pressure data, heart rate data, blood pressure data, body temperature data, blood oxygen data, blood sugar data.
  13. 一种数据处理方法,其特征在于,所述方法包括:A data processing method, characterized in that the method comprises:
    第一数据采集设备获取第一数据,所述第一数据包含第一数据标识和第一类型数据的第一采样值,且符合第一配置文件的规则,所述第一配置文件是按照第一规则定义的,所述第一配置文件中包含所述第一数据标识,所述第一数据标识用于标识所述第一类型数据,所述 第一数据标识在按照所述第一规则定义的数据标识中具有唯一性;The first data acquisition device acquires the first data, the first data includes the first data identifier and the first sampling value of the first type of data, and conforms to the rules of the first configuration file, and the first configuration file is according to the first Defined by a rule, the first configuration file includes the first data identifier, the first data identifier is used to identify the first type of data, and the first data identifier is defined in accordance with the first rule Uniqueness in data identification;
    所述第一数据采集设备将所述第一数据发送给第一设备。The first data collection device sends the first data to the first device.
  14. 根据权利要求13所述的方法,其特征在于,所述第一规则为数据字典的规则。The method according to claim 13, wherein the first rule is a rule of a data dictionary.
  15. 根据权利要求13或14所述的方法,其特征在于,所述第一数据采集设备为以下任意一种设备:智能手表、智能手环、体脂秤、智能眼镜、体温计、血压计、心率监测设备。The method according to claim 13 or 14, wherein the first data collection device is any of the following devices: smart watch, smart bracelet, body fat scale, smart glasses, thermometer, blood pressure monitor, heart rate monitor equipment.
  16. 根据权利要求13-15中任一项所述的方法,其特征在于,所述第一类型数据为以下任意一种数据:步行数据、跑步数据、游泳数据、骑行数据、睡眠数据、体重数据、压力数据、心率数据、血压数据、体温数据、血氧数据、血糖数据。The method according to any one of claims 13-15, wherein the first type of data is any of the following data: walking data, running data, swimming data, riding data, sleep data, body weight data , pressure data, heart rate data, blood pressure data, body temperature data, blood oxygen data, blood sugar data.
  17. 一种通信系统,其特征在于,所述通信系统包括第一数据采集设备和数据显示设备,其中,A communication system, characterized in that the communication system includes a first data acquisition device and a data display device, wherein,
    所述第一数据采集设备,用于获取第一数据,并将所述第一数据发送给所述数据显示设备;所述第一数据包含第一数据标识和第一类型数据的第一采样值,且符合第一配置文件的规则,所述第一配置文件是按照第一规则定义的,所述第一配置文件中包含所述第一数据标识,所述第一数据标识用于标识所述第一类型数据,所述第一数据标识在按照所述第一规则定义的数据标识中具有唯一性;The first data collection device is configured to acquire first data and send the first data to the data display device; the first data includes a first data identifier and a first sampling value of a first type of data , and conform to the rules of the first configuration file, the first configuration file is defined according to the first rule, the first configuration file contains the first data identifier, and the first data identifier is used to identify the The first type of data, the first data identifier is unique among the data identifiers defined according to the first rule;
    所述数据显示设备,用于根据所述第一数据标识和所述第一配置文件,识别出所述第一数据属于所述第一类型数据。The data display device is configured to identify that the first data belongs to the first type of data according to the first data identifier and the first configuration file.
  18. 根据权利要求17所述的通信系统,其特征在于,所述通信系统还包括云服务器,所述第一配置文件包含所述第一类型数据的第一描述信息;The communication system according to claim 17, wherein the communication system further comprises a cloud server, and the first configuration file includes first description information of the first type of data;
    所述数据显示设备,还用于向所述云服务器发送第三数据,所述第三数据包含所述第一描述信息和所述第一类型数据的采样值;The data display device is further configured to send third data to the cloud server, where the third data includes the first description information and sampling values of the first type of data;
    所述云服务器,用于存储所述第三数据。The cloud server is used to store the third data.
  19. 一种设备,其特征在于,所述设备包括存储器和处理器,其中,所述存储器用于存储计算机程序,所述处理器用于调用所述计算机程序,使得所述设备执行权利要求1-12或权利要求13-16中任一项所述的方法。A device, characterized in that the device comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call the computer program, so that the device performs claims 1-12 or The method of any one of claims 13-16.
  20. 一种计算机可读存储介质,包括指令,其特征在于,当所述指令在设备上运行,使得所述设备执行权利要求1-12或权利要求13-16中任一项所述的方法。A computer-readable storage medium, comprising instructions, wherein, when the instructions are run on a device, the device is made to execute the method according to any one of claims 1-12 or 13-16.
  21. 一种计算机程序产品,其特征在于,所述计算机程序产品包含计算机指令,当所述计算机指令在设备上运行,使得所述设备执行权利要求1-12或权利要求13-16中任一项所述的方法。A computer program product, characterized in that the computer program product includes computer instructions, and when the computer instructions are run on a device, the device executes any one of claims 1-12 or 13-16. described method.
PCT/CN2022/124595 2021-10-14 2022-10-11 Data processing method, related apparatus, and communication system WO2023061357A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111198750.0A CN115981756A (en) 2021-10-14 2021-10-14 Data processing method, related device and communication system
CN202111198750.0 2021-10-14

Publications (1)

Publication Number Publication Date
WO2023061357A1 true WO2023061357A1 (en) 2023-04-20

Family

ID=85961746

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/124595 WO2023061357A1 (en) 2021-10-14 2022-10-11 Data processing method, related apparatus, and communication system

Country Status (2)

Country Link
CN (1) CN115981756A (en)
WO (1) WO2023061357A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080004904A1 (en) * 2006-06-30 2008-01-03 Tran Bao Q Systems and methods for providing interoperability among healthcare devices
CN104410662A (en) * 2014-10-23 2015-03-11 山东大学 Parallel mass data transmitting middleware of Internet of things and working method thereof
CN108121739A (en) * 2016-11-30 2018-06-05 株式会社日立制作所 Method of data capture and data gathering system
CN110569298A (en) * 2019-09-12 2019-12-13 成都中科大旗软件股份有限公司 data docking and visualization method and system
CN112818012A (en) * 2021-01-26 2021-05-18 深圳力维智联技术有限公司 Equipment data matching method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080004904A1 (en) * 2006-06-30 2008-01-03 Tran Bao Q Systems and methods for providing interoperability among healthcare devices
CN104410662A (en) * 2014-10-23 2015-03-11 山东大学 Parallel mass data transmitting middleware of Internet of things and working method thereof
CN108121739A (en) * 2016-11-30 2018-06-05 株式会社日立制作所 Method of data capture and data gathering system
CN110569298A (en) * 2019-09-12 2019-12-13 成都中科大旗软件股份有限公司 data docking and visualization method and system
CN112818012A (en) * 2021-01-26 2021-05-18 深圳力维智联技术有限公司 Equipment data matching method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN115981756A (en) 2023-04-18

Similar Documents

Publication Publication Date Title
WO2021253975A1 (en) Permission management method and apparatus for application, and electronic device
CN116560771A (en) Method for executing drawing operation by application and electronic equipment
WO2021169370A1 (en) Method for cross-device allocation of service elements, terminal device, and storage medium
CN115333941B (en) Method for acquiring application running condition and related equipment
US20230418630A1 (en) Operation sequence adding method, electronic device, and system
WO2022253158A1 (en) User privacy protection method and apparatus
CN115033313A (en) Terminal application control method, terminal equipment and chip system
CN116070035A (en) Data processing method and electronic equipment
WO2021104117A1 (en) Method for constructing application program resource packet, construction apparatus, and terminal device
EP4020251A1 (en) Data processing method and apparatus thereof
WO2023061357A1 (en) Data processing method, related apparatus, and communication system
WO2022100141A1 (en) Plug-in management method, system and apparatus
CN114489471B (en) Input and output processing method and electronic equipment
WO2022033355A1 (en) Mail processing method and electronic device
CN113590346B (en) Method and electronic equipment for processing service request
WO2023179682A1 (en) Device collaboration method
CN113487272B (en) Schedule activity conflict judgment method, electronic device and storage medium
WO2022166550A1 (en) Data transmission method and electronic device
CN116048933B (en) Fluency detection method
WO2022179495A1 (en) Privacy risk feedback method and apparatus, and first terminal device
CN116049122B (en) Log information transmission control method, electronic device and storage medium
WO2022262291A1 (en) Image data calling method and system for application, and electronic device and storage medium
CN114513575B (en) Method for collection processing and related device
CN116089057B (en) Resource scheduling method, device, storage medium and program product
WO2023051036A1 (en) Method and apparatus for loading shader

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22880294

Country of ref document: EP

Kind code of ref document: A1