CN110737487A - resource switching control method, system, terminal device and storage medium - Google Patents

resource switching control method, system, terminal device and storage medium Download PDF

Info

Publication number
CN110737487A
CN110737487A CN201911004328.XA CN201911004328A CN110737487A CN 110737487 A CN110737487 A CN 110737487A CN 201911004328 A CN201911004328 A CN 201911004328A CN 110737487 A CN110737487 A CN 110737487A
Authority
CN
China
Prior art keywords
resource
switching
screen
target
screen application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911004328.XA
Other languages
Chinese (zh)
Inventor
洪鑫彧
周银军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengmai Technology (Nanjing) Co Ltd
Original Assignee
Chengmai Technology (Nanjing) 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 Chengmai Technology (Nanjing) Co Ltd filed Critical Chengmai Technology (Nanjing) Co Ltd
Priority to CN201911004328.XA priority Critical patent/CN110737487A/en
Publication of CN110737487A publication Critical patent/CN110737487A/en
Pending legal-status Critical Current

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
    • 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/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • 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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching

Landscapes

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

Abstract

The invention provides a switching control method, a system, terminal equipment and a storage medium of resources, wherein the method comprises the steps of monitoring main screen resource switching broadcast sent by a system frame after attribute expansion by screen application, judging and obtaining a target resource type by the screen application according to the main screen resource switching broadcast, feeding back to the system frame according to the target resource type and a self resource display state, obtaining a matched target control set by the system frame according to information fed back by the screen application, controlling interface controls in the target control set to be switched to the target resource type, and completing resource switching of the screen application.

Description

