Module hot-swappable methods, devices, electronic equipment and storage media
By acquiring the audience attention data of mobile terminal service modules in target cities and dynamically adjusting the position of service modules, the problem of inflexible display effects of multiple services on mobile terminals is solved, and dynamic and flexible diversified display effects are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SOUNDAI TECH CO LTD
- Filing Date
- 2022-11-11
- Publication Date
- 2026-06-30
AI Technical Summary
When mobile terminals switch cities, the fixed order of displaying business modules in existing technologies results in a lack of dynamism and flexibility in the display of multiple services.
By responding to multi-service display commands, the system obtains the audience attention status of each service module in the target city. Based on this, it determines the service modules to be hot-swapped and their target locations, and adjusts the module positions through hot-swapping to ensure the dynamic and flexible positioning of the modules.
It achieves diverse effects for multi-service display on mobile terminal interfaces, making them dynamic and flexible, and improving the effectiveness and reliability of multi-service display.
Smart Images

Figure CN116166350B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of mobile Internet technology, and in particular to a module hot-swappable method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the continuous development of technology, mobile terminals can display the effects of different services for health software, and when the mobile terminal switches from one city to another, it can also display multiple services according to the current city.
[0003] In related technologies, when a mobile terminal displays different services due to a city switch, it customizes service modules to suit the current city by using some default modules. Although the default modules can support the display of different services in different cities, the setting position of each service module is fixed, which makes the display effect of each service on the mobile terminal page fixed as well. This results in a lack of dynamism and flexibility in the diverse display effects of multiple services. Summary of the Invention
[0004] This invention provides a module hot-swappable method, apparatus, electronic device, and storage medium to address the shortcomings of existing technologies where mobile terminals display different service effects in a fixed order of different service modules, resulting in a lack of dynamism and flexibility in the diverse display effects of multiple services. By hot-swapping to adjust the position of different service modules, the invention achieves the goal of making the diverse display effects of multiple services dynamic and flexible.
[0005] This invention provides a module hot-swap method, comprising:
[0006] Respond to multi-service display commands to obtain the audience attention status of each service module's corresponding service function in the currently switched target city;
[0007] Based on the audience attention and the current location of each of the business modules, determine the business module to be hot-swapped and the target location corresponding to the business module to be hot-swapped from the multiple business modules;
[0008] The hot-swappable service module is adjusted to the target location via hot-swapping.
[0009] According to a module hot-swap method provided by the present invention, before responding to the multi-service display command, the method further includes:
[0010] Obtain the business function requirements of the target city being switched to and the current default number of modules;
[0011] Identify target business modules that match the business function requirements and the number of modules;
[0012] Obtain multi-service display instructions for the target service module and existing service modules.
[0013] According to a module hot-swappable method provided by the present invention, determining the target business module that matches the business function requirements and the number of modules includes:
[0014] Based on the business function requirements and the number of modules, multiple business functions to be displayed are determined, and the number of business functions to be displayed is no greater than the number of modules.
[0015] Send a data instruction request to the server, the data instruction request being used to request the issuance of first data to implement the business function to be displayed and a first instruction to adjust the business function to be displayed;
[0016] Based on a pre-built data model, the first data and the first instruction issued by the server are encapsulated and processed; wherein, the data model is a model built according to the display effect requirements of the business functions to be displayed and the number of such business functions is the same.
[0017] The legality of the multiple target business modules determined after the encapsulation process is verified, and the target business modules that pass the legality verification are determined as the target business modules that match the business function requirements and the number of modules.
[0018] According to a module hot-swap method provided by the present invention, the method further includes:
[0019] Target business modules that fail the legality verification are filtered and deleted. Based on the data model corresponding to the target business modules that fail the legality verification, the corresponding matching data and matching instructions are determined from the first data and the first instructions and then re-encapsulated. This process continues until the legality verification of the target business modules determined after re-encapsulation is passed.
[0020] According to a module hot-swappable method provided by the present invention, the encapsulation processing of the first data and the first instruction issued by the server based on a pre-built data model includes:
[0021] The first data and the first instruction are parsed;
[0022] Using the second data and second instructions obtained from parsing the first data and the first instruction, the missing fields of the data model are filled in, while the UI components required to display the second data and the second instruction are mapped and encapsulated.
[0023] Each UI component is bound to and nested with the corresponding data displayed in the second data and the corresponding instruction displayed in the second instruction.
[0024] According to a module hot-swap method provided by the present invention, the method further includes:
[0025] When it is determined that the data interfaces for issuing the first data and the first instruction conform to the preset interface protocols, encapsulation processing instructions for the first data and the first instruction are generated.
[0026] According to a module hot-swappable method provided by the present invention, when the audience attention situation is audience attention level, the step of determining the business module to be hot-swapped and the target location corresponding to the business module from a plurality of business modules based on the audience attention situation and the current location of each business module includes:
[0027] Sort the audience attention levels of the multiple groups by size;
[0028] Based on the ranking results, the business modules to be hot-swapped are determined from the multiple business modules corresponding to the multiple audience attention levels.
[0029] Based on the sorting results and the current position of each of the service modules, the target position corresponding to the service module to be hot-swapped is determined.
[0030] According to a module hot-swappable method provided by the present invention, the step of responding to a multi-service display command and obtaining the audience attention status of the corresponding service function of each service module in the target city of the current switch includes:
[0031] Respond to multi-service display commands and monitor the audience attention of each service module's corresponding service function in the target city of the current switch;
[0032] Get the audience attention of each business module's corresponding business function in the target city where it is currently switched within a preset time period.
[0033] The present invention also provides a module hot-swap device, comprising:
[0034] The acquisition unit is used to respond to multi-service display commands and acquire the audience attention status of each service module's corresponding service function in the target city currently being switched.
[0035] The determining unit is used to determine, based on the audience attention situation and the current position of each of the business modules, the business module to be hot-swapped and the target position corresponding to the business module to be hot-swapped from the multiple business modules;
[0036] A hot-swap unit is used to adjust the service module to be hot-swap to the target position by hot-swapping.
[0037] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the module hot-plugging method as described above.
[0038] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the module hot-plugging method as described above.
[0039] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the module hot-plugging method as described above.
[0040] The present invention provides a module hot-swappable method, apparatus, electronic device, and storage medium. In the module hot-swappable method, the mobile terminal first responds to a multi-service display command and obtains the audience attention status of each service module's corresponding service function in the target city of the current switch. Then, based on the audience attention status and the current position of each service module, it determines the service module to be hot-swapped and its corresponding target position from among multiple service modules, so as to adjust the service module to be hot-swapped to the target position via hot-swapping. This method of adjusting the position of different service modules through hot-swapping ensures that each service module has the possibility of being adjusted through hot-swapping, thereby achieving the goal of dynamic and flexible display effects for diverse services on the mobile terminal interface. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0042] Figure 1 This is one of the flowcharts illustrating the module hot-swap method provided by the present invention;
[0043] Figure 2 This is the second flowchart illustrating the module hot-swap method provided by the present invention;
[0044] Figure 3 This is an architecture diagram of the module hot-swappable method provided by the present invention;
[0045] Figure 4 This is a class diagram illustrating the architecture design of the module hot-swappable method provided by this invention.
[0046] Figure 5 This is a schematic diagram of the module hot-swap device provided by the present invention;
[0047] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0049] The following is combined Figures 1-6 This invention describes a module hot-swapping method, apparatus, electronic device, and storage medium. The module hot-swapping method can be performed by a mobile terminal, which can be a smartphone, portable device, laptop, tablet, portable wearable device, or other electronic device. The mobile terminal possesses at least model building, module registration, data request, data receiving, information display, and data processing functions. This invention does not limit the specific form of the mobile terminal.
[0050] Reference Figure 1 This is a flowchart illustrating the module hot-swap method provided by the present invention, as shown below. Figure 1 As shown, the hot-swap method for this module includes the following steps:
[0051] Step 110: Respond to the multi-service display command and obtain the audience attention status of each service module's corresponding service function in the target city of the current switch.
[0052] The multi-service display command can be an instruction to display multiple different services on a preset page, which can be determined by the preset application being opened. For example, if the preset application is a health application, the preset page can be the homepage of the health application. In this case, the multi-service display command can be an instruction to display different services on the homepage of the health application. Each service module corresponds to a service function, and multiple service functions can simultaneously display the effects of different services to the user in response to the multi-service display command.
[0053] Specifically, when a pre-installed application on a mobile terminal receives a user's click or touch operation, it can generate a multi-service display instruction for a pre-installed page of the application, displaying multiple services. Upon responding to the multi-service display instruction, it obtains the audience attention data for each service module's corresponding service function in the currently switched target city. That is, the service function corresponding to each service module is applicable to all users in the target city. Users in the target city can view the corresponding service function according to their actual needs, or browse the corresponding service function based on other users' sharing or recommendations; thus, it obtains the audience attention data for each service function in the target city. The audience attention data is determined based on the attention paid to each service module's corresponding service function by different users in the target city. Specifically, the audience attention data can be determined based on the number of views, viewing duration, number of shares, and / or forwardings of each service function by different users in the target city recorded by the mobile terminal. No specific limitations are specified here.
[0054] Step 120: Based on audience attention and the current location of each business module, determine the business module to be hot-swapped and its corresponding target location from among multiple business modules.
[0055] Specifically, based on the audience attention of each business function corresponding to each business module in the target city of the current switch, the mobile terminal can analyze the number of times each business function is viewed, the duration of each view, the number of shares and / or forwards. Based on the number of views, the duration of each view, the number of shares and / or forwards, the degree of interest of different users in the business function corresponding to each business module can be determined. Based on the different degrees of interest, at least two business modules among multiple business modules need to be repositioned, and these at least two business modules are identified as hot-swappable business modules. The target position of each hot-swappable business module can be determined based on the position of the business module corresponding to the change in the degree of interest from high to low. For example, on a preset page of a mobile terminal, there are 5 services, and the 5 service functions are arranged from top to bottom as service function 1, service function 2, service function 3, service function 4, and service function 5. The interest level of service function 1 is 70%, that of service function 2 is 95%, that of service function 3 is 90%, that of service function 4 is 90%, and that of service function 5 is 96%. At this time, it can be determined that service module 1 corresponding to service function 1 is service module 1 to be hot-swapped, service module 5 corresponding to service function 5 is service module 2 to be hot-swapped, the target position corresponding to service module 1 to be hot-swapped is the current position of service module 5, and the target position corresponding to service module 2 to be hot-swapped is the current position of service function 1. In this way, the purpose of complete hot-swapping of any order and combination of service modules 1 to 5 can be achieved.
[0056] Step 130: Adjust the service module to be hot-swapped to the target location via hot-swapping.
[0057] Specifically, the mobile terminal, for the identified hot-swappable service modules and their corresponding target locations, adjusts each hot-swappable service module from its current location to the corresponding target location through hot-swapping.
[0058] According to the module hot-swappable method provided by the present invention, the mobile terminal first responds to a multi-service display command and obtains the audience attention status of the corresponding service function of each service module in the target city of the current switch; then, based on the audience attention status and the current position of each service module, it determines the service module to be hot-swapped and its corresponding target position from among multiple service modules, so as to adjust the service module to be hot-swapped to the target position through hot-swapping. By using hot-swapping to adjust the position of different service modules, it ensures that each service module has the possibility of being adjusted through hot-swapping, thereby achieving the goal of dynamic and flexible display effects of multiple services on the mobile terminal interface.
[0059] Optionally, prior to step 110, the method may further include:
[0060] First, obtain the business function requirements and the current default number of modules for the target city being switched to; then, further determine the target business modules that match the business function requirements and the number of modules; then, obtain multi-service display instructions for the target business modules and existing business modules.
[0061] Specifically, since the services displayed by the same health application on a mobile terminal often differ across cities, when a mobile terminal switches from one city to a target city, it can first obtain the service function requirements and the current default number of modules for the target city. The service function requirements can be determined based on the geographical requirements of the target city and the service functions suitable for that city. The current default number of modules can be the number of vacant modules reserved by the mobile terminal for the different cities being switched to; each vacant module is used to store a newly created service module based on the service function requirements. The mobile terminal then identifies the target service modules that match the service function requirements and the number of modules, and can construct target service modules that match the number of modules based on the service function requirements. The number of target service modules is the same as the number of service functions to be displayed.
[0062] The module hot-swap method provided by this invention improves the effectiveness and reliability of obtaining multi-service display instructions by first determining the newly constructed target service module based on the current default number of modules and the service function requirements of the target city, and then obtaining multi-service display instructions for the target service module and existing service modules.
[0063] Optionally, target business modules that match the business function requirements and the number of modules can be identified, and their implementation process may include:
[0064] First, based on business function requirements and the number of modules, multiple business functions to be displayed are identified, with the number of business functions not exceeding the number of modules. Next, a data instruction request is sent to the server. This request requests the issuance of first data to implement the business functions to be displayed and first instructions to adjust those functions. Further, based on a pre-built data model, the first data and instructions issued by the server are encapsulated. This data model is constructed according to the display effect requirements of the business functions to be displayed and is the same as the number of business functions to be displayed. Then, the multiple target business modules identified after encapsulation are validated for legality. Target business modules that pass the validity validation are identified as those matching the business function requirements and the number of modules.
[0065] Here, "server" can refer to a single server, or a server cluster consisting of multiple servers, a cloud computing center, etc. The specific form of the server is not limited here.
[0066] Specifically, the first data sent by the mobile terminal to the server includes all data for implementing the corresponding business function to be displayed, and the first instruction includes instructions for adjusting the order of business modules, switching the business display type, and toggling whether to display the function. Furthermore, the number of business functions to be displayed is at least one, and each business function corresponds to a business module to be registered. Based on this, the mobile terminal can first register the corresponding business modules for the business functions to be displayed. That is, it registers according to the specific content to be displayed by the business functions, constructs a data model that meets the display effect requirements of each business function, and sends a data instruction request to the server after registration. When the mobile terminal receives the first data and the first instruction from the server, it encapsulates the data corresponding to each business function in the first data and the instruction corresponding to each business function in the first instruction into the data model. Then, it performs legality verification on the multiple target business modules determined after encapsulation. The legality verification judgment includes judging whether there are missing fields in the encapsulated data and / or instructions of each target business module. If there are no missing fields in the encapsulated data and / or instructions, the corresponding target business module can be determined to have passed the legality verification. The target business modules that have passed the legality verification are determined as the target business modules that match the business function requirements and the number of modules.
[0067] The module hot-swappable method provided by this invention involves a mobile terminal taking the first data from the server to implement the business function to be displayed and the first instruction to adjust the business function to be displayed. The mobile terminal first encapsulates the data based on the data model and then performs a legality verification on the target business module obtained from the encapsulation process. The target business module that passes the legality verification is determined to be the target business module that matches the business function requirements and module data. This method, combined with the default module and legality verification, improves the effectiveness and reliability of the target business module.
[0068] Optionally, the method of the present invention may further include:
[0069] Target business modules that fail the legality verification are filtered and deleted. Based on the data model corresponding to the target business modules that fail the legality verification, the corresponding matching data and matching instructions are determined from the first data and the first instruction, and then re-encapsulated. This process continues until the legality verification of the target business modules determined after re-encapsulation is passed.
[0070] Specifically, when the validity verification involves checking for missing fields in the encapsulated data and / or instructions of each target business module, if a missing field exists in the encapsulated data and / or instructions of a target business module, then that target business module is determined to have failed the validity verification. For example, if the id of target business module A is missing, target business module A is determined to be invalid and has failed the validity verification. In this case, corresponding matching data and matching indicators can be determined for the target business module that failed the validity verification, and then the encapsulation process can be repeated until the target business module determined after re-encapsulation passes the validity verification.
[0071] The module hot-swappable method provided by this invention involves the mobile terminal filtering and deleting target business modules that fail the legality verification, determining the corresponding matching data and matching instructions based on the data model of the target business modules that fail the legality verification, and then re-encapsulating the modules based on the matching data and matching instructions. This ensures that the number of target business modules built by the mobile terminal for the target city is consistent with the number of business functions to be displayed, thereby effectively improving the diversity and reliability of multi-service display on the mobile terminal in the target city.
[0072] Optionally, based on a pre-built data model, the first data and first instructions issued by the server are encapsulated and processed, including:
[0073] First, the first data and the first instruction are parsed. Then, the second data and the second instruction obtained from parsing the first data and the first instruction are used to fill the missing fields of the data model, while mapping and encapsulating the UI components required to display the second data and the second instruction. Each UI component is bound to and nested with the corresponding data to be displayed in the second data and the corresponding instruction to be displayed in the second instruction.
[0074] Specifically, since the first data and first instruction sent by the server are large data segments in JSON format, they cannot be directly encapsulated and processed into the corresponding data model. Therefore, it is necessary to parse the first data and first instruction into second data and second instructions that can be populated into the data model. Furthermore, while using the second data and second instructions to populate the corresponding data model, the UI components required to display the second data and second instructions can also be mapped and encapsulated. Each UI component is bound to the corresponding data to be displayed in the second data and the corresponding instruction to be displayed in the second instruction. They can be nested and mapped first, and then encapsulated to achieve the purpose of displaying nested details or branch content in a certain content, as well as adjusting its display method.
[0075] The hot-swappable module method provided by this invention, in a mobile terminal, first parses first data and a first field into second data and a second instruction that meet the requirements of fillable fields in a data model, and then fills the second data and the second instruction into the corresponding data model. Simultaneously, it maps and encapsulates the UI components required to display the second data and the second instruction, thereby improving the effectiveness and reliability of encapsulating the second data and the second instruction into the data model.
[0076] Optionally, before encapsulating the first data and first instruction issued by the server, the method may further include:
[0077] When it is determined that the data interfaces for issuing the first data and the first instruction conform to the pre-defined interface protocols, encapsulation processing instructions for the first data and the first instruction are generated.
[0078] Specifically, when the mobile terminal receives the first data and the first instruction sent by the server, it first determines whether the data interface of the first data and the first instruction conforms to the pre-set interface protocol, that is, it performs a legality check on the first data and the first instruction; if the data interface of the first data and / or the first instruction does not conform to the pre-set interface protocol, the process ends; otherwise, if the data interface of the first data and the first instruction conforms to the pre-set interface protocol, it is considered that the first data and the first instruction are legal and can be further processed, and encapsulated processing instructions for the first data and the first instruction are generated.
[0079] The hot-swappable module method provided by this invention allows the mobile terminal to verify the legality of the data interface by receiving first data and first instructions from the server. When the legality verification is successful, it generates encapsulated processing instructions for the first data and first instructions. This improves the legality and validity of the first data and first instructions, ensures the operability of building new business modules based on the first data and first instructions, and also ensures that the business display effect of the newly built business model meets the business function requirements. This lays the foundation for the subsequent realization of flexible and dynamic diversified display effects for multiple services.
[0080] Optionally, when the audience attention situation is referred to as audience attention level, the specific implementation process of step 120 may include:
[0081] First, the attention levels of multiple audiences are sorted by size; then, based on the sorting results, the business modules to be hot-swapped are determined from the multiple business modules corresponding to the multiple audience attention levels; finally, based on the sorting results and the current position of each business module, the target position corresponding to the business module to be hot-swapped is determined.
[0082] Specifically, the mobile terminal first sorts the audience attention of each service module's corresponding service function in the target city of the current switch based on the audience attention of multiple audience attention levels from highest to lowest, and then determines the service module to be hot-swapped based on the sorting results. For example, if the mobile terminal's preset page contains 10 services and the 10 service functions are arranged from top to bottom as service function 1, service function 2, service function 3, service function 4, service function 5, service function 6, service function 7, service function 8, service function 9, and service function 10, and if the audience attention of service function 1 is 77%, service function 2 is 88%, service function 3 is 70%, service function 4 is 92%, service function 5 is 68%, service function 6 is 50%, and service function 7 is 68%, service function 8 is 50%, and service function 9 is 10%, then the mobile terminal first sorts the audience attention of multiple services from highest to lowest, and then determines the service module to be hot-swapped based on the sorting results. The audience attention rate for function 7 is 42%, for function 8 it is 36%, for function 9 it is 28%, and for function 10 it is 19%. After sorting the 10 audience attention rates from highest to lowest, we can determine that function 1 corresponds to function module 1 which is hot-swappable, function 3 corresponds to function module 3 which is hot-swappable, and function 4 corresponds to function module 4 which is hot-swappable. Furthermore, based on the sorting results and the current position of each function module, we determine the target position of the hot-swappable function module. For example, if the sorting result is 92% > 88% > 77% > 70% > 68% > 50% > 42% > 36% > 28% > 19%, based on the current position of each of the 10 business modules when the 10 business functions are arranged from top to bottom, it can be determined that the target position of the business module 1 to be hot-swapped is the current position of business module 3, the target position of the business module 2 to be hot-swapped is the current position of business module 4, and the target position of the business module 3 to be hot-swapped is the current position of business function 1.
[0083] The module hot-swappable method provided by this invention involves a mobile terminal determining the business module to be hot-swapped from multiple business modules based on the ranking results of audience attention for each business function in the target city. Then, by combining the current location of each business module, the target location corresponding to the business module to be hot-swapped is determined. This method, combined with the comparative analysis of audience attention for different business functions, improves the flexibility and accuracy of determining the business module to be hot-swapped.
[0084] Optionally, the specific implementation process of step 110 may include:
[0085] First, respond to multi-service display commands and monitor the audience attention of each service module's corresponding service function in the currently switched target city; then, obtain the audience attention of each service module's corresponding service function in the currently switched target city within a preset time period.
[0086] Specifically, after responding to a multi-service display command, the mobile terminal's preset page can simultaneously display multiple service functions and monitor, in real-time or periodically, the audience attention for each service module's corresponding function in the target city. For example, if different users in the target city open the preset page and browse, view, and / or use service function A, it indicates that service function A has received audience attention and the audience attention is good. Conversely, if different users in the target city open the preset page but do not browse, view, or use service function B, it indicates that service function B has not received audience attention and the audience attention is poor. Based on this, the mobile terminal can obtain the audience attention for each service module's corresponding function in the target city within a preset time period. For example, it can obtain the number of times each of the 10 service functions on the preset page has been viewed, the duration of each view, and the number of times it has been forwarded or shared within the preset time period. This allows for subsequent determination of which service modules can be repositioned as hot-swappable service modules based on the audience attention of each service function within the preset time period. The number of views can be determined based on the number of times the same user views the content within a preset time period and the number of times different users view the content within the preset time period; the preset time period can be the same as or longer than the monitoring period. No specific limitation is made here.
[0087] The module hot-swap method provided by this invention allows the mobile terminal to obtain the audience attention status of each service module's corresponding service function in the target city within a preset time period by monitoring the audience attention status of each service function in the target city of the current switch after responding to the multi-service display command. This provides a reliable guarantee for accurately and effectively determining the service modules to be hot-swap in the future.
[0088] Reference Figure 2 This is the second flowchart illustrating the hot-swappable module method provided by the present invention. Figure 2In this process, the mobile terminal first initializes the graphical user interface (GUI). The system uses an Interface (GUI) unit to determine the number of modules currently in use and to obtain the business functions to be displayed that match the target city being switched. It then registers the corresponding business modules for each business function, including the specific content required for that function, and constructs a data model matching it. Next, it sends a data instruction request to the server and determines whether the data interface of the first data and first instruction sent by the server conforms to a pre-defined interface protocol. If it conforms, it performs encapsulation processing on the first data and first instruction; otherwise, it terminates the process. Further, based on the pre-built data model, it encapsulates the first data and first instruction, verifies the legality of the multiple target business modules determined after encapsulation, and inputs the legally valid target business modules into the business display layer for subsequent multi-business display. Target modules that fail legality verification are filtered and deleted. For the data model corresponding to the target business modules that fail legality verification, the system determines the corresponding matching data and matching instructions from the first data and first instruction and re-encapsulates them. This process continues until the legality verification of the target business modules determined after re-encapsulation is passed. The mobile terminal's service presentation layer displays multiple services for the received target service module and existing service modules; the specific process involved can be referred to in the aforementioned embodiments, and will not be repeated here.
[0089] Reference Figure 3 This is an architecture diagram of the module hot-swappable method provided by the present invention. Figure 3 In this context, the mobile terminal includes a network architecture, a data processor, an output storage device, a GUI display layer, and an underlying server. The network architecture provides network components for requesting first data and first instructions from the server. The data processor parses, encapsulates, verifies data interfaces, and validates the validity of the first data and first instructions. The data storage device stores the data processed by the data processor. The underlying server provides data support for the data processor and the GUI display, including dictionaries, arrays, and linked lists. The server includes a big data management platform, which responds to data instruction requests sent by the mobile terminal and provides feedback on the first data and first instructions to the mobile terminal. The specific processes involved can be referred to in the aforementioned embodiments and will not be repeated here.
[0090] Reference Figure 4 This is a class diagram illustrating the architecture design of the hot-swappable module method provided by the present invention. Figure 4In this framework, ViewController is the view controller used to control the display of preset pages on the mobile terminal; Managerinterface is the manager interface applicable to abstract interface protocols; Moduleinterface is the module interface applicable to abstract module protocols; NetworkAPI is the network application interface used to provide access to the database, such as byte library functions, byte manipulation functions, address translation functions, and test descriptor types; Disk is the disk used to store various data; BusinessManager 1, ..., BusinessManager n are n business managers used to manage n business functions on n preset pages; View, Cell, and ViewModel are the three elements constituting a business module. ViewModel is used to store user input validation logic, view display logic, network request initiation, and various other types of code.
[0091] The module hot-swap device provided by the present invention is described below. The module hot-swap device described below can be referred to in correspondence with the module hot-swap method described above.
[0092] Reference Figure 5 This is a schematic diagram of the module hot-swap device provided by the present invention, as shown below. Figure 5 As shown, the module hot-swap device 500 includes:
[0093] The acquisition unit 510 is used to respond to multi-service display instructions and acquire the audience attention status of each service module's corresponding service function in the target city of the current switch.
[0094] The determining unit 520 is used to determine the hot-swappable business module and the target location corresponding to the hot-swappable business module from multiple business modules based on audience attention and the current location of each business module.
[0095] The hot-swap unit 530 is used to adjust the service module to be hot-swap to the target position by hot-swapping.
[0096] Optionally, the acquisition unit 510 can also be used to acquire the business function requirements of the target city currently being switched and the current default number of modules; determine the target business module that matches the business function requirements and the number of modules; and acquire multi-service display instructions for the target business module and existing business modules.
[0097] Optionally, the determining unit 520 can also be used to determine multiple business functions to be displayed based on business function requirements and the number of modules, wherein the number of business functions to be displayed is no greater than the number of modules; send a data instruction request to the server, the data instruction request being used to request the issuance of first data to implement the business functions to be displayed and first instructions to adjust the business functions to be displayed; encapsulate the first data and first instructions issued by the server based on a pre-built data model; wherein the data model is a model constructed according to the display effect requirements of the business functions to be displayed and is the same as the number of business functions to be displayed; perform legality verification on the multiple target business modules determined after encapsulation, and determine the target business modules that pass the legality verification as the target business modules that match the business function requirements and the number of modules.
[0098] Optionally, the determining unit 520 can also be used to filter and delete target business modules that fail the legality verification, and based on the data model corresponding to the target business modules that fail the legality verification, determine the corresponding matching data and matching instructions from the first data and the first instructions and then re-encapsulate them; until the legality verification of the target business modules determined after re-encapsulation is passed.
[0099] Optionally, the determining unit 520 can also be used to parse the first data and the first instruction; using the second data and the second instruction obtained from parsing the first data and the first instruction to fill the missing fields of the data model, while mapping and encapsulating the UI components required to display the second data and the second instruction; wherein each UI component is bound to and nested with the corresponding data displayed in the second data and the corresponding instruction displayed in the second instruction.
[0100] Optionally, the determining unit 520 can also be used to generate encapsulation processing instructions for the first data and the first instruction when the data interfaces for issuing the first data and the first instruction respectively conform to the preset interface protocols.
[0101] Optionally, the determining unit 520 can also be used to sort multiple audience attention levels by size; based on the sorting results, determine the business module to be hot-swapped from multiple business modules corresponding to multiple audience attention levels; and based on the sorting results and the current position of each business module, determine the target position corresponding to the business module to be hot-swapped.
[0102] Optionally, the acquisition unit 510 can be used to respond to multi-service display instructions, monitor the audience attention of each service module's corresponding service function in the currently switched target city, and acquire the audience attention of each service module's corresponding service function in the currently switched target city within a preset time period.
[0103] Figure 6An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6 As shown, the electronic device 600 may include: a processor 610, a communication interface 620, a memory 630, and a communication bus 640, wherein the processor 610, the communication interface 620, and the memory 630 communicate with each other through the communication bus 640. The processor 610 can call logical instructions in the memory 630 to execute a module hot-plugging method, which includes:
[0104] Respond to multi-service display commands to obtain the audience attention status of each service module's corresponding service function in the currently switched target city;
[0105] Based on audience attention and the current location of each business module, determine the business module to be hot-swapped and its corresponding target location from multiple business modules.
[0106] The business modules to be hot-swapped are adjusted to the target location via hot-swapping.
[0107] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0108] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program that can be stored on a non-transitory computer-readable storage medium, wherein when the computer program is executed by a processor, the computer is capable of executing the module hot-plugging method provided by the above methods, the method comprising:
[0109] Respond to multi-service display commands to obtain the audience attention status of each service module's corresponding service function in the currently switched target city;
[0110] Based on audience attention and the current location of each business module, determine the business module to be hot-swapped and its corresponding target location from multiple business modules.
[0111] The business modules to be hot-swapped are adjusted to the target location via hot-swapping.
[0112] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the module hot-plugging method provided by the methods described above, the method comprising:
[0113] Respond to multi-service display commands to obtain the audience attention status of each service module's corresponding service function in the currently switched target city;
[0114] Based on audience attention and the current location of each business module, determine the business module to be hot-swapped and its corresponding target location from multiple business modules.
[0115] The business modules to be hot-swapped are adjusted to the target location via hot-swapping.
[0116] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0117] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0118] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A module hot-swappable method, characterized in that, include: Respond to multi-service display commands to obtain the audience attention status of each service module's corresponding service function in the currently switched target city; Based on the audience attention and the current location of each of the business modules, determine the business module to be hot-swapped and the target location corresponding to the business module to be hot-swapped from the multiple business modules; The hot-swappable service module is adjusted to the target location via hot-swapping. Prior to responding to the multi-service display instruction, the method further includes: Obtain the business function requirements of the target city being switched to and the current default number of modules; Based on the business function requirements and the number of modules, multiple business functions to be displayed are determined, and the number of business functions to be displayed is no greater than the number of modules. Send a data instruction request to the server, the data instruction request being used to request the issuance of first data to implement the business function to be displayed and a first instruction to adjust the business function to be displayed; Based on a pre-built data model, the first data and the first instruction issued by the server are encapsulated and processed; wherein, the data model is a model built according to the display effect requirements of the business functions to be displayed and the number of such business functions is the same. The legality of the multiple target business modules determined after the encapsulation process is verified, and the target business modules that pass the legality verification are determined as the target business modules that match the business function requirements and the number of modules. Obtain multi-service display instructions for the target service module and existing service modules; The process of encapsulating the first data and the first instruction issued by the server based on the pre-built data model includes: The first data and the first instruction are parsed; Using the second data and second instructions obtained from parsing the first data and the first instruction, the missing fields of the data model are filled in, while the UI components required to display the second data and the second instruction are mapped and encapsulated. Each UI component is bound to and nested with the corresponding data displayed in the second data and the corresponding instruction displayed in the second instruction.
2. The module hot-swap method according to claim 1, characterized in that, The method further includes: Target business modules that fail the legality verification are filtered and deleted. Based on the data model corresponding to the target business modules that fail the legality verification, the corresponding matching data and matching instructions are determined from the first data and the first instructions and then re-encapsulated. This process continues until the legality verification of the target business modules determined after re-encapsulation is passed.
3. The module hot-swap method according to claim 1, characterized in that, The method further includes: When it is determined that the data interfaces for issuing the first data and the first instruction conform to the preset interface protocols, encapsulation processing instructions for the first data and the first instruction are generated.
4. The module hot-swap method according to any one of claims 1 to 3, characterized in that, When the audience attention status is defined as audience attention level, the step of determining the hot-swappable business module and its corresponding target location from among the multiple business modules based on the audience attention status and the current location of each business module includes: Sort the audience attention levels of the multiple groups by size; Based on the ranking results, the business modules to be hot-swapped are determined from the multiple business modules corresponding to the multiple audience attention levels. Based on the sorting results and the current position of each of the service modules, the target position corresponding to the service module to be hot-swapped is determined.
5. The module hot-swap method according to any one of claims 1 to 3, characterized in that, The response to the multi-service display command, obtaining the audience attention status of each service module's corresponding service function in the currently switched target city, includes: Respond to multi-service display commands and monitor the audience attention of each service module's corresponding service function in the target city of the current switch; Get the audience attention of each business module's corresponding business function in the target city where it is currently switched within a preset time period.
6. A module hot-swap device, characterized in that, include: The acquisition unit is used to respond to multi-service display commands and acquire the audience attention status of each service module's corresponding service function in the target city currently being switched. The determining unit is used to determine, based on the audience attention situation, a business module to be hot-swapped from a plurality of business modules, and to determine the target location corresponding to the business module to be hot-swapped; A hot-swap unit is used to adjust the service module to be hot-swap to the target position by hot-swapping. The acquisition unit is also used to acquire the business function requirements of the target city currently being switched and the current default number of modules; determine the target business module that matches the business function requirements and the number of modules; and acquire multi-service display instructions for the target business module and existing business modules. The determining unit is further configured to: determine multiple business functions to be displayed based on business function requirements and the number of modules, wherein the number of business functions to be displayed is no greater than the number of modules; send a data instruction request to the server, wherein the data instruction request is used to request the issuance of first data to implement the business functions to be displayed and a first instruction to adjust the business functions to be displayed; encapsulate the first data and the first instruction issued by the server based on a pre-built data model; wherein the data model is a model constructed according to the display effect requirements of the business functions to be displayed and is the same as the number of business functions to be displayed; perform legality verification on the multiple target business modules determined after encapsulation, and determine the target business modules that pass the legality verification as target business modules that match the business function requirements and the number of modules; wherein the determining unit is further configured to: parse the first data and the first instruction; use the second data and the second instruction obtained from parsing the first data and the first instruction to fill the missing fields of the data model, while mapping and encapsulating the UI components required to display the second data and the second instruction; wherein each UI component is bound to and nested with the corresponding data to be displayed in the second data and the corresponding instruction to be displayed in the second instruction.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the module hot-plugging method as described in any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the module hot-plugging method as described in any one of claims 1 to 5.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the module hot-plugging method as described in any one of claims 1 to 5.