Term updating method and apparatus, device, storage medium, and program product
By introducing a term synchronization mechanism into dual-system electronic devices, term synchronization files are generated and transmitted, solving the term inconsistency problem caused by the second system not being updated synchronously, and ensuring the consistency of terms displayed by the two systems.
Patent Information
- Application Number
- CN202210273191.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-18
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2042-03-18
AI Technical Summary
In dual-system electronic devices, when the entries in the first system are updated, the entries in the second system are not updated synchronously, resulting in inconsistencies between the entries displayed by the first and second systems.
By introducing a term synchronization mechanism between systems, the first system generates a term synchronization file containing the correspondence between term identifiers and term content, and sends the file to the second system so that the second system can update its own term resources based on the structure, ensuring the consistency of term display.
This achieves consistency in the display of terms in the first and second systems of a dual-system electronic device, avoiding inconsistencies caused by outdated term updates.
Smart Images

Figure CN116795810B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the field of electronic devices, and in particular to a term updating method and device, an electronic device, a storage medium, and a program product. BACKGROUND
[0002] With the continuous development of technology, more and more electronic devices with different functions have emerged, bringing great convenience to people's daily life.
[0003] In order to facilitate users with different language habits to use the same application in the electronic device, the developer will adapt the terms displayed in the application interface to multiple languages during the development of the application. Moreover, when the translation of the terms is updated, the terms will be updated in the form of update push. SUMMARY
[0004] Embodiments of the present application provide a term updating method, device, electronic device, storage medium, and program product. The technical solution is as follows:
[0005] In one aspect, the present application provides a term updating method, which is used in an electronic device supporting running a first system and a second system.
[0006] The method comprises:
[0007] The first system generates a term synchronization file, and the term synchronization file contains a structure representing the correspondence between a term identifier and a term content.
[0008] The first system sends the term synchronization file to the second system.
[0009] The second system updates a second term resource based on the structure in the term synchronization file, and the second term resource is a term resource based on which the second system displays terms.
[0010] In another aspect, the present application provides a term updating device, which is used in an electronic device supporting running a first system and a second system.
[0011] The device comprises:
[0012] A first system module is configured to generate a term synchronization file, and the term synchronization file contains a structure representing the correspondence between a term identifier and a term content.
[0013] The first system module is further configured to send the term synchronization file to a second system module.
[0014] The second system module is configured to update a second term resource based on the structure in the term synchronization file, the second term resource being a term resource based on which the second system displays terms.
[0015] In another aspect, an electronic device is provided. The electronic device includes a processor and a memory. The processor includes at least a first processor and a second processor. The second processor has a higher power consumption than the first processor. The memory stores at least one instruction for being executed by the processor to implement the term updating method in the above aspect.
[0016] In another aspect, a computer readable storage medium is provided. The storage medium stores at least one instruction for being executed by a processor to implement the term updating method in the above aspect.
[0017] In another aspect, a computer program product is provided. The computer program product includes computer instructions stored in a computer readable storage medium. A processor of an electronic device reads the computer instructions from the computer readable storage medium. The processor executes the computer instructions to cause the electronic device to perform the term updating method in the above aspect.
[0018] For an electronic device supporting dual systems, in order to avoid a problem that terms displayed by the first system and the second system are inconsistent due to that the terms of the second system are not updated synchronously when the terms of the first system are updated, a term synchronization mechanism is introduced between the systems. A term synchronization file including a corresponding relationship between a term identifier and a term content is generated by the first system, and is sent to the second system. The second system updates its own term resource based on the structure, so as to ensure consistency of terms displayed by the first system and the second system in a subsequent term display process. BRIEF DESCRIPTION OF DRAWINGS
[0019] Figure 1 FIG. 1 is an interface diagram of a dual system term inconsistency case according to an example embodiment of the present application;
[0020] Figure 2 FIG. 5 is a diagram of a dual-core communication software framework corresponding to the second processor according to an example embodiment of the present application;
[0021] Figure 3 FIG. 6 is a diagram of a dual-core communication software framework corresponding to the first processor according to an example embodiment of the present application;
[0022] Figure 4 FIG. 7 is a flowchart of a term updating method according to an example embodiment of the present application;
[0023] Figure 5 is an implementation schematic diagram of a word updating process provided by an example embodiment of the present application;
[0024] Figure 6 is a flowchart of a word updating method provided by another example embodiment of the present application;
[0025] Figure 7 is an implementation schematic diagram of a word display process in different scenarios provided by an example embodiment of the present application;
[0026] Figure 8 is a flowchart of a word display process in different scenarios provided by an example embodiment of the present application;
[0027] Figure 9 is a structural block diagram of a word updating apparatus provided by an example embodiment of the present application;
[0028] Figure 10 is a structural block diagram of an electronic device provided by an example embodiment of the present application. DETAILED DESCRIPTION
[0029] To make the purpose, technical solutions and advantages of the present application clearer, the embodiments of the present application will be described in further detail below with reference to the drawings.
[0030] “Multiple” mentioned herein refers to two or more. “And / or” describes the association relationship of associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. The character “ / ” generally represents that the associated objects before and after it are in an “or” relationship.
[0031] For an electronic device supporting dual systems, the dual systems can display the same graphical interface. For example, for a smart watch, the dual systems can both display a watch face interface of a watch face application. Since the applications in the dual systems are developed and updated independently, when a word in one of the dual systems is updated (for example, the translation corresponding to the word is updated), but the developer does not update the word in the other system in time, the problem of inconsistency of the word in the same graphical interface displayed by the dual systems can occur.
[0032] As shown illustratively in Figure 1 , the first system and the second system both support displaying a watch face interface 11 of a watch face application. When the application developer of the first system updates the word “exercise” to “exercise”, the watch face interface 11 displayed by the first system contains the word “exercise” 12. However, since the application developer of the second system does not update the word in time, the watch face interface 11 displayed by the second system still contains the word “exercise” 13.
[0033] To avoid inconsistencies between the terms displayed by the first and second systems when the first system updates its terms due to a lack of synchronization with the second system, this application introduces a term synchronization mechanism between the systems. The first system generates a term synchronization file containing the correspondence between term identifiers and term content, and sends this file to the second system. Upon receiving the term synchronization file, the second system updates its own term resources based on the structure, ensuring consistency between the terms displayed by the first and second systems during subsequent term display.
[0034] In the illustrative example above, the first system can send a synchronization file containing the updated term "sports" to the second system. The second system can then update "exercise" to "sports" on the watch face based on this file, so that the watch face displayed in the first system and the second system are consistent.
[0035] In this embodiment, the first processor and the second processor operate asynchronously, and the first system and the second system need to achieve system communication (or dual-core communication). In one possible application scenario, the first system is the Android operating system running on a central processing unit (CPU), and the second system is a real-time operating system (RTOS) running on a microcontroller unit (MCU).
[0036] like Figure 2 As shown, this application illustrates a dual-core communication software framework for the Android operating system, as illustrated in an exemplary embodiment. This dual-core communication software framework follows the design principles of "low coupling, high reliability, and high reusability," and includes module development for the Kernel, HIDL (Hardware Abstraction Layer Interface Description Language), Native Service, Framework Service, Framework API, and APP (Application) components.
[0037] The APP module includes Launcher (desktop launcher), Setting (setting), SystemUI (system user interface) and other functional modules, the Framework API module includes MCUManager (MCU management), SensorManager (sensor management), LocationManager (location management) and other management modules, the Framework Service module includes MCUManagerService (MCU management service), SystemSensorManager (system sensor management), LocationManagerService (location management service) and other service modules, the Native Service module includes dccservice (dcc service), Sensorservice (sensor service) and other service modules, the HIDL module includes SensorHAL (sensor hardware abstraction layer), GPS HAL (global positioning system hardware abstraction layer) and other modules. The Kernel module includes dcc_data, Mcu_sensor, Mcu_gps and other DCC Transfer Driver (DCC transmission driver).
[0038] The transmission layer is an interface layer connecting the upper and lower layers in the dual-core communication software framework, and shields the transmission details of the system lower layer (data link layer) communication to the application layer, and provides a service channel for the application scenario; the application layer is the main body of service provision, responds to human-computer interaction and transmits the data generated in the human-computer interaction process through the transmission layer, and responds to external data requests.
[0039] The RTOS is designed according to the peer-to-peer principle. Taking an electronic device, for example, an intelligent watch, as shown in FIG. 8, a dual-core communication software framework of the RTOS is shown. Figure 3
[0040] The dual-core communication software framework of the RTOS is divided into an application layer, a service layer, a framework layer, a hardware abstraction layer and a platform layer.
[0041] The application layer includes watch face, Daily Tracker, Message center, Voice around Apps, Health Apps, Settings and other application modules; the service layer includes Sport & health task, System manager task, AMS, AudioService, Log Service, OFTP Service, BT Service, DelegateService, RPC Service, sensor Service, storage Service and other service modules; the framework layer includes Message Pub, UIFramework, G2D Engine, Audio Middleware, Preference, File system, Algorithms, AsycEvent and other framework modules; the hardware abstraction layer includes Screen / TP, sensors and other hardware abstraction modules; the platform layer includes Board Support Package (BSP) and LOW level Driver, wherein the BSP includes Screen / TP, Codec, sensors, Flash, PSRAM and the like, and the LOW level Driver includes Uart, ADC, GPIO, SPI, I2C, IOS, PCM, I2S, HWTimer.
[0042] It should be noted that the dual-core communication software framework is only used for illustrative description, and those skilled in the art can add, delete or modify the above framework according to actual needs, and the embodiments of the present application do not limit the specific structure of the dual-core communication software framework.
[0043] Please refer to Figure 4FIG. 1 shows a flowchart of a term updating method according to an example embodiment of the present application. The example embodiment is described below with reference to an electronic device supporting running a first system and a second system.
[0044] In step 401, the first system generates a term synchronization file, which contains a structure representing the correspondence between a term identifier and a term content.
[0045] To reduce the power consumption of the electronic device while ensuring the performance of the electronic device, in a possible implementation, the electronic device is provided with at least a first processor and a second processor having different processing performance and power consumption, respectively, for running the first system and the second system (i.e., dual-core dual-system), and a system switching mechanism is designed for the dual-core dual-system.
[0046] During the running of the electronic device, the low-power system (which can be the first system or the second system) running on the low-power processor processes events requiring low-performance processing, and the high-power processor is kept in a sleep state (correspondingly, the high-power system running on the high-power processor is kept in a sleep state), thereby reducing the power consumption of the electronic device while realizing the basic functions of the electronic device. When there is an event requiring high-performance processing, the high-power processor is woken up, and the high-power system is switched to process the event, thereby ensuring that the triggered event can be responded to and processed in time and meeting the performance requirement of the electronic device.
[0047] In a possible implementation, the electronic device is provided with a first processor and a second processor, wherein the processing performance of the second processor is lower than that of the first processor (the processing capability and speed of the first processor are both higher than those of the second processor), and the power consumption of the second processor is lower than that of the first processor. Correspondingly, the first system (running on the first processor) can process the events processed by the second system (running on the second processor), while the second system does not necessarily process the events processed by the first system. Of course, the first system can also run on the second processor, and the second system can also run on the first processor, which is not limited in the example embodiment.
[0048] In another possible implementation, the electronic device can also be provided with a single processor, and the first system and the second system run on different cores of the processor, wherein the processing performance of the core running the second system is higher than that of the core running the first system.
[0049] For example, taking the electronic device as a smart watch, the first processor as a CPU, the second processor as an MCU, the first system as an Android system, and the second system as an RTOS. Correspondingly, the events that can be processed by the second system include watch face display, watch face interface switching, notification message display, and other scenes with low requirements for processing performance or weak interaction scenes; the events that can be processed by the first system include incoming call answering, message reply, function setting, and other scenes with high requirements for processing performance or strong interaction scenes.
[0050] In a possible implementation, the first system monitors the update of the term, and generates the term synchronization file when the term is updated.
[0051] As to the source of the term update, in a possible implementation, the first system obtains the updated term when receiving an application update or system update notification.
[0052] Since the monitoring of the term update and the generation of the term synchronization file have high requirements for system performance, in some embodiments, the system performance of the first system is higher than that of the second system. For example, when the electronic device supports running the Android system and the RTOS system, the term synchronization file is generated by the Android system.
[0053] Of course, in other embodiments, when the first system and the second system both have the capability of monitoring the term update and generating the term synchronization file, the term synchronization file can be generated by the system with lower power consumption, and the embodiments of the present application are not limited in this regard.
[0054] Optionally, the term synchronization file contains a structure in the form of id-value, where the id is the term identifier (the term identifier of each term is unique), and the value is the term content.
[0055] In some embodiments, the term is a translation term, i.e., the term content is different language texts corresponding to the same object. When a certain language text corresponding to the translation term is updated, the first system generates the term synchronization file. For example, the structure contained in the term synchronization file is: id001-movement (simplified Chinese), movement (traditional Chinese), activity (English).
[0056] In a possible implementation, the term synchronization file contains all terms in the first system, or the term synchronization file contains part of the terms in the first system, where the part of the terms are the terms shared by the first system and the second system.
[0057] Illustratively, as shown in FIG. 1, the electronic device 100 includes a first system 110 and a second system 120. The first system 110 is an Android system, and the second system 120 is an RTOS system. Figure 5As shown, both the first and second systems contain an entry with the identifier "id001" on their respective watch faces 51. The original content of this entry is "exercise, training, activity". Therefore, both the first and second systems uniformly display the entry "exercise" 52 on their watch faces 51. When the developers update the translation of the "id001" entry, the first system displays the "sports" entry 53 on its watch face 51 based on the updated content "sports, exercise, activity", and generates a synchronized entry file containing the structure "id001-sports, exercise, activity".
[0058] Step 402: The first system sends the term synchronization file to the second system.
[0059] Optionally, the first system sends the term synchronization file to the second system via dual-core communication. When the second system is in a dormant state, the first system needs to wake it up first, for example, by generating an interrupt. This embodiment does not limit this method.
[0060] Regarding the timing of sending the term synchronization file, in one possible implementation, the first system sends the term synchronization file to the second system when the electronic device is powered on. For example, the first system generates the term synchronization file after the electronic device is powered on, and sends the term synchronization file to the second system the next time the device is restarted or powered on again.
[0061] Optionally, if no term synchronization file is sent, the first and second systems will still use the original terms to avoid inconsistencies between the terms displayed by the two systems.
[0062] Step 403: The second system updates the second term resource based on the structure in the term synchronization file. The second term resource is the term resource that the second system uses when displaying terms.
[0063] Accordingly, after receiving the term synchronization file, the second system parses the file and updates its local second term resources based on the structure contained within. The second system then displays the terms based on the updated second term resources.
[0064] In one possible implementation, the second system obtains the corresponding term content from the second term resource based on the term identifier of the term to be displayed, and then renders and displays the term based on the term content.
[0065] In some embodiments, after receiving the term synchronization file, the second system performs an integrity check on the term synchronization file and updates the second term resource if the integrity check passes.
[0066] Optionally, in the case that the word entry resource is successfully updated, the second system sends an update success notification to the first system, and the first system enables the updated word entry based on the update success notification; in the case that the word entry resource is unsuccessfully updated, the second system sends an update failure notification to the first system, and the first system continues to use the word entry before the update based on the update failure notification.
[0067] As shown in Figure 5 illustratively, the second system updates the "exercise" word entry 52 originally displayed in the watch face interface 51 to the "sports" word entry 53 based on the word entry synchronization file sent by the first system, so as to keep consistency of the watch face interface between the first system and the second system.
[0068] In summary, for the electronic device supporting the dual systems, in order to avoid the problem that the word entries displayed by the first system and the second system are inconsistent due to the fact that the word entries of the second system are not synchronously updated when the word entries of the first system are updated, the embodiment of the present application introduces a word entry synchronization mechanism between the systems, generates a word entry synchronization file containing the correspondence between the word entry identifier and the word entry content by the first system, and sends the word entry synchronization file to the second system, so as to update the word entry resource of the second system based on the structure, and ensure consistency of the word entries displayed by the first system and the second system in the subsequent word entry display process.
[0069] Please refer to Figure 6 which shows a flowchart of a word entry updating method provided by another exemplary embodiment of the present application, and the embodiment takes the case that the method is applied to an electronic device supporting running a first system and a second system for example, and the method can include the following steps.
[0070] Step 601, the first system determines the common word entry in the common scenario, the first system and the second system display the same graphical interface in the common scenario, and the common word entry has the same word entry identifier in the first system and the second system.
[0071] Since the first system and the second system only display the same graphical interface in a few cases, in order to avoid providing useless word entries to the second system, the first system determines the common word entry between the dual systems in the common scenario, so as to subsequently generate a word entry synchronization file containing only the common word entry.
[0072] In a possible implementation, the first system and the second system agree on the id protocol of the same word entry, that is, the same common word entry between the first system and the second system corresponds to a uniform word entry identifier.
[0073] In some embodiments, the common scenario can be a common application, and accordingly, the first system determines the application word entry corresponding to each common application as the common word entry. The common application is determined according to the applications installed by the first system and the second system respectively.
[0074] In an illustrative example, the first system and the second system install applications, and there are common application watch face applications and fitness applications, i.e., the first system and the second system both support running the watch face applications and the fitness applications, and the first system and the second system display consistent watch face interfaces and consistent fitness interfaces, and thus the first system determines the watch face application corresponding to the watch face application entry and the fitness application corresponding to the fitness application entry as common entries.
[0075] In step 602, the first system generates an entry synchronization file based on the common entries.
[0076] Further, the first system generates the entry synchronization file based on the entry identifiers and the entry contents corresponding to the common entries.
[0077] In a possible implementation, when the first system displays the entries, the first system is based on the first entry resource, and in the case that the first entry resource is updated, the first system reads the common entries from the first entry resource based on the entry identifiers of the common entries.
[0078] Since the second system does not use the entry resources other than the common entries in the first entry resource, the first system detects whether the common entries are updated. In the case that the common entries are updated, the first system generates the entry synchronization file based on the common entries; in the case that the common entries are not updated, the first system does not need to generate the entry synchronization file.
[0079] In a possible implementation, the first system determines whether the common entries are updated based on the original common entries and the current common entries. For example, the first system can determine whether the original common entries and the current common entries are updated by avoiding the MD5 values, which is not limited in the embodiments of the present application.
[0080] Optionally, the entry synchronization file contains all the common entries, or contains the updated common entries, wherein the updated common entries are determined by the first system based on the original common entries and the current common entries.
[0081] In step 603, the first system sends the entry synchronization file to the second system.
[0082] The implementation of the present step can refer to the above-described step 402, and the present embodiment will not be described herein.
[0083] In step 604, in the case that the transmission of the entry synchronization file is successful, the second system updates the second entry resource based on the structure in the entry synchronization file.
[0084] The second system determines whether to update the second term resource based on the transmission of the term synchronization file. In the case that the term synchronization file is successfully transmitted, the second system updates the term resource; in the case that the term synchronization file fails to be transmitted, the second system does not update the term resource.
[0085] As to the specific manner of updating the term resource by the second system, in one possible implementation, the second system parses the term synchronization file to obtain the correspondence between the term identifier and the term content in the structure, and thus updates the term in the second term resource based on the correspondence.
[0086] The second system parses the term synchronization file based on the structure and the structure format agreed with the first system to obtain the correspondence between the term identifier and the term content.
[0087] In some embodiments, when the term synchronization file contains a common term, the manner of updating the term in the second term resource based on the correspondence includes modifying the term content and adding a new term.
[0088] In one possible implementation, the second system detects whether there is a term identifier identical to that in the structure in the second term resource. In the case that the first term identifier in the second term resource is identical to the second term identifier in the structure, the second system updates the first term content corresponding to the first term identifier to the second term content corresponding to the second term identifier.
[0089] In one illustrative example, when the second term resource contains a term with the term identifier "id001" and the parsed structure also contains a term with the term identifier "id001", the second system updates the term content corresponding to "id001" in the second term resource from "exercise, training, activity" to "movement, activity".
[0090] In the case that there is no term identifier identical to the third term identifier in the structure in the second term resource, it indicates that there is a common term to be added, and the second system creates a term in the second term resource based on the third term identifier and the corresponding third term content.
[0091] In one illustrative example, when the parsed structure contains a term with the term identifier "id010" and the second term resource does not contain a term with the term identifier "id010", the second system adds a term with the term identifier "id010" and the term content "electric quantity, battery" in the second term resource.
[0092] In the case that the term synchronization file fails to be transmitted, the first system retransmits the term synchronization file to the second system in step 605.
[0093] In some cases, the word synchronization file sent by the first system to the second system can not be correctly received. In order to improve the robustness of word synchronization, the first system introduces a retransmission mechanism, that is, in the case of word synchronization file transmission failure, the first system retransmits the word synchronization file to the second system.
[0094] In a possible implementation, when a transmission failure notification sent by the second system is received, or when no transmission result feedback sent by the second system is received within a preset time period after the word synchronization file is sent, the first system determines that the word synchronization file transmission fails.
[0095] In some embodiments, the first system counts the number of retransmissions, and in the case that the number of retransmissions does not reach a number threshold (for example, 3 times), the first system continues to retransmit; in the case that the number of retransmissions reaches the number threshold, the first system stops retransmitting.
[0096] Step 606, in the case of word synchronization file transmission failure, the second system sets a word synchronization failure identifier.
[0097] In the case of word synchronization file transmission failure, the second system sets a word synchronization failure identifier to indicate that the words are not synchronized between the first system and the second system.
[0098] Optionally, in the case of successful word synchronization file transmission, the second system deletes the word synchronization failure identifier.
[0099] Step 607, in the case that the word synchronization failure identifier exists, the second system responds to the common scene running instruction based on a target strategy, and the common scene running instruction is used to instruct to display a graphical interface corresponding to the common scene.
[0100] In the case that the second system is in a foreground running state (that is, has a screen control permission), when the common scene running instruction is received, the second system needs to display a graphical interface corresponding to the common scene, and in the process of displaying the graphical interface, the second system needs to apply the common words under the common scene.
[0101] Optionally, the common scene running instruction can be an instruction triggered by a gesture operation, an instruction triggered by a voice, or an instruction triggered by a physical key, and the like, which is not limited in the embodiments of the present application.
[0102] In the case of successful word synchronization file transmission (that is, there is no word synchronization failure identifier), since the common words between the first system and the second system are kept synchronized, the second system can normally respond to the common scene running instruction and perform rendering and display of the graphical interface based on the updated common words.
[0103] Illustratively,Figure 7 As shown, the second system currently displays the application list interface 54. When a press operation on the crown is received, since the second system and the first system have completed the entry synchronization (i.e., the entry synchronization file transfer is successful), the second system renders and displays the dial interface 51 based on the updated shared entry ("Sports" entry 53). Both the first system and the second system have dial interface display functions.
[0104] In the event that the term synchronization file transfer fails (i.e. there is a term synchronization failure flag), since the shared terms between the first system and the second system are not kept synchronized, the second system needs to respond to the common scenario operation instructions based on the target strategy to avoid inconsistencies between the terms displayed in the graphical interfaces of the first system and the second system in the common scenario.
[0105] In one possible implementation, upon receiving a shared scene execution command, the second system checks whether it has stored any original shared terms. If the second system has not stored any original shared terms, it cannot correctly display the graphical interface corresponding to the shared scene, therefore the first system must be forced to display the graphical interface. If the second system has stored any original shared terms, it can continue to display the graphical interface corresponding to the shared scene based on the original shared terms (the first system also still renders and displays the graphical interface corresponding to the shared scene based on the original shared terms).
[0106] Optionally, if the second system does not store the original shared terms, in response to a shared scenario execution command, the second system sends a switching command to the first system. This switching command instructs the first system to switch to foreground operation and acquire screen control permissions.
[0107] Accordingly, the first system obtains screen control permissions based on the switching command, and then renders and displays the graphical interface corresponding to the common scene based on the updated common terms.
[0108] Indicative, such as Figure 7 As shown, since the second system and the first system have not completed the term synchronization (i.e., the term synchronization file transfer failed), and the second system does not store the original shared terms, when the crown is pressed, the second system sends a switching command to the first system, and the first system renders and displays the dial interface 51 based on the updated shared terms (“Motion” term 53).
[0109] Optionally, if the second system stores the original shared terms, in response to the shared scene operation command, the second system renders and displays the graphical interface corresponding to the shared scene based on the original shared terms.
[0110] To ensure consistency of the graphical interface corresponding to the shared scene displayed by the two systems, in some embodiments, in the case that the word synchronization file transmission fails and the second system stores the original shared word, the first system displays the graphical interface corresponding to the shared scene based on the original shared word in response to the shared scene running instruction.
[0111] Optionally, when the first system and the second system display the graphical interface based on the original shared word, the first system continues to retransmit the word synchronization file. In the case that the word synchronization file transmission succeeds, the first system and the second system display the graphical interface based on the updated shared word.
[0112] Illustratively, as shown in FIG. 5, since the word synchronization between the second system and the first system is not completed (i.e., the word synchronization file transmission fails) and the second system stores the original shared word, when the press operation on the crown is received, the second system renders and displays the watch face interface 51 based on the original shared word (the "workout" word 52). Figure 7
[0113] In an exemplary embodiment, as shown in FIG. 6, the word display process of the second system includes the following steps: Figure 8
[0114] Step 801, receiving the word synchronization file transmitted by the first system.
[0115] Step 802, detecting whether the word synchronization file transmission succeeds. If yes, performing step 803, if no, performing step 804.
[0116] Step 803, parsing the word synchronization file and updating the word resource according to the parsing result.
[0117] Step 804, detecting whether the word resource is stored. If yes, performing step 805, if no, performing step 806.
[0118] Step 805, displaying the word based on the word resource.
[0119] In the case that the word synchronization file transmission succeeds, the second system displays the updated word based on the updated word resource; in the case that the word synchronization file transmission fails, the second system displays the original word based on the original word resource.
[0120] Step 806, switching to the first system for word display.
[0121] In this embodiment, the first system packs the shared word under the shared scene to generate the word synchronization file and transmits it to the second system, and the second system updates the shared word, thereby ensuring consistency of the words displayed by the two systems under the shared scene.
[0122] In addition, in the embodiment, the second system determines a strategy for responding to the operation instruction of the shared scene based on the synchronization of the word item and the storage of the word item resource of the second system, and ensures the consistency of the word items displayed by the two systems under the premise of ensuring the normal display of the graphical interface in the shared scene.
[0123] Please refer to Figure 9 which shows a structural block diagram of a word item updating device provided by an embodiment of the application. The device can be realized by software, hardware or a combination of the two to become all or part of an electronic device. The device includes:
[0124] The first system module 901 is configured to generate a word item synchronization file, wherein the word item synchronization file contains a structure for representing the correspondence between a word item identifier and a word item content.
[0125] The first system module 901 is further configured to send the word item synchronization file to the second system module 902.
[0126] The second system module 902 is configured to update a second word item resource based on the structure in the word item synchronization file, wherein the second word item resource is a word item resource based on which the second system displays word items.
[0127] Optionally, the first system module 901 is configured to:
[0128] determine a shared word item in a shared scene, wherein the first system and the second system display the same graphical interface in the shared scene, and the shared word item has the same word item identifier in the first system and the second system;
[0129] generate the word item synchronization file based on the shared word item.
[0130] Optionally, the first system module 901 is configured to:
[0131] read the shared word item from a first word item resource based on the word item identifier of the shared word item in the case of an update of the first word item resource, wherein the first word item resource is a word item resource based on which the first system displays word items;
[0132] generate the word item synchronization file based on the shared word item in the case of an update of the shared word item.
[0133] Optionally, the second system module 902 is configured to:
[0134] update the second word item resource based on the structure in the word item synchronization file in the case of successful transmission of the word item synchronization file;
[0135] The first system module 901 is further configured to retransmit the term synchronization file to the second system module 902 in a case where the term synchronization file fails to be transmitted.
[0136] Optionally, the second system 902 is further configured to:
[0137] setting a term synchronization failure identifier in a case where the term synchronization file fails to be transmitted;
[0138] in a case where the term synchronization failure identifier exists, executing an instruction based on a target strategy response common scenario, the instruction for indicating displaying a graphical interface corresponding to the common scenario, the first system and the second system displaying the same graphical interface in the common scenario.
[0139] Optionally, the term displayed in the graphical interface in the common scenario is a shared term.
[0140] The second system module 902 is configured to:
[0141] in a case where the second system does not store an original shared term, sending a switching instruction to the first system module 901 in response to the common scenario execution instruction;
[0142] The first system module 901 is configured to acquire screen control authority based on the switching instruction; and render and display a graphical interface corresponding to the common scenario based on the updated shared term.
[0143] Optionally, the second system module 902 is further configured to:
[0144] in a case where the second system stores the original shared term, render and display a graphical interface corresponding to the common scenario based on the original shared term in response to the common scenario execution instruction.
[0145] Optionally, the first system module 901 is further configured to:
[0146] in a case where the term synchronization file fails to be transmitted and the second system stores the original shared term, display a graphical interface corresponding to the common scenario based on the original shared term in response to the common scenario execution instruction.
[0147] Optionally, the second system module 902 is configured to:
[0148] parse the term synchronization file to obtain a corresponding relationship between a term identifier and a term content in the structure;
[0149] update a term in the second term resource based on the corresponding relationship.
[0150] Optionally, the second system module 902 is configured to:
[0151] in a case where the first term identifier is consistent with the second term identifier in the structure, updating first term content corresponding to the first term identifier as second term content corresponding to the second term identifier in the second term resource;
[0152] in a case where there is no term identifier consistent with the third term identifier in the second term resource, creating a term based on the third term identifier and corresponding third term content in the second term resource.
[0153] Optionally, the system performance of the first system is higher than the system performance of the second system.
[0154] To sum up, for an electronic device supporting dual systems, in order to avoid the problem that the displayed terms of the first system and the second system are inconsistent due to the unsynchronized updating of the terms of the second system when the terms of the first system are updated, the embodiment of the present application introduces a term synchronization mechanism between the systems, generates a term synchronization file containing the corresponding relationship between the term identifier and the term content by the first system, and sends the term synchronization file to the second system, so that the second system updates its own term resource based on the structure, and ensures the consistency of the displayed terms of the first system and the second system in the subsequent term display process.
[0155] Please refer to Figure 10 which shows the structural block diagram of the electronic device provided by an exemplary embodiment of the present application. The electronic device in the present application can include one or more of the following components: a processor 1210 and a memory 1220.
[0156] Optionally, the processor 1210 at least includes a first processor 1211 and a second processor 1212, wherein the first processor 1211 is configured to run a first system, the second processor 1212 is configured to run a second system, and the power consumption of the first processor 1211 is lower than that of the second processor 1212, and the performance of the first processor 1211 is lower than that of the second processor 1212. The processor 1210 connects various parts in the entire electronic device by using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 1220, and calling data stored in the memory 1220. Optionally, the processor 1210 can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 1210 can be integrated with a combination of one or several of a central processing unit (CPU), a graphics processing unit (GPU), a neural-network processing unit (NPU), and a modem. Among them, the CPU is mainly used to process operating systems, user interfaces, and application programs; the GPU is used to render and draw the content to be displayed on the touch display screen; the NPU is used to implement artificial intelligence (AI) functions; and the modem is used to process wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor 1210, but be implemented by a separate chip.
[0157] The memory 1220 can include a random access memory (RAM) and can also include a read-only memory (ROM). Optionally, the memory 1220 includes a non-transitory computer-readable storage medium. The memory 1220 can be used to store instructions, programs, codes, code sets, or instruction sets. The memory 1220 can include a program storage area and a data storage area, where the program storage area can store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing each of the method embodiments described below, etc.; and the data storage area can store data created according to the use of the electronic device (such as audio data, a phone book, etc.).
[0158] The electronic device in the embodiments of the present application further includes a communication component 1230 and a display component 1240. The communication component 1230 can be a Bluetooth component, a WiFi component, an NFC component, etc., and is configured to communicate with external devices (servers or other terminal devices) through wired or wireless networks; the display component 1240 is configured to display a graphical user interface and / or receive user interaction operations.
[0159] In addition, those skilled in the art can understand that the structure of the electronic device shown in the above-described figures does not constitute a limitation on the electronic device, and the electronic device can include more or fewer components than those shown in the figures, or combine certain components, or different component arrangements. For example, the electronic device further includes radio frequency circuitry, an input unit, a sensor, audio circuitry, a speaker, a microphone, a power supply, etc., which are not described here in detail.
[0160] The embodiments of the present application also provide a computer-readable storage medium, which stores at least one instruction. The at least one instruction is used to be executed by a processor to implement the term updating method described in the above embodiments.
[0161] The embodiments of the present application provide a computer program product, which includes computer instructions stored in a computer-readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to make the electronic device execute the term updating method provided in the above embodiments.
[0162] Those skilled in the art should be aware that, in the above one or more examples, the functions described in the embodiments of the present application can be implemented in hardware, software, firmware or any combination thereof. When implemented in software, the functions can be stored in a computer readable medium or transmitted as one or more instructions or code on the computer readable medium. The computer readable medium includes computer storage medium and communication medium, and the communication medium includes any medium that facilitates transfer of computer program from one place to another. The storage medium can be any available medium that can be accessed by a general purpose or special purpose computer.
[0163] The above merely provides the optional embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A term updating method, characterized by, The method is used for an electronic device supporting running of a first system and a second system; The method comprises: The first system generates a term synchronization file, the term synchronization file comprising a structure representing a correspondence between a term identifier and a term content; The first system sends the term synchronization file to the second system; The second system updates a second term resource based on the structure in the term synchronization file, the second term resource being a term resource based on which the second system displays terms.
2. The method of claim 1, wherein, The first system generates a term synchronization file, comprising: The first system determines a common term in a common scenario, the first system and the second system displaying the same graphical interface in the common scenario, and the common term having consistent term identifiers in the first system and the second system; The first system generates the term synchronization file based on the common term.
3. The method of claim 2, wherein, The first system generates the term synchronization file based on the common term, comprising: In a case where a first term resource is updated, the first system reads the common term from the first term resource based on a term identifier of the common term, the first term resource being a term resource based on which the first system displays terms; In a case where the common term is updated, the first system generates the term synchronization file based on the common term.
4. The method according to any one of claims 1 to 3, characterized in that, The second system updates a second term resource based on the structure in the term synchronization file, comprising: In a case where the term synchronization file is successfully transmitted, the second system updates the second term resource based on the structure in the term synchronization file; The method further comprises: In a case where the term synchronization file fails to be transmitted, the first system retransmits the term synchronization file to the second system.
5. The method of claim 4, wherein, The method further comprises: In a case where the term synchronization file fails to be transmitted, the second system sets a term synchronization failure identifier; In a case where the term synchronization failure identifier exists, the second system responds to a common scenario running instruction based on a target strategy, the common scenario running instruction being used to instruct to display a graphical interface corresponding to a common scenario, the first system and the second system displaying the same graphical interface in the common scenario.
6. The method of claim 5, wherein, The terms displayed in the graphical interface in the common scenario are common terms; The second system responds to a common scenario running instruction based on a target strategy, comprising: In a case where the second system does not store original common terms, the second system sends a switching instruction to the first system in response to the common scenario running instruction; The first system acquires screen control authority based on the switching instruction, and displays the graphical interface corresponding to the common scenario based on the updated common terms.
7. The method of claim 5, wherein, The second system responds to a common scenario running instruction based on a target strategy, further comprising: In a case where the second system stores original common terms, the second system displays the graphical interface corresponding to the common scenario based on the original common terms in response to the common scenario running instruction.
8. The method of claim 7, wherein, The method further comprises: In a case where the word synchronization file transmission fails and the second system stores the original shared word, the first system displays a graphical interface corresponding to the shared scene based on the original shared word in response to the shared scene running instruction.
9. The method according to any one of claims 1 to 3, characterized in that, The second system updates a second word resource based on the structure in the word synchronization file, including: The second system parses the word synchronization file to obtain a correspondence between a word identifier and word content in the structure; The second system updates a word in the second word resource based on the correspondence.
10. The method of claim 9, wherein, The second system updates a word in the second word resource based on the correspondence, including: In a case where a first word identifier in the second word resource is consistent with a second word identifier in the structure, the second system updates first word content corresponding to the first word identifier to second word content corresponding to the second word identifier; In a case where there is no word identifier in the second word resource that is consistent with a third word identifier in the structure, the second system creates a word in the second word resource based on the third word identifier and corresponding third word content.
11. The method according to any one of claims 1 to 3, characterized in that, The system performance of the first system is higher than the system performance of the second system.
12. A term updating apparatus characterized by comprising: The device is used in an electronic device that supports running a first system and a second system; The device includes: A first system module for generating a word synchronization file, the word synchronization file containing a structure for representing a correspondence between a word identifier and word content; The first system module is also configured to send the word synchronization file to a second system module; The second system module is configured to update a second word resource based on the structure in the word synchronization file, the second word resource being a word resource used by the second system for word display.
13. An electronic device, comprising: The electronic device includes a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the word updating method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the word updating method according to any one of claims 1 to 11.
15. A computer program product, characterised in that, The computer program product includes computer instructions stored in a computer readable storage medium; the processor of the electronic device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the electronic device implements the word updating method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Information synchronization method and system and terminal equipment
CN109842482A
Method for synchronizing texts between systems, storage medium and terminal equipment
CN111241046A