resource switching control method, system, terminal device and storage medium
Technical Field
The present invention relates to the field of human-computer interaction technologies, and in particular, to a method, a system, a terminal device, and a storage medium for controlling switching of resources.
Background
In a multi-screen environment, a screen (defined as a main screen) and other screens (defined as sub-screens) which are set to be switched over are used, the current application needs to be restarted or refreshed integrally to achieve the effect of resource switching, so that user experience is reduced.
In order to avoid the problems of low efficiency and low speed in resource switching caused by restarting the UI, for example, 201410128167.6- language switching methods and systems based on an Android platform are used in the prior art, when the Android system switches languages, language switching is performed on current visible display plates according to preset priority sorting rules, and the language switching process comprises the steps of obtaining character string information of each interface control on the current display plate and determining a coding format of a target language type according to preset multi-national language resource files so as to form and display character strings of the target language type.
Therefore, how to avoid refreshing the control and improve the efficiency of resource switching and the user experience are problems that need to be solved urgently.
Disclosure of Invention
The invention aims to provide resource switching control methods, systems, terminal equipment and storage media, and improve the resource switching efficiency and the user experience while avoiding refreshing controls.
The technical scheme provided by the invention is as follows:
the invention provides a switching control method of resources, which comprises the following steps:
the screen application monitors the main screen resource switching broadcast sent by the system frame after the attribute expansion;
the screen application obtains a target resource type according to the main screen resource switching broadcast judgment, and feeds back to the system frame according to the target resource type and the self resource display state;
and the system framework obtains a matched target control set according to the information fed back by the screen application, and controls each interface control in the target control set to be switched to the target resource type to complete the resource switching of the screen application.
Further , the method for the screen application to listen for the home screen resource switch broadcast sent by the system framework after the attribute extension comprises the following steps:
the system framework obtains resource display requirements;
the system framework sets the replaceable resource attribute of the interface control and the corresponding resource switching mode thereof to complete attribute expansion according to the resource display requirement to obtain the system framework after the attribute expansion; the attribute extensions include a language attribute extension and a subject attribute extension.
, after the system frame sets the replaceable resource attribute of the interface control and the resource switching mode corresponding to the replaceable resource attribute to complete the attribute extension according to the resource display requirement to obtain the system frame after the attribute extension, the screen application monitors the main screen resource switching broadcast sent by the system frame after the attribute extension and includes the following steps:
the system framework acquires a resource switching instruction which is input by a user and aims at a main screen, and generates a main screen resource switching broadcast according to the resource switching instruction;
the system framework sends the home screen resource switch cast to the screen application.
, the screen application judging according to the main screen resource switching to get the target resource type, and the feedback to the system frame according to the target resource type and the own resource display status includes:
the screen application parses the main screen resource switching broadcast to obtain a target resource type;
when the target resource type does not accord with the resource display state of the screen application, the screen application generates and sends switching receiving response information to the system framework;
and when the target resource type is consistent with the resource display state of the screen application, the screen application does not respond, or generates and sends switching refusal response information to the system framework.
, the system framework obtains a matched target control set according to the information fed back by the screen application, and controls each interface control in the target control set to switch to the target resource type, and completing the resource switching of the screen application includes the steps of:
after receiving the information fed back by the screen application, the system framework analyzes the information fed back to obtain a resource attribute value of the screen application needing to switch resources;
the system framework judges whether a history control set matched with the attribute value of the target resource type exists or not according to the resource attribute value;
when the historical control set exists, the system framework determines that the historical control set is the target control set, controls each interface control in the target control set to be switched to the target resource type, and completes resource switching of the screen application;
when the resource attribute value does not exist, the system framework judges whether the resource attribute value corresponding to each screen application responding to the system framework is matched with the attribute value of the target resource type, classifies and records all matched screen applications to obtain a corresponding target control set, controls each interface control in the target control set to be switched to the target resource type, and completes the resource switching of the screen application;
and the system framework controls each interface control in the target control set to be switched to the target resource type, and the resource switching of the screen application is completed.
The invention also provides a switching control system of kinds of resources, which comprises a system framework and a plurality of screen applications;
the screen application is used for monitoring a main screen resource switching broadcast sent by the system frame after the attribute expansion, judging to obtain a target resource type according to the main screen resource switching broadcast, and feeding back to the system frame according to the target resource type and the self resource display state;
and the system framework is used for obtaining a matched target control set according to the information fed back by the screen application, controlling each interface control in the target control set to be switched to the target resource type, and completing resource switching of the screen application.
, the system framework includes:
the acquisition module is used for acquiring resource display requirements;
the setting module is used for setting the replaceable resource attribute of the interface control and the corresponding resource switching mode thereof to complete attribute expansion according to the resource display requirement to obtain the system framework after the attribute expansion; the attribute extensions include a language attribute extension and a subject attribute extension.
, the system framework further includes:
the acquisition module is used for acquiring a resource switching instruction which is input by a user and aims at a main screen;
a generating module, configured to generate the main screen resource switching broadcast according to the resource switching instruction;
an communication module for sending the home screen resource switch cast to the screen application.
Further , the screen application includes:
the analysis module is used for analyzing the type of the target resource obtained by the broadcasting of the main screen resource switching ;
processing module, which is used to generate the receiving switching response information when the target resource type is not in accordance with the self resource display state;
and the second communication module is used for sending the switching receiving response information to the system framework.
, the system framework further includes:
the analysis module is used for analyzing and obtaining a resource attribute value of the screen application needing to switch resources according to the feedback information after receiving the information fed back by the screen application;
the second processing module is used for judging whether a history control set matched with the attribute value of the target resource type exists according to the resource attribute value; when present, the system framework determines that the set of historical controls is the set of target controls; when the resource attribute values do not exist, the system framework judges whether the resource attribute values corresponding to the screen applications responding to the system framework are matched with the attribute values of the target resource types, and classifies and records all matched screen applications to obtain corresponding target control sets;
and the control module is used for controlling each interface control in the target control set to be switched to the target resource type so as to complete resource switching of the screen application.
The invention also provides terminal devices, which include a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the processor is configured to execute the computer program stored in the memory, and implement the operations performed by the resource switching control method.
The invention also provides storage media, which is characterized in that the storage media stores at least instructions, and the instructions are loaded and executed by a processor to realize the operations executed by the switching control method of the resources.
By the resource switching control method, system, terminal equipment and storage medium provided by the invention, the control can be prevented from being refreshed, and the resource switching efficiency and the user experience can be improved.
Drawings
The above-described characteristics, technical features, advantages and implementations of the method, system, terminal device and storage medium for controlling switching of resources will be described in in a clearly understandable manner with reference to the accompanying drawings.
FIG. 1 is a flow chart of embodiments of the resource handover control method of the present invention;
FIG. 2 is a schematic structural diagram of a software architecture in the resource handover control method according to the present invention;
FIG. 3 is a flowchart of another embodiments of the resource handover control method of the present invention;
FIG. 4 is a flow chart of examples of the switching control method of resources according to the present invention;
FIG. 5 is a schematic structural diagram of embodiments of the resource switching control system of the present invention;
FIG. 6 is a schematic diagram of the structure of embodiments of computer devices of the present invention.
Detailed Description
It should be apparent that the drawings in the following description are only examples of the invention, and other drawings and embodiments can be obtained by those skilled in the art without creative effort.
In addition, for the sake of simplicity and comprehension of the drawings, only of the components with the same structure or function are schematically shown in some of the drawings or only of the components are labeled, and "" herein means not only "", but also "more than ".
In embodiments of the present invention, as shown in fig. 1, a method for controlling switching of resources includes:
s100, the screen application monitors the main screen resource switching broadcast sent by the system frame after the attribute expansion;
as shown in FIG. 2, the software architecture related to the invention comprises a system frame and screen applications, wherein the screen applications comprise a main screen application and a sub-screen application, the main screen application runs on a system setting application when system resources are switched, the sub-screen application with an entry UI. for providing language switching of a user refers to an application running on a sub-screen when the system resources are switched, and can be any application installed in the system, whether the main screen application or the sub-screen application runs on the same system frames, and the main screen application and the sub-screen application respectively monitor main screen resource switching broadcast sent by the system frames with expanded real-time attributes.
S200, the screen application obtains a target resource type according to the broadcast judgment of the main screen resource switching , and feeds back the target resource type and the resource display state to the system frame;
specifically, after the screen application receives the main screen resource switching broadcast sent by the system frame, all screen applications receiving the main screen resource switching broadcast respectively judge the resource type that the user needs to switch, namely the target resource type, and in addition, the screen application detects in real time to acquire the resource display state corresponding to the broadcast time of the received main screen resource switching , so that the resource display state is fed back to the system frame according to the target resource type and the resource display state.
And S300, the system framework obtains a matched target control set according to the information fed back by the screen application, and controls each interface control in the target control set to be switched to a target resource type, so that the resource switching of the screen application is completed.
Specifically, the system framework receives information fed back by each screen application, then performs screening processing according to the information fed back by the screen application to obtain a matched target control set, and after the target control set is obtained by screening, the system framework controls each interface control in the target control set to be respectively switched to a target resource type.
In this embodiment, the screen application monitors broadcasts of the main screen resource switching in real time and gives corresponding response feedback to the system frame, so that the system frame can screen out the target control set according to the response feedback, and control the interface control therein to switch to the target resource type included in broadcasts of the main screen resource switching, and no reloading and refreshing of the screen application is needed, thereby avoiding refreshing the control, because refreshing of the control is avoided, not only is the operation simple, because the resource loading and refreshing is reduced, thereby improving the efficiency of resource switching, and avoiding the pause and incoherence of the multimedia screen application caused when the resource loading and refreshing, thereby improving the experience of the resource switching and using of the user.
In embodiments of the present invention, as shown in fig. 3, a method for controlling switching of resources includes:
s001, acquiring resource display requirements by a system framework;
s002, the system frame sets the replaceable resource attribute of the interface control and the corresponding resource switching mode to complete attribute expansion according to the resource display requirement to obtain the system frame after attribute expansion; the attribute extension comprises a language attribute extension and a subject attribute extension;
specifically, the precondition for implementing the method is that the system framework is customized, and an interface control (TextView) capable of displaying a text or an interface control (ImageView) displaying a picture, various interface controls capable of setting theme attributes such as background color, transparency, display position and size, and interface controls capable of setting language attributes such as language type and font are subjected to attribute expansion so as to record information such as resource identification and resource display mode required to be displayed by the interface controls. The specific implementation is as follows:
step 1, extending the attributes of the interface control, adding the attributes for recording the replaceable resource identifiers, and simultaneously adding a corresponding default method for replacing the resources according to the attributes, wherein the default method can be realized again according to the actual situation by specific application.
examples, in the android system, language resource attribute of interface control can be defined by adding android: languageres attribute (defined here as language attribute), languagechanged default method replacement language resource (defined here as language method) can also be defined by adding android: the names attribute (defined here as subject attribute), to define subject resource attribute of interface control, to add the memchanged default method replacement subject resource (defined here as subject method);
and 2, developing and realizing each application based on the expanded system framework, and configuring language attributes and theme attributes of the interface controls for various interface controls according to actual needs and the implementation schemes of actual developers in the corresponding layout files (xml) of the application components of the android for providing screen interaction.
examples, in the android system, for interface controls with language resource attributes, such as a literal internationalized resource control, the language attribute configuration is typically a string that corresponds to the attribute value of the name of the resource that needs to be used in the language resource file (strings.xml), i.e., only the identifier (here, the name is used to represent the identifier of the corresponding resource) is assigned in the instance of the language attribute.
If the display of the interface control resource needs to dynamically format the character string after calculation in the application use process, and the language method can be realized again, values (where ResParam is used to represent the dynamic calculation result of the corresponding resource) are added in the example of the language attribute for recording and storing the calculated result, and the display of the dynamic calculation result is updated to the example value of the language attribute in time in the screen application.
For an interface control with a theme resource attribute, the configuration of the theme attribute is generally a character string, the character string corresponds to an attribute value of a name of a resource that needs to be used in a language resource file (strings.xml), the value of the language resource file corresponds to a path of a picture resource file (a configuration file under a drawable directory), that is, only a Resname is assigned in an instance of the theme attribute, and an identifier of the corresponding picture resource is stored.
The S010 system framework obtains a resource switching instruction which is input by a user and aims at a main screen, and generates a main screen resource switching broadcast according to the resource switching instruction;
the system frame generates a corresponding main screen resource switching broadcast according to the resource switching instruction after acquiring the resource switching instruction, wherein the main screen resource switching broadcast includes the type of resource to be switched, and the type of resource to be switched includes, but is not limited to, the language resource and the theme resource of the system, and the theme resource includes, but is not limited to, the type of the theme text resource (including, but not limited to, text size, text color, font weight, text position, etc.), the theme background resource (including, but not limited to, background picture, background color, background transparency, background landscape screen, etc.), and the like.
The S020 system framework sends a main screen resource switching broadcast to the screen application;
specifically, the system framework can respectively send a main screen resource switching broadcast to all running screen applications (including a main screen application and a sub-screen application) in the system, so that the broadcast informs all running screen applications, and thus, the system framework is prevented from sending a main screen resource switching broadcast to a screen application which is not running in the background, and the screen application which is not running in the background indicates that the current interface user does not need to use the screen application at the current moment, so that the screen application which is not running in the background does not need to be informed, and further, the system framework is prevented from sending a main screen resource switching broadcast to a large number of screen applications at the same time , and the sending efficiency of the main screen resource switching broadcast is improved.
In addition, the system framework can send a main screen resource switching cast to all running and non-running screen applications (including the main screen application and the sub-screen applications) in the system respectively, so that the cast informs all running and non-running screen applications, and thus, when the non-running screen application is newly started to run, the newly started and run screen application is immediately added into the response flow, and the user is prevented from subsequently reentering the newly started and run screen application to perform resource switching.
S100, the screen application monitors the main screen resource switching broadcast sent by the system frame after the attribute expansion;
s210, the screen application analyzes the main screen resource switching to broadcast the target resource type;
specifically, when each screen application receives a broadcast notification, that is, when each screen application receives a main screen resource switching broadcast, the screen application processes and judges the type of the resource to be switched, that is, the screen application distinguishes whether the resource to be switched is a language resource or a theme resource according to the main screen resource switching broadcast.
S220, when the target resource type is not consistent with the resource display state of the screen application, the screen application generates and sends switching receiving response information to the system framework;
s230, when the type of the target resource is consistent with the display state of the self resource, the screen application does not respond, or generates and sends switching refusal response information to the system framework;
specifically, each screen application can detect and acquire its own resource display state in real time, and therefore, judges whether its own resource display state matches the target resource type after the screen application plays and analyzes the target resource type according to the main screen resource switching , and if the resource display state matches the target resource type, it indicates that the currently used resource of the screen application already belongs to the target resource type, and therefore the screen application does not need to switch again, and further the screen application does not need to respond.
For example, if the resource type to be switched is obtained by broadcast analysis according to the main screen resource switching is a chinese language resource, and the language displayed in the current screen application a is already the language environment after system switching, that is, the language displayed in the current screen application a is a chinese language resource, then there is no need to additionally perform processing of chinese language resource switching, and the current screen application a can ignore the main screen resource switching broadcast sent to itself by the current system framework and ignore the notification of the current system framework.
S310, after receiving information fed back by the screen application, the system framework analyzes the information fed back to obtain a resource attribute value of the screen application needing to switch resources;
specifically, after the screen application determines that the update of the corresponding target resource type needs to be executed, that is, the screen application receives the main screen resource switching broadcast and feeds back the switching accepting response information to the system frame according to the target resource type and the self resource display state, or after the screen application determines that the update of the corresponding target resource type does not need to be executed, that is, the screen application receives the main screen resource switching broadcast and sends no response information to the system frame according to the target resource type and the self resource display state, or sends the switching refusing response information to the system frame, the system frame parses the received information fed back by the screen application (the fed back information includes the switching accepting response information, the non-response information, or the switching refusing response information) to obtain the resource attribute value of the corresponding screen application.
S320, the system framework judges whether a history control set matched with the attribute value of the target resource type exists according to the resource attribute value;
s330, when the historical control set exists, the system framework determines that the historical control set is a target control set, controls each interface control in the target control set to be switched to a target resource type, and completes resource switching of screen application;
s340, when the resource attribute value does not exist, the system framework judges whether the resource attribute value corresponding to each screen application of the response system framework is matched with the attribute value of the target resource type, all matched screen applications are classified and recorded to obtain a corresponding target control set, each interface control in the target control set is controlled to be switched to the target resource type, and the resource switching of the screen applications is completed.
Specifically, the system framework judges that the screen application needs to execute the updating of the corresponding resources according to the resource attribute values, and creates a sub-thread to traverse all interface controls corresponding to the screen application needing to switch resources on the current interface, and records the interface control set needing to update the resources to obtain a target interface control set. And referring to the above, each time the system framework is traversed, the corresponding target control set can be obtained by classifying, and the target control set obtained by each traversal is recorded and stored to obtain a historical control set. Therefore, the system framework judges whether a history control set matched with the attribute value of the target resource type exists or not according to the resource attribute value, if so, the system framework determines that the history control set is the target control set, otherwise, the system framework needs to traverse again to generate a screen application matched with the attribute value of the target resource type, and therefore a new target control set is obtained. And after the system framework obtains the target control set, controlling each interface control in the target control set to be switched to the target resource type, and completing resource switching of the screen application.
For example, when the screen application switches the system language times after running, and the system framework traverses the interface control, if the language attribute value of the interface control is null, the interface control is considered not to be switched in language resources, and after the th traversal, the interface control set needing to be switched in language resources is stored in the corresponding language Activity, so that the interface control is used when the system language is switched again next time, and the interface control does not need to be traversed.
Illustratively, if the main screen resource switching broadcast sent by the system frame is a language resource switching broadcast notification, and the language attribute value of the interface control has a value, a default language method for interface control extension can be called, or the method is achieved in a customized manner, wherein, if the Resname has a value, but ResParam has no assignment, a sub-thread notifies a main thread, if the language switching relates to a text type interface control, text replacement is directly performed on the text type interface control, if the language switching relates to a picture type interface control, picture display resources of the picture type interface control are directly replaced, and when international resources are replaced, the ID value in the resources is obtained through the name character string of the resources in a reflection manner, and assignment is performed on the text or picture resources of the interface control.
Illustratively, if a main screen resource switching broadcast sent by a system frame is a language resource switching broadcast notification, and a language attribute value of an interface control is not null, wherein Resname has a value, and ResParam has a value (is a language resource dynamically displayed after calculation), a sub-thread notifies a main thread, if the language switching relates to a text-type interface control, text replacement is directly performed on the interface control, if the language switching relates to a picture-type interface control, picture display resources of the interface control are directly replaced, when international resources are replaced, an ID value in the resources is obtained through a name character string of the resources in a reflection mode, and meanwhile resaram is used for formatting the resources and assigning values to the text resources of the interface control.
Illustratively, if the main screen resource switching broadcast sent by the system frame is a theme resource switching broadcast notification, and the theme attribute value of the interface control has a value, a default theme method for interface control extension can be called, or the interface control extension is realized by re-customization.
In the embodiment, the system framework executes traversal search on the target control set matched with the resource attribute value of the target resource type by creating the sub-thread, so that the search efficiency is greatly improved, and the sub-thread informs the main thread to modify and display the corresponding resource of the interface control of the corresponding screen application, so that the resource switching efficiency of the interface control corresponding to the screen application is directly improved. Similar to the Android vehicle-mounted multi-screen system, when resources are switched on the main screen (including but not limited to system languages, system themes and the like), the main screen application on the main screen and the sub-screen application on the sub-screen can display the corresponding system resources of the target resource type in a non-refreshing and timely manner. In the prior art, for the character resources which need to be displayed through the dynamic calculation result, the display resources need to be updated again after the business logic is recalculated, however, for the switching of the language resources, the value of the calculation result is not changed, and the repeated calculation is not necessary. According to the invention, the ID value obtained by previous calculation is directly obtained from the original ResParam, and assignment is directly carried out according to the obtained ID value after resource switching, so that repeated calculation can be avoided, and the waste of CPU calculation resources is reduced.
Illustratively, based on the Android platform, the invention needs to use Service and broadcastrcerechiver ( broadcast receiver) in four Android components, and also uses Intent, wherein Intent is Activity (Activity is application program components, user interfaces are provided, and a user can interact with a medium for completing a certain task), communication between Service and broadcasterever.
Preferably, the system framework creates corresponding sub-threads for each screen application, and monitors broadcast transmission conditions of the system framework through the sub-threads respectively, only the screen application supporting theme switching receives a main screen theme resource switching broadcast, the inside of the screen application needs to be provided with a 2 broadcast receiver for receiving theme resources, the broadcast receiver is provided with 0 filters, the 1 processes the Intent when monitoring the theme resource switching Intent, the broadcast receiver processes the Intent, and similarly, only the screen application supporting language switching receives a main screen language resource switching broadcast, the inside of the screen application needs to be provided with a broadcast receiver for receiving language resources, the broadcast receiver is provided with filters, and the processes the Intent when monitoring the Intent of language resource switching, the broadcast receiver processes the Intent.
The examples of the present invention, as shown in FIG. 4, include the steps of:
s1, the user switches resources (including but not limited to system language or theme style, etc.) in the home screen interface setting of the in-vehicle center.
S2, the system framework sends a home screen resource switch cast of resource switches to all running screen applications within the system (including the home screen application and the sub-screen application).
S3, the screen application monitors main screen resource switching broadcasting;
s4, judging which type the switching type is by the screen application;
s5, when the screen application judges that no corresponding switching type exists, the screen application enters S8;
s6, when the language is the language switching type, the screen application judges whether the language is updated, if so, the S61 is entered, otherwise, the S8 is entered; for example, if the language resource is switched, and the language displayed in the current screen application is already the language environment after the system is switched, the language resource switching process does not need to be additionally performed, and the system notification of this time can be ignored.
S61, compiling all interface controls by the child thread to obtain a target control set related to language switching;
s62, traversing the target control set by the sub-thread, and informing the main thread of updating the language resources of each interface control;
s7, when the theme is the theme switching type, the screen application judges whether the theme is updated, if so, the S71 is entered, otherwise, the S8 is entered; for example, if the theme resource is the switched theme resource, and the theme displayed in the current screen application is the theme environment after the system is switched, the additional processing of switching the theme resource is not needed, and the current system notification can be ignored.
S71, compiling all interface controls by the child thread to obtain a target control set related to theme switching;
s72, traversing the target control set by the sub-thread, and informing the main thread of updating the theme resources of each interface control;
and S8, ending.
The system switches resources, after each screen application receives a main screen resource switching broadcast and judges that the corresponding resource needs to be updated, a sub-thread is created to traverse interface controls corresponding to all screen applications of the current interface, and a target control set needing resource updating is recorded, the screen application switches system languages at th time after running, when traversing the control, if the language attribute value of the control is null, the control is considered not to be switched by language resources, after th traversal, the set needing language resource switching is stored in the corresponding Activity so as to be used when the system languages are switched again at the next time, and the control is not needed to be traversed, the screen application switches the system theme at th time after running, when traversing the control, if the theme attribute value of the control is null, the control is considered not to be switched by the main resource, after th traversal, the set needing main resource switching is stored in the corresponding Activity so as to be used when the system theme is switched again at the next time, and the control is not needed to be traversed.
And 5, modifying and displaying the resources corresponding to the interface controls in the target control set by the system framework.
In order to improve the efficiency, step 4 suggests traversing the control needing to modify the resource by creating the sub-thread to traverse the sub-thread, and in this step 5, the sub-thread notifies the main thread to modify and display the corresponding resource of the corresponding control.
In this example, when the main screen of the Android on-vehicle multi-screen system performs resource switching (including being not limited to system languages, system themes, etc.), each screen application can display corresponding resources in time without refreshment, so that the efficiency of resource switching performed by on-vehicle multi-screens is improved, and the use experience of the user based on resource refreshing switching of the on-vehicle screens is greatly improved.
embodiments of the invention, as shown in FIG. 5, a switching control system of resources comprises a system framework 20 and a plurality of screen applications 10;
the screen application 10 is configured to monitor a main screen resource switching broadcast sent by the system frame 20 after the attribute expansion, judge a target resource type according to the main screen resource switching broadcast, and feed back to the system frame 20 according to the target resource type and a resource display state of the screen application;
the system framework 20 is configured to obtain a matched target control set according to information fed back by the screen application 10, and control each interface control in the target control set to switch to a target resource type, so as to complete resource switching of the screen application 10.
, the system framework 20 includes:
the acquisition module is used for acquiring resource display requirements;
the setting module is used for setting the replaceable resource attribute of the interface control and the corresponding resource switching mode thereof to complete attribute expansion according to the resource display requirement to obtain the system frame 20 after attribute expansion;
the attribute extensions include a language attribute extension and a subject attribute extension.
, the system frame 20 further includes:
the acquisition module is used for acquiring a resource switching instruction which is input by a user and aims at a main screen;
the generating module is used for generating a main screen resource switching broadcast according to the resource switching instruction;
an communication module for sending a home screen resource switch cast to the screen application 10.
Further , the screen application 10 includes:
the analysis module is used for analyzing the type of the target resource obtained by the broadcasting of the main screen resource switching ;
processing module, which is used to generate the receiving switching response information when the target resource type is not in accordance with the self resource display state;
a second communication module, configured to send a handover accepting response message to the system framework 20.
, the system frame 20 further includes:
the analysis module is used for analyzing and obtaining the resource attribute value of the screen application 10 needing to switch resources according to the feedback information after receiving the information fed back by the screen application 10;
the second processing module is used for judging whether a history control set matched with the attribute value of the target resource type exists or not according to the resource attribute value; when present, system framework 20 determines the set of historical controls as the set of target controls; when the attribute values of the resources corresponding to the screen applications 10 responding to the system frame 20 do not exist, the system frame 20 judges whether the attribute values of the resources corresponding to the screen applications 10 respond to the system frame 20 are matched with the attribute values of the target resource types, and classifies and records all the matched screen applications 10 to obtain corresponding target control sets;
and the control module is used for controlling each interface control in the target control set to be switched to the target resource type, and completing resource switching of the screen application 10.
Specifically, this embodiment is a system embodiment corresponding to the above method embodiment, and specific effects refer to the above method embodiment, which is not described in detail in herein.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the above division of the program modules is merely used as an example, and in practical applications, the above function allocation may be performed by different program modules as needed, that is, the internal structure of the apparatus is divided into different program units or modules to perform all or part of the above described functions.
embodiments of the present invention, as shown in fig. 6, terminal devices 100 include a processor 110, a memory 120, wherein the memory 120 is used for storing computer programs, and the processor 110 is used for executing the computer programs stored in the memory 120 to implement the resource switching control method in the method embodiment corresponding to fig. 1 or fig. 2.
The terminal device 100 may be a desktop computer, a notebook, a palmtop computer, a tablet computer, a mobile phone, a human-computer interaction screen, or the like. The terminal device 100 may include, but is not limited to, a processor 110, a memory 120. Those skilled in the art will appreciate that fig. 6 is merely an example of the terminal device 100, does not constitute a limitation of the terminal device 100, and may include more or less components than those shown, or combine certain components, or different components, such as: the terminal device 100 may also include input/output interfaces, display devices, network access devices, communication buses, communication interfaces, and the like. A communication interface and a communication bus, and may further include an input/output interface, wherein the processor 110, the memory 120, the input/output interface and the communication interface complete communication with each other through the communication bus. The memory 120 stores a computer program, and the processor 110 is configured to execute the computer program stored in the memory 120 to implement the resource switching control method in the method embodiment corresponding to fig. 1 or fig. 2.
The Processor 110 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Array (FPGA) or other Programmable logic device, discrete or transistor logic, discrete hardware components, etc.
The memory 120 may be an internal storage unit of the terminal device 100 such as a hard disk or a memory of the terminal device, or an external storage device of the terminal device such as a plug-in hard disk provided on the terminal device, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card), etc. further , the memory 120 may include both the internal storage unit of the terminal device 100 and the external storage device, the memory 120 is used to store computer programs and other programs and data required by the terminal device 100, and the memory may be used to temporarily store data that has been or will be output.
The memory 120 may include program modules, such as a kernel (kernel), middleware (midleware), Application Programming Interface (API), and applications, which may be comprised of software, firmware, or hardware, or at least two thereof, the input/output Interface forwards commands or data input by a user through an input/output Interface (e.g., sensor, keyboard, touch screen), the communication Interface connects the terminal device 100 with other network devices, user devices, networks, the communication Interface may be connected to a network by wire or wireless for connection to external other network devices or user devices, the wireless communication may include at least wireless fidelity (WiFi), Bluetooth (BT), Bluetooth (NFC), NFC (63), GPS (GPS) and cellular communication devices, etc., the wireless communication may include at least wireless fidelity (WiFi) communication interfaces, USB communication devices, USB communication interfaces, USB communication devices, USB communication interfaces.
embodiments of the present invention, storage media, in which at least instructions are stored, which are loaded and executed by a processor to implement the operations performed by the switching control method for resources described above, correspond to the embodiments.
They may be implemented in program code that is executable by a computing device such that it is executed by the computing device, or separately, or as individual integrated circuit modules, or as a plurality or steps of individual integrated circuit modules. Thus, the present invention is not limited to any specific combination of hardware and software.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or recited in detail in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, e.g., a module or a unit may be divided into only logical functions, and other divisions may be realized in practice, e.g., a plurality of units or components may be combined or integrated with another systems, or features may be omitted or not executed, and in addition, point, the shown or discussed coupling or direct coupling or communication connection between each other may be realized through interfaces, and the indirect coupling or communication connection between the apparatuses or units may be electric, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, that is, may be located in places, or may also be distributed on multiple network units.
In addition, the functional units in the embodiments of the present application may be integrated into processing units, or each unit may exist alone physically, or two or more units are integrated into units.
The integrated modules/units, if implemented as software functional units and sold or used as a stand-alone product, may be stored in computer-readable storage media, with the understanding that the present invention implements all or part of the processes of the above-described method embodiments, and may also be implemented by a computer program that sends instructions to associated hardware, which may be stored in computer-readable storage media, which when executed by a processor, may implement the steps of the above-described method embodiments.
It should be noted that the above embodiments can be freely combined as necessary. The foregoing is only a preferred embodiment of the present invention, and it should be noted that it is obvious to those skilled in the art that various modifications and improvements can be made without departing from the principle of the present invention, and these modifications and improvements should also be considered as the protection scope of the present invention.

Claims (12)

1, kinds of resources switching control method, characterized by comprising the steps of:
the screen application monitors the main screen resource switching broadcast sent by the system frame after the attribute expansion;
the screen application obtains a target resource type according to the main screen resource switching broadcast judgment, and feeds back to the system frame according to the target resource type and the self resource display state;
and the system framework obtains a matched target control set according to the information fed back by the screen application, and controls each interface control in the target control set to be switched to the target resource type to complete the resource switching of the screen application.
2. The method for controlling switching of resources according to claim 1, wherein the step of listening by the screen application to the home screen resource switching broadcast sent by the system framework with extended listening attributes comprises:
the system framework obtains resource display requirements;
the system framework sets the replaceable resource attribute of the interface control and the corresponding resource switching mode thereof to complete attribute expansion according to the resource display requirement to obtain the system framework after the attribute expansion; the attribute extensions include a language attribute extension and a subject attribute extension.
3. The method according to claim 2, wherein after the system framework sets the replaceable resource attribute of the interface control and the corresponding resource switching manner thereof according to the resource display requirement, and completes the attribute extension to obtain the system framework after the attribute extension, the screen application monitors the main screen resource switching broadcast sent by the system framework after the attribute extension, and the method comprises the following steps:
the system framework acquires a resource switching instruction which is input by a user and aims at a main screen, and generates a main screen resource switching broadcast according to the resource switching instruction;
the system framework sends the home screen resource switch cast to the screen application.
4. The method for controlling switching of resources according to claim 1, wherein the screen application obtains a target resource type according to the determination of the main screen resource switching , and the feedback to the system framework according to the target resource type and the display status of its own resources comprises the following steps:
the screen application parses the main screen resource switching broadcast to obtain a target resource type;
when the target resource type does not accord with the resource display state of the screen application, the screen application generates and sends switching receiving response information to the system framework;
and when the target resource type is consistent with the resource display state of the screen application, the screen application does not respond, or generates and sends switching refusal response information to the system framework.
5. The method of any of claims 1-4, wherein the system framework obtains a matched target control set according to the information fed back by the screen application, and controls each interface control in the target control set to switch to the target resource type, and completing the resource switching of the screen application comprises the steps of:
after receiving the information fed back by the screen application, the system framework analyzes the information fed back to obtain a resource attribute value of the screen application needing to switch resources;
the system framework judges whether a history control set matched with the attribute value of the target resource type exists or not according to the resource attribute value;
when the historical control set exists, the system framework determines that the historical control set is the target control set, controls each interface control in the target control set to be switched to the target resource type, and completes resource switching of the screen application;
and if the resource attribute value does not exist, the system framework judges whether the resource attribute value corresponding to each screen application responding to the system framework is matched with the attribute value of the target resource type, classifies and records all matched screen applications to obtain a corresponding target control set, controls each interface control in the target control set to be switched to the target resource type, and completes the resource switching of the screen application.
6, kinds of resources switching control system, which is characterized in that it includes system frame and several screen applications;
the screen application is used for monitoring a main screen resource switching broadcast sent by the system frame after the attribute expansion, judging to obtain a target resource type according to the main screen resource switching broadcast, and feeding back to the system frame according to the target resource type and the self resource display state;
and the system framework is used for obtaining a matched target control set according to the information fed back by the screen application, controlling each interface control in the target control set to be switched to the target resource type, and completing resource switching of the screen application.
7. The system for controlling switching of resources of claim 6, wherein said system framework comprises:
the acquisition module is used for acquiring resource display requirements;
the setting module is used for setting the replaceable resource attribute of the interface control and the corresponding resource switching mode thereof to complete attribute expansion according to the resource display requirement to obtain the system framework after the attribute expansion; the attribute extensions include a language attribute extension and a subject attribute extension.
8. The system for controlling switching of resources of claim 7, wherein said system framework further comprises:
the acquisition module is used for acquiring a resource switching instruction which is input by a user and aims at a main screen;
a generating module, configured to generate the main screen resource switching broadcast according to the resource switching instruction;
an communication module for sending the home screen resource switch cast to the screen application.
9. The switching control system of resources of claim 6, wherein the screen application comprises:
the analysis module is used for analyzing the type of the target resource obtained by the broadcasting of the main screen resource switching ;
processing module, which is used to generate the receiving switching response information when the target resource type is not in accordance with the self resource display state;
and the second communication module is used for sending the switching receiving response information to the system framework.
10. The system for controlling switching of resources of any of claims 6-9, wherein the system framework further comprises:
the analysis module is used for analyzing and obtaining a resource attribute value of the screen application needing to switch resources according to the feedback information after receiving the information fed back by the screen application;
the second processing module is used for judging whether a history control set matched with the attribute value of the target resource type exists according to the resource attribute value, and when the history control set exists, the system framework determines that the history control set is the target control set; when the resource attribute values do not exist, the system framework judges whether the resource attribute values corresponding to the screen applications responding to the system framework are matched with the attribute values of the target resource types, and classifies and records all matched screen applications to obtain corresponding target control sets;
and the control module is used for controlling each interface control in the target control set to be switched to the target resource type so as to complete resource switching of the screen application.
11, terminal device, comprising a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein the processor is used for executing the computer program stored in the memory and realizing the operations executed by the resource switching control method according to any of claims 1 to .
Storage medium of , wherein the storage medium stores at least instructions which are loaded and executed by a processor to implement the operations executed by the method of controlling switching of resources according to any of claims 1 to 5.
CN201911004328.XA 2019-10-22 2019-10-22 resource switching control method, system, terminal device and storage medium Pending CN110737487A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911004328.XA CN110737487A (en) 2019-10-22 2019-10-22 resource switching control method, system, terminal device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911004328.XA CN110737487A (en) 2019-10-22 2019-10-22 resource switching control method, system, terminal device and storage medium

Publications (1)

Publication Number Publication Date
CN110737487A true CN110737487A (en) 2020-01-31

Family

ID=69270756

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911004328.XA Pending CN110737487A (en) 2019-10-22 2019-10-22 resource switching control method, system, terminal device and storage medium

Country Status (1)

Country Link
CN (1) CN110737487A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111240792A (en) * 2020-02-10 2020-06-05 腾讯科技(深圳)有限公司 Theme switching method and device for user interface, terminal and storage medium
CN112172454A (en) * 2020-10-13 2021-01-05 上海博泰悦臻网络技术服务有限公司 Method and device for recommending content through air conditioner control screen
CN112395472A (en) * 2020-11-16 2021-02-23 北京乐学帮网络技术有限公司 Image display method and device, computer equipment and storage medium
CN113067854A (en) * 2021-03-12 2021-07-02 斑马网络技术有限公司 Method, device, equipment and storage medium for acquiring content resources of vehicle-mounted equipment
WO2021185235A1 (en) * 2020-03-20 2021-09-23 华为技术有限公司 Application display continuation method and device
CN113473230A (en) * 2021-07-02 2021-10-01 海信视像科技股份有限公司 Method for realizing channel switching by using third-party application and display equipment
CN114130016A (en) * 2021-12-07 2022-03-04 腾讯科技(深圳)有限公司 Control resource management method and related device
CN115002521A (en) * 2022-05-25 2022-09-02 三星电子(中国)研发中心 Multi-view resource allocation method and device
US11924496B2 (en) 2020-12-07 2024-03-05 Hisense Visual Technology Co., Ltd. Channel switching method for display apparatus, and display apparatus

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104516781A (en) * 2014-12-26 2015-04-15 北京元心科技有限公司 Operating system language switching method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104516781A (en) * 2014-12-26 2015-04-15 北京元心科技有限公司 Operating system language switching method and device

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111240792A (en) * 2020-02-10 2020-06-05 腾讯科技(深圳)有限公司 Theme switching method and device for user interface, terminal and storage medium
WO2021185235A1 (en) * 2020-03-20 2021-09-23 华为技术有限公司 Application display continuation method and device
CN115023935A (en) * 2020-03-20 2022-09-06 华为技术有限公司 Application display continuing method and device
CN115023935B (en) * 2020-03-20 2024-01-19 华为技术有限公司 Application display connection method, terminal equipment and storage medium
CN112172454B (en) * 2020-10-13 2023-11-10 上海博泰悦臻网络技术服务有限公司 Method and device for recommending content through air conditioner control screen
CN112172454A (en) * 2020-10-13 2021-01-05 上海博泰悦臻网络技术服务有限公司 Method and device for recommending content through air conditioner control screen
CN112395472A (en) * 2020-11-16 2021-02-23 北京乐学帮网络技术有限公司 Image display method and device, computer equipment and storage medium
US11924496B2 (en) 2020-12-07 2024-03-05 Hisense Visual Technology Co., Ltd. Channel switching method for display apparatus, and display apparatus
CN113067854A (en) * 2021-03-12 2021-07-02 斑马网络技术有限公司 Method, device, equipment and storage medium for acquiring content resources of vehicle-mounted equipment
CN113067854B (en) * 2021-03-12 2023-08-25 斑马网络技术有限公司 Method, device, equipment and storage medium for acquiring content resources of vehicle-mounted equipment
CN113473230A (en) * 2021-07-02 2021-10-01 海信视像科技股份有限公司 Method for realizing channel switching by using third-party application and display equipment
CN114130016A (en) * 2021-12-07 2022-03-04 腾讯科技(深圳)有限公司 Control resource management method and related device
CN114130016B (en) * 2021-12-07 2023-07-14 腾讯科技(深圳)有限公司 Control resource management method and related device
CN115002521A (en) * 2022-05-25 2022-09-02 三星电子(中国)研发中心 Multi-view resource allocation method and device
CN115002521B (en) * 2022-05-25 2024-05-03 三星电子(中国)研发中心 Multi-view resource allocation method and device

Similar Documents

Publication Publication Date Title
CN110737487A (en) resource switching control method, system, terminal device and storage medium
US20140179377A1 (en) Mobile electronic device having program notification function and program notification method thereof
US20220350624A1 (en) Control display method and electronic device
CN108337127B (en) Application performance monitoring method, system, terminal and computer readable storage medium
CN111309216B (en) List page display method and device, computer equipment and storage medium
EP2784661B1 (en) Computer program product, information processing method, and information processing apparatus
CN114385164A (en) Page generation and rendering method and device, electronic equipment and storage medium
CN107908679B (en) Script statement conversion method and device and computer readable storage medium
CN113645369A (en) Display method and device of multiple screens, computer readable storage medium and terminal
CN102663882B (en) Method and system for remotely controlling external screen through mobile terminal
WO2023179183A1 (en) Subprogram synchronization processing
CN109819329B (en) Window display method and smart television
CN112911359B (en) Resource display method, display equipment and remote controller
CN106897102B (en) Intelligent terminal working mode configuration method and device and intelligent terminal
CN113721936A (en) Application management method, intelligent terminal, device and storage medium
CN112905072B (en) Application processing method and device and electronic equipment
CN114564214A (en) Display device, application installation method, and storage medium
EP2763402B1 (en) Networked display with location dependent menus
US20190227956A1 (en) Output processing apparatus and output processing method
US12010356B2 (en) Method and apparatus for sending information in live broadcast room, and electronic device
CN115080889B (en) Display mode switching method and device
CN113542827B (en) Multi-channel data transmission method and display device
US20220408121A1 (en) Method and apparatus for sending information in live broadcast room, and electronic device
CN114201260A (en) Service display method, device, terminal, storage medium and program product
CN109144446B (en) Image display method, image display device, electronic equipment and computer readable storage medium

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