CN113535179B - Control method, wearable device and storage medium - Google Patents

Control method, wearable device and storage medium Download PDF

Info

Publication number
CN113535179B
CN113535179B CN202010322576.5A CN202010322576A CN113535179B CN 113535179 B CN113535179 B CN 113535179B CN 202010322576 A CN202010322576 A CN 202010322576A CN 113535179 B CN113535179 B CN 113535179B
Authority
CN
China
Prior art keywords
trigger
command
file
resource file
wearable device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010322576.5A
Other languages
Chinese (zh)
Other versions
CN113535179A (en
Inventor
胡志通
陈德银
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN202010322576.5A priority Critical patent/CN113535179B/en
Publication of CN113535179A publication Critical patent/CN113535179A/en
Application granted granted Critical
Publication of CN113535179B publication Critical patent/CN113535179B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a control method, wearable equipment and a storage medium. The control method comprises the following steps: acquiring an extensible markup language file and a resource file; analyzing a command label of the extensible markup language file to map the command label with the used resource file; and binding the command tag with the corresponding trigger, and rendering the resource file according to the trigger command of the trigger. According to the control method and the wearable device, the extensible markup language file is adopted to define the attribute of the resource file in a configuration mode and the corresponding trigger condition is set through the trigger to trigger the function of the dial plate, so that the design and the manufacture of the dial plate of the wearable device are facilitated, and the development efficiency of the dial plate is improved.

Description

Control method, wearable device and storage medium
Technical Field
The present application relates to the field of consumer electronics, and more particularly, to a control method, a wearable device, and a storage medium.
Background
In the related art, with the wide application of wearable devices, wearable devices such as smartwatches may have information processing capabilities besides indicating time, for example, one or more functions of reminding, entertainment, interaction, and the like may be implemented through application design. Generally, applications of a smart watch are coded to make a watch dial, for example, a smart wearable device based on an Android (Android) system may compile applications into an Application Package (APK) by code writing and then install the APK on the wearable device. However, code editing requires professional computer knowledge, and non-developers cannot directly create dials, resulting in low development efficiency.
Disclosure of Invention
The embodiment of the application provides a control method, wearable equipment and a storage medium.
The control method of the wearable device in the embodiment of the application comprises the following steps: acquiring an extensible markup language file and a resource file; parsing a command tag of the extensible markup language file to map the command tag with the resource file in use; and binding the command tag with the corresponding trigger, and rendering the resource file according to the trigger command of the trigger. .
The wearable device comprises an acquisition module, an analysis module and a processing module; the acquisition module is used for acquiring the extensible markup language file and the resource file; the analysis module is used for analyzing the command label of the extensible markup language file so as to map the command label with the used resource file; and the processing module is used for binding the command tag with the corresponding trigger and rendering the resource file according to the trigger command of the trigger.
The wearable device of another embodiment of the present application includes a processor, a memory, and a computer program stored on the memory and executable on the processor, wherein when the computer program is executed by the processor, the processor is caused to execute the control method of the above embodiment.
The storage medium of the embodiments of the present application stores a computer program that, when executed by one or more processors, causes the processors to execute the control method described in the above embodiments.
In the control method, the wearable device and the storage medium of the embodiment, the extensible markup language file is adopted to define the attribute of the resource file in a configuration mode and the trigger is used to set the corresponding trigger condition to trigger the function of the dial plate, so that the design and the manufacture of the dial plate of the wearable device are facilitated, and the development efficiency of the dial plate is improved.
Additional aspects and advantages of embodiments of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of embodiments of the present application.
Drawings
The above and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flow chart of a control method according to an embodiment of the present application.
Fig. 2 is a block diagram of a wearable device according to an embodiment of the present application.
Fig. 3 is another schematic flow chart of the control method according to the embodiment of the present application.
Fig. 4 is another flowchart illustrating a control method according to an embodiment of the present application.
Fig. 5 is a schematic application effect diagram of the wearable device according to the embodiment of the present application.
Fig. 6 is another block diagram of a wearable device according to an embodiment of the present disclosure.
Fig. 7 is a schematic diagram of another module of the wearable device according to the embodiment of the present application.
Description of the main element symbols:
wearable device 10, acquisition module 11, parsing module 12, processing module 13, trigger 14, event creation module 15, processor 17, memory 18, computer program 181.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative and are only for the purpose of explaining the present application and are not to be construed as limiting the present application.
Referring to fig. 1 and fig. 2, the control method of the wearable device 10 according to the embodiment of the present disclosure may be used in the wearable device 10 according to the embodiment of the present disclosure to implement setting of the dial of the wearable device 10 and triggering of the dial function. A trigger 14 may be provided and disposed within the wearable device 10.
In some embodiments, a control method comprises:
step S1, acquiring an Extensible Markup Language (XML) file and a resource file;
s2, analyzing a command label of the extensible markup language file to map the command label with a used resource file; and
and S3, binding the command tag with the corresponding trigger 14, and rendering the resource file according to the trigger command of the trigger 14.
Specifically, the wearable device 10 may include an acquisition module 11, a parsing module 12, and a processing module 13, and step S1 may be implemented by the acquisition module 11, step S2 may be implemented by the parsing module 12, and step S3 may be implemented by the processing module 13. That is, the obtaining module 11 may be configured to obtain an extensible markup language file and a resource file. The parsing module 12 may be used to parse the command tags of the extensible markup language file to map the command tags with the resource file being used. The processing module 13 may be configured to bind the command tag and the corresponding trigger 14, and render the resource file according to the trigger command of the trigger 14.
In the control method and the wearable device 10 of the embodiment of the application, the extensible markup language file is used for defining the attribute of the resource file in a configuration mode and setting the corresponding trigger condition through the trigger 14 to trigger the function of the dial plate, so that the design and the manufacture of the dial plate of the wearable device 10 are facilitated, and the development efficiency of the dial plate is improved.
In some embodiments, the wearable device 10 may be a smart watch, a smart bracelet, smart glasses, or the like, and is not particularly limited herein. In the embodiment of the present application, the wearable device 10 is explained taking a smart watch as an example.
In some embodiments, the extensible language file describes the resource file and attributes of the execution effects according to predetermined language rules.
Therefore, the resource file and the execution effect can be better modified semantically by customizing the label and the attribute of the extensible language file, so that the preset language rule can be formed. Specifically, the predetermined language rule may be described in the form of a rule specification, and the user may implement the effect that the user wants to describe in the extensible language file only by editing the extensible language file according to the predetermined language rule, without programming, which facilitates the function development of the wearable device 10.
In some embodiments, an engine may be disposed within the wearable device 10.
Therefore, the engine can realize the functions of information feedback, data processing and the like based on a specific rule according to the user requirement and a certain algorithm.
Further, in some embodiments, step S2 may be to utilize an engine to parse the command tag of the extensible markup language file to map the command tag with the resource file being used.
In one example, the engine may parse the extensible language file based on predetermined language rules.
In some embodiments, the resource file comprises an audio file, and step S2 comprises:
at least one attribute of the audio file used, the volume played, whether to cycle or not is determined from the dial content of the wearable device 10.
In particular, the parsing module 12 may be configured to determine at least one attribute of an audio file to use, a volume of play, whether to loop, or not, based on the dial content of the wearable device 10.
It will be appreciated that the wearable device 10 may generate corresponding audio effects by playing an audio file, such as click audio effects, notification audio effects, and/or alarm audio effects. Thus, for different dial contents, the wearable device 10 may use different audio files, and different playing volumes and circulation effects, etc., so as to map the command tag and the audio file, and trigger corresponding sound effects when receiving the trigger signal.
In one example, the command tag may include a voice command tag, which may be represented in the extensible language file as a < SoundCommand > tag. When the < SoundCommand > tag is resolved, the < SoundCommand > tag may be bound to the corresponding trigger 14.
Referring to fig. 3, in some embodiments, the number of the flip-flops 14 may be multiple. Each trigger 14 may correspond to a different command tag.
In certain embodiments, step S3 comprises:
step S32, a trigger event is created according to a preset condition;
step S34, generating a trigger command according to the attribute of the trigger event; and
and step S36, rendering the resource file according to the trigger command.
Specifically, the wearable device 10 includes the event creation module 15, step 32 may be implemented by the event creation module 15, step S34 may be implemented by the trigger 14, and step S36 may be implemented by the processing module 13. That is, the event creation module 15 may be configured to create a trigger event according to a preset condition. The trigger 14 may be used to generate a trigger command based on the attributes of the trigger event. The processing module 13 may be configured to render the resource file according to the trigger command.
The preset condition may be user input, information notification, preset time, sensor information, and/or the like. The trigger 14 may generate different trigger commands according to different trigger events and different attributes of the trigger events, thereby achieving different effects. In this way, the wearable device 10 sets the corresponding trigger condition through the trigger 14 to trigger the function of the dial, which facilitates the design and development of the wearable device 10.
Referring to fig. 4, taking the user input of the trigger sound effect as an example, in some embodiments, the trigger event includes a sound effect event, the trigger command includes a sound trigger command, and step S3 includes:
step S322, creating a sound effect event according to the user input;
step S342, generating the sound trigger command according to the attribute of the sound effect event; and
and step S362, rendering the audio file according to the sound trigger command.
Specifically, step S322 may be implemented by the event creation module 15, step S342 may be implemented by the trigger 14, and step SS362 may be implemented by the processing module 13. That is, the event creation module 15 may be used to create a click event based on user input. Trigger 14 may be used to generate the voice trigger command based on the attributes of the click event. The processing module 13 may be configured to render the audio file according to the sound trigger command.
The user input may be input by touch, key, gesture and/or sound, and the wearable device 10 may include an information collecting device such as a touch screen, an input key, a camera and/or a microphone to collect the user input information. The sound effect events may have different attributes according to different user inputs. For example, for touch input, the sound effect event may have a time attribute representing the duration of the touch and/or a location attribute representing the location of the touch, thereby generating different sound trigger commands to effect changes in attributes such as playback volume, whether to cycle, etc., when an audio file is rendered.
In this way, the wearable device 10 may trigger the sound effect playing at the appropriate time by parsing the resource package and loading the sound effect resource and the trigger rule of the sound effect.
Of course, in other embodiments, the event creating module 15 may also generate an audio event according to the message notification, and similarly, by parsing the resource package, loading the audio resource and the trigger rule of the audio, the audio playing of the received message may be triggered at the appropriate time. And the event creation module 15 may trigger the sound effect play of the alarm clock at an appropriate timing when the sound effect event is generated according to a predetermined time.
Referring to fig. 5, in some embodiments, the wearable device 10 includes a display screen, the resource file includes pictures and/or texts, and step S2 includes: at least one attribute of the displayed resource file, the display position and the animation rule is determined according to the dial content of the wearable device 10.
Thus, for different dial contents, the wearable device 10 may use different pictures and/or characters, and different display positions, animation effects, etc., so as to map the command tag with the pictures and/or characters, and trigger a corresponding sound effect when receiving a trigger signal.
In some embodiments, the wearable device 10 includes a memory 18, and the extensible markup language files and the resource files are stored in the memory 18 by way of compressed packets.
In this way, when the wearable device 10 is started, the extensible language file and the resource file that needs to be used may be read from the compressed package by the engine, and then rendered into actual display content and/or effects by parsing the rules in the extensible language file.
Referring to fig. 6, the electronic device according to the embodiment of the present disclosure includes a processor 17, a memory 18, and a computer program 181 stored in the memory 18 and capable of running on the processor 17, where when the computer program 181 is executed by the processor 17, the processor 17 is enabled to execute the information management method according to any one of the embodiments.
In one example, the computer program 181, when executed by the processor 17, causes the processor 17 to perform the steps of:
s1, acquiring an extensible markup language file and a resource file;
s2, analyzing a command label of the extensible markup language file to map the command label with a used resource file; and
and S3, binding the command tag with the corresponding trigger 14, and rendering the resource file according to the trigger command of the trigger 14.
In the wearable device 10 according to the embodiment of the present application, the processor 17 executes the computer program 181, so that the extensible markup language file is used to define the attribute of the resource file in a configuration manner and the trigger 14 sets the corresponding trigger condition to trigger the function of the dial plate, which facilitates the design and manufacture of the dial plate of the wearable device 10 and is beneficial to improving the development efficiency of the dial plate.
The storage medium of the embodiment of the present application stores a computer program 181, and when the computer program 181 is executed by one or more processors 17, the information management method of any of the above embodiments is implemented so that the processors 17 execute the computer program 181.
Referring to fig. 7, one or more processors 17 may be coupled to a storage medium through a bus, the storage medium stores a computer program 181, and the processor 17 processes the computer program 181 to perform the information management method according to the embodiment of the present disclosure to generate a path around an obstacle. The wearable device 10 may also be connected to a network through a communication module to enable communication connections with a manufacturing execution system and/or a server, and to input/output devices through input/output interfaces.
In the description herein, reference to the description of "one embodiment," "some embodiments," or "an example" or the like means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
Although embodiments of the present application have been shown and described above, it is to be understood that the above embodiments are exemplary and not to be construed as limiting the present application, and that changes, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (8)

1. A control method of a wearable device, comprising:
acquiring an extensible markup language file and a resource file, wherein the extensible markup language file describes the resource file and the attribute of an execution effect according to a preset language rule;
parsing a command tag of the extensible markup language file to map the command tag with the resource file in use; and
binding the command tag with a corresponding trigger, and rendering the resource file according to a trigger command of the trigger;
the step of rendering the resource file according to the trigger command of the trigger comprises the following steps:
creating a trigger event according to a preset condition; and
generating the trigger command according to the attribute of the trigger event; and
and rendering the resource file according to the trigger command.
2. The method of claim 1, wherein the resource file comprises an audio file, and the step of parsing the command tag of the xml file to map the command tag with the resource file to be used comprises:
and determining at least one attribute of the audio file, the playing volume and whether to cycle according to the dial plate content of the wearable device.
3. The control method according to claim 2, wherein the trigger event comprises a click event, the trigger command comprises a sound trigger command, and the step of rendering the resource file according to the trigger command of the trigger comprises:
creating a click event according to user input;
generating the sound trigger command according to the attribute of the click event; and
and rendering the audio file according to the sound trigger command.
4. The control method according to claim 1, wherein the resource file comprises pictures and/or words, and the step of mapping the command label with the resource file to be used comprises:
and determining at least one attribute of the displayed resource file, the display position and the animation rule according to the dial plate content of the wearable device.
5. The control method according to claim 1, wherein the wearable device comprises a memory, and wherein the extensible markup language file and the resource file are stored in the memory by means of compressed packets.
6. A wearable device, comprising:
the acquisition module is used for acquiring the extensible markup language file and the resource file; the extensible markup language file describes the resource file and the attribute of the execution effect according to a preset language rule;
the analysis module is used for analyzing the command label of the extensible markup language file so as to map the command label with the used resource file; and
the processing module is used for binding the command tag with the corresponding trigger and rendering the resource file according to the trigger command of the trigger;
the event creating module is used for creating a trigger event according to a preset condition;
a trigger for generating the trigger command according to an attribute of the trigger event;
the processing module is further configured to render the resource file according to the trigger command.
7. A wearable device comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, causing the processor to perform the control method of any of claims 1-5.
8. A storage medium, characterized in that the storage medium stores a computer program which, when executed by one or more processors, causes the processors to execute the control method of any one of claims 1-5.
CN202010322576.5A 2020-04-22 2020-04-22 Control method, wearable device and storage medium Active CN113535179B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010322576.5A CN113535179B (en) 2020-04-22 2020-04-22 Control method, wearable device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010322576.5A CN113535179B (en) 2020-04-22 2020-04-22 Control method, wearable device and storage medium

Publications (2)

Publication Number Publication Date
CN113535179A CN113535179A (en) 2021-10-22
CN113535179B true CN113535179B (en) 2023-03-28

Family

ID=78094101

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010322576.5A Active CN113535179B (en) 2020-04-22 2020-04-22 Control method, wearable device and storage medium

Country Status (1)

Country Link
CN (1) CN113535179B (en)

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9262133B2 (en) * 2012-01-27 2016-02-16 Amx Llc Mapping and formatting input commands to a third party protocol
US10439908B2 (en) * 2014-12-23 2019-10-08 Talari Networks Incorporated Methods and apparatus for providing adaptive private network centralized management system time correlated playback of network traffic
CN105989178A (en) * 2015-03-06 2016-10-05 上海世纪出版股份有限公司 Method and apparatus for page resource structuring
CA2989685A1 (en) * 2015-06-16 2016-12-22 Standard Innovation Corporation Sensor acquisition and analytics platform for enhancing interaction with adult devices
CN107092601B (en) * 2016-02-17 2021-03-23 创新先进技术有限公司 Resource file construction method, resource file application method and device
CN107368292B (en) * 2017-03-29 2020-06-12 阿里巴巴集团控股有限公司 Resource compiling method and device
US10606573B2 (en) * 2017-06-07 2020-03-31 Syntel, Inc. System and method for computer language migration using a re-architecture tool for decomposing a legacy system and recomposing a modernized system
US10642590B2 (en) * 2017-06-30 2020-05-05 Samsung Electronics Co., Ltd. Method and electronic device for rendering scalable vector graphics content
CN108763297B (en) * 2018-04-18 2021-08-17 Oppo广东移动通信有限公司 Webpage resource processing method and device and mobile terminal
CN110399196B (en) * 2019-07-30 2024-04-23 努比亚技术有限公司 Wearable device, interface switching implementation method thereof and computer readable storage medium

Also Published As

Publication number Publication date
CN113535179A (en) 2021-10-22

Similar Documents

Publication Publication Date Title
Hashimi et al. Pro Android 3
US8572632B2 (en) Devices as services in a decentralized operating system
WO2018045489A1 (en) Data collection method, apparatus and system
CN114064024A (en) Method, apparatus, device, storage medium, and program product for developing micro-application
CN111190825A (en) Automatic test method, system and robot
CN111209065B (en) Dynamic wallpaper setting method and device, storage medium and electronic equipment
CN111111201B (en) Skill creation method, device, server and medium based on game
US9934292B2 (en) Dynamic presentation of a results set by a form-based software application
CN114625439A (en) Sub-application operation method based on micro front-end architecture, electronic device and storage medium
CN113535179B (en) Control method, wearable device and storage medium
US10970332B2 (en) Electronic device and digital content managing method
CN107247594B (en) Logic system, implementation method thereof, computing device and computer-readable storage medium
CN112068895B (en) Code configuration method, device, video playing equipment and storage medium
CN114356290A (en) Data processing method and device and computer readable storage medium
EP2972666B1 (en) Visualization interface for information object system
CN114445023A (en) Approval process configuration method, device, equipment and storage medium
CN117519703B (en) Customization management method for operation interface
US20220413597A1 (en) Interaction-based rendering of spatial environments
CN107368380A (en) The method for sending message under Windows systems to any window
US20190258375A1 (en) Methods and systems for resident control of devices using html and javascript
CN116954568A (en) Code generation method, device, electronic equipment and storage medium
KR20220112977A (en) System and method for user interface management of AUTOSAR setting tool
CN113674724A (en) Method for generating analysis file of album file and terminal equipment
Cometa A vehicle Human-Machine Interface implementation based on Google Android Automotive OS
CN117931138A (en) Global universal popup method and system

Legal Events

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