Card updating method and device, equipment, storage medium and program product
Through the MQTT communication and connection between the end side and the cloud side, data update and replacement of cards are realized, which solves the problem of single card update scenarios and dependence on host applications in the prior art, and improves the flexibility and adaptability of card updates.
Patent Information
- Application Number
- CN202411022824.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-11-26
AI Technical Summary
In the prior art, the card data update scenario is single, and multiple application scenarios cannot be adapted to, and the host application needs to be updated during updates, which lacks flexibility.
The message queue is established with the cloud side and the message queue to transmit MQTT communication connection, subscribe to card information, and push card data, to realize the update of part of the data of the source card or the replacement of the entire card without the need to update the host application.
It improves the flexibility of card updates, can adapt to multiple application scenarios, simplifies the card update process, and reduces dependence on host applications.
Smart Images

Figure CN119030966A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a card updating method, device, equipment, storage medium and program product. Background Art
[0002] Currently, most terminal devices provide card functions, which can display more key information elements to users, such as schedule, weather, music player, video player, medical registration and other cards.
[0003] In the prior art, the card data update scenario is relatively single and cannot adapt to more scenarios. It can only update the data of a single card, and it is even more impossible to switch the entire card. The card depends on the system application. When updating the card, the host application needs to be updated, which lacks flexibility. Summary of the invention
[0004] The present invention provides a card updating method, device, equipment, storage medium and program product, which can not only update part of the card data of the source card, but also replace the entire source card, so as to adapt to multiple application scenarios without updating the host application, thereby improving the flexibility of card updating.
[0005] In the first aspect, an embodiment of the present disclosure provides a card update method, including: establishing a message queue telemetry transmission MQTT communication connection between the terminal side and the cloud side, and subscribing to card information from the cloud side; the cloud side pushes card data to the terminal side based on the card information; wherein the card data includes card update data, the source card name to be updated, and the target card name to be updated; the card update data includes the card data to be updated or a new card file link; if the card update data includes the card data to be updated, the terminal side determines whether the source card to be updated is running based on the source card name to be updated; if the source card to be updated is running, the card data is published; the running source card is updated based on the card data; if the card update data includes a new card file link, the terminal side downloads a new card file based on the new card file link; when the new card file is downloaded, the terminal side loads the new card file and replaces the source card file corresponding to the source card name to be updated.
[0006] In a second aspect, the disclosed embodiment also provides a card updating device, including: a cloud-side subscription module, used for establishing a message queue telemetry transmission MQTT communication connection between the terminal side and the cloud side, and the terminal side subscribes to the card information from the cloud side; a card data push module, used for the cloud side to push card data to the terminal side based on the card information; wherein the card data includes card update data, the source card name to be updated, and the target card name to be updated; the card update data includes the card data to be updated or a new card file link; a card query module, used for, if the card update data includes the card data to be updated, the terminal side based on the card information The name of the source card to be updated is used to determine whether the source card to be updated is in operation; a data publishing module is used to publish card data if the source card to be updated is in operation; an update module is used to update the running source card based on the card data; a download module is used to download a new card file based on the new card file link if the card update data includes a new card file link; a new card file loading module is used to load the new card file on the end side when the new card file is downloaded, and replace the source card file corresponding to the name of the source card to be updated.
[0007] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the card update method as described in the embodiment of the present disclosure.
[0008] In a fourth aspect, an embodiment of the present disclosure further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the card update method as described in the embodiment of the present disclosure.
[0009] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, including a computer program, which, when executed by a processor, implements the card update method as described in the embodiment of the present disclosure.
[0010] The technical solution of the embodiment of the present disclosure is that the terminal side and the cloud side establish a message queue telemetry transmission MQTT communication connection, and the terminal side subscribes to card information from the cloud side; the cloud side pushes card data to the terminal side based on the card information; wherein the card data includes card update data, the source card name to be updated and the target card name to be updated; the card update data includes the card data to be updated or a new card file link; if the card update data includes the card data to be updated, the terminal side determines whether the source card to be updated is running based on the source card name to be updated; if the source card to be updated is running, the card data is published; the running source card is updated based on the card data; if the card update data includes a new card file link, the terminal side downloads a new card file based on the new card file link; when the new card file is downloaded, the terminal side loads the new card file and replaces the source card file corresponding to the source card name to be updated. The disclosed embodiment can not only update part of the card data of the source card, but also replace the entire source card, thereby adapting to multiple application scenarios without updating the host application, thereby improving the flexibility of card updates. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0012] Figure 1 A schematic flow chart of a card updating method provided by an embodiment of the present invention;
[0013] Figure 2 A schematic flow chart of another card updating method provided by an embodiment of the present invention;
[0014] Figure 3 A schematic diagram of the structure of a card updating device provided in an embodiment of the present disclosure;
[0015] Figure 4 The present invention is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0016] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0017] It should be understood that the various steps recorded in the method implementation of the present disclosure can be performed in different orders and / or in parallel. In addition, the method implementation may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect. The term "including" and its variations used herein are open inclusions, that is, "including but not limited to". It should be noted that the concepts of "first", "second", etc. mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units. It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative and not restrictive, and those skilled in the art should understand that unless otherwise clearly stated in the context, it should be understood as "one or more". It is understandable that the data involved in the present technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of the corresponding laws, regulations and relevant provisions.
[0018] Figure 1 A flowchart of a card update method provided in an embodiment of the present invention, the disclosed embodiment is applicable to the situation where the end-side card is updated, wherein the end-side can be understood as the client, and the client can be a mobile terminal, a watch, a PC terminal, etc., and this embodiment does not limit this. The operating system installed on the client can be any operating system, preferably the Hongmeng operating system. The principle of the technical solution provided by the present invention is: based on the card data to be updated or the new card file link pushed by the cloud side, the end side performs corresponding card synchronization updates or displays new cards. The method can be executed by a card update device, which can be implemented in the form of software and / or hardware, and optionally, by an electronic device, which can be a mobile terminal, a PC terminal or a server, etc. Figure 1 As shown, the method includes:
[0019] S110, the terminal side establishes a message queue telemetry transmission MQTT communication connection with the cloud side, and the terminal side subscribes to the card information from the cloud side.
[0020] Among them, Message Queuing Telemetry Transport (MQTT) can be an instant messaging protocol, specifically a client-server based message publish / subscribe transmission protocol.
[0021] It should be noted that the terminal side pre-installs a card container application with multiple templates, which can be called by external applications. The cloud pre-embeds the data that needs to be updated and the new card file in advance.
[0022] In this embodiment, after the end side is turned on, it sends an MQTT communication connection request to the cloud side. Based on the MQTT communication connection request, the cloud side establishes an MQTT communication connection with the end side. The end side can subscribe to information from the cloud side. The types of subscription information can include multiple types. Preferably, card-related information can be subscribed to the cloud side. Among them, subscribing to card information can be understood as an agreement between the end side and the cloud side. The content of the agreement can include the cloud side pushing card-related information to the end side, and can also include the format of card data. The format of card data can be any format, for example, it can be json format, xml format, etc.
[0023] Before the cloud side pushes the card data to the terminal side based on the card information, the method further includes:
[0024] The terminal side loads and sets the template card; and enables the proxy refresh to monitor whether the card data is updated.
[0025] In this embodiment, after the terminal side is turned on, a setting template card (default card in the terminal side) may be preloaded and proxy refresh may be enabled to monitor whether the card data is updated.
[0026] S120: The cloud side pushes the card data to the terminal side based on the card information.
[0027] The card data includes card update data, a source card name to be updated, and a target card name to be updated; the card update data includes the card data to be updated or a new card file link.
[0028] For example, the cloud side can push the card data to be updated, the source card name to be updated, and the target card name to be updated to the client side based on the card information. Alternatively, the cloud side can push a new card file link, the source card name to be updated, and the target card name to be updated to the client side based on the card information.
[0029] In this embodiment, if the cloud side pushes the card data to be updated, the source card name to be updated is the same as the target card name to be updated. If the cloud side pushes a new card file link, the source card name to be updated is different from the target card name to be updated.
[0030] S130: If the card update data includes card data to be updated, the terminal side determines whether the source card to be updated is in operation based on the name of the source card to be updated.
[0031] In this embodiment, if the cloud side pushes the card data to be updated, the terminal side can determine whether the source card to be updated is running among all the running cards (there are multiple running cards at the same time) by the name of the source card to be updated.
[0032] Among them, the terminal side includes push service application and accompanying service.
[0033] Optionally, the terminal side determines whether the source card to be updated is running based on the name of the source card to be updated, including: the push service application receives the card data, and forwards the card data to the accompanying service; the accompanying service traverses multiple running cards; during the traversal process, if the name of the source card to be updated is consistent with the card name corresponding to the currently running card, it is determined that the source card to be updated is running.
[0034] Exemplarily, the cloud side sends the card data (including the card data to be updated, the source card name to be updated, and the target card name to be updated) to the push service application, the push service application receives the card data, the push service application forwards the card data to the accompanying service, the accompanying service parses the source card name to be updated from the card data, and traverses multiple running cards in turn. During the traversal process, it is determined in turn whether the source card name to be updated is consistent with the card name corresponding to the currently running card. If the source card name to be updated is consistent with the card name corresponding to the currently running card, it is considered that the source card to be updated is running.
[0035] S140: If the source card to be updated is in operation, the card data is published.
[0036] In this embodiment, if the source card to be updated is in operation, the card data is published so that the subsequent end side can render and display the published card data.
[0037] Optionally, publishing the card data includes: calling a data management service interface to store the card data, and notifying a card management service of the card data and a monitoring result of the card data.
[0038] The terminal side also includes a data management service and a card management service. The monitoring result includes whether the card data is updated.
[0039] Exemplarily, the card data is published by calling the data management service interface to store the card data. During the storage process, the card data version number is first increased, and then the card data is stored. Through the increase in the version number, it can be considered that the card data is updated relative to the last stored card data (it can also be understood that the card data pushed by the default cloud side is updated), and the card data and the monitoring result of the card data (card data has been updated) are notified to the card management service.
[0040] The end side also includes a card rendering service. It should be noted that when the cloud side and the end side establish a communication connection, that is, before or after the proxy refresh is enabled, the card management service needs the data management service to pay attention to whether the card data pushed by the cloud side is updated. If the card management service receives a notification from the data management service that the card data has been updated, it will forward the card data to the card rendering service.
[0041] S150: Update the running source card based on the card data.
[0042] In this embodiment, after finding the running source card, the components (such as text, picture) on the source card that need to be changed are refreshed, that is, the components on the source card that need to be changed are updated to the card data to be updated. The card data to be updated in the card data includes the text data and / or picture data to be updated.
[0043] For example, if the cloud side pushes the card data to be updated, the source card name to be updated, and the target card name to be updated, taking the Hongmeng operating system as an example, the specific content of the card data can be:
[0044] “"text":["fire"], indicates the text data to be updated;
[0045] “image”: [“https: / / pic.616pic.com / ys_bnew_img / 00 / 04 / 24 / aHSBOaMQbh.jpg”], indicating the image data to be updated;
[0046] "bundleName":"com.openvalley.test",
[0047] "abilityName":"EntryAbility", indicates the preparation data related to the card data and the configuration information related to the Hongmeng operating system;
[0048] "srcTemplateCardName":"template0", indicates the name of the source card to be updated;
[0049] "dstTemplateCardName":"template0"," indicates the name of the target card to be updated.
[0050] Exemplarily, after executing the step of updating the running source card based on the card data, the text content that needs to be changed on the source card is updated to "fire", and the image component is updated to the image corresponding to "https: / / pic.616pic.com / ys_bnew_img / 00 / 04 / 24 / aHSBOaMQbh.jpg".
[0051] Optionally, updating the running source card based on the card data includes: the card management service pushing the card data to the card rendering service; and the card rendering service refreshing the running source card based on the card data to be updated.
[0052] Exemplarily, the card management service pushes the card data to the card rendering service; the card rendering service refreshes the running source card based on the card data to be updated, thereby updating part of the card data of the source card.
[0053] S160: If the card update data includes a new card file link, the terminal side downloads a new card file based on the new card file link.
[0054] In this embodiment, if the card update data includes a new card file link, the terminal side needs to download the new card file link first, so as to obtain the new card file.
[0055] Optionally, the terminal side downloads a new card file based on the new card file link, including: the accompanying service on the terminal side downloads the new card file based on the new card file link and saves the new card file.
[0056] Exemplarily, the cloud side pushes the card data to the terminal side, the push service application on the terminal side receives the card data, and the push service application forwards the card data to the accompanying service; the accompanying service downloads a new card file based on the new card file link and saves it.
[0057] S170: When the download of the new card file is complete, the terminal side loads the new card file and replaces the source card file corresponding to the source card name to be updated.
[0058] In this embodiment, when the terminal side senses that the new card file has been downloaded, the terminal side loads the new card file and replaces the source card file corresponding to the source card name to be updated, that is, the new card file corresponding to the target card name to be updated is used to replace the source card file corresponding to the source card name to be updated.
[0059] Optionally, when the new card file is downloaded, the terminal side loads and displays the new card file, and replaces the source card file corresponding to the source card name to be updated; including: when the new card file is downloaded, the accompanying service on the terminal side notifies the card rendering service on the terminal side, the card rendering service loads the new card file, and replaces the source card file corresponding to the source card name to be updated.
[0060] The card name corresponding to the new card file is the name of the target card to be updated.
[0061] Exemplarily, when the accompanying service senses that the new card file has been downloaded, the accompanying service notifies the card rendering service on the terminal side, and the card rendering service loads and displays the new card file and replaces the source card file corresponding to the source card name to be updated. At the same time, the new card reuses the proxy refresh of the source card file to facilitate the subsequent update of the new card.
[0062] For example, if the cloud side pushes the card data to be updated, the source card name to be updated, and the target card name to be updated, taking the Hongmeng operating system as an example, the specific content of the card data can be: "srcTemplateCardName":"template0", indicating the source card name to be updated;
[0063] "dstTemplateCardName":"template1", indicates the name of the target card to be updated;
[0064] “cardUrl”: “http: / / xxxx / card.abc” indicates the new card file link.
[0065] It should be noted that the unique identifier of the new card reuses the unique identifier of the source card, and the card rendering service loads and displays the new card file according to the unique identifier, and replaces the source card file corresponding to the source card name to be updated.
[0066] The technical solution of the embodiment of the present disclosure is that the terminal side and the cloud side establish a message queue telemetry transmission MQTT communication connection, and the terminal side subscribes to card information from the cloud side; the cloud side pushes card data to the terminal side based on the card information; wherein the card data includes card update data, the source card name to be updated and the target card name to be updated; the card update data includes the card data to be updated or a new card file link; if the card update data includes the card data to be updated, the terminal side determines whether the source card to be updated is running based on the source card name to be updated; if the source card to be updated is running, the card data is published; the running source card is updated based on the card data; if the card update data includes a new card file link, the terminal side downloads a new card file based on the new card file link; when the new card file is downloaded, the terminal side loads the new card file and replaces the source card file corresponding to the source card name to be updated. The disclosed embodiment can not only update part of the card data of the source card, but also replace the entire source card, thereby adapting to multiple application scenarios without updating the host application, thereby improving the flexibility of card updates.
[0067] For example, take the card data to be updated sent from the cloud side as an example. Figure 2 A flowchart of another card updating method provided by an embodiment of the present invention. Figure 2 As shown, the push service application sends an MQTT communication connection request to the cloud side. Based on the MQTT communication connection request, the cloud side establishes an MQTT communication connection with the push service application. A connection is established between the accompanying service and the push service application. When the connection is successful, the push service application subscribes to the card information instance (that is, the card data) in the callback function. The accompanying service receives the card data sent by the push service application, and calls the data management service interface to store the data (store it in the database). The data management service perceives the changes in the database and gives the card data to the registered subscription instance (the data management service notifies the card management service that the card data has been updated). The card management service parses the card data from the subscription instance and sends it to the card rendering service so that the card rendering service loads and displays the card data.
[0068] It should be noted that the card data pushed by the card is prepared in advance on the cloud side and sent to the terminal side through the network. Compared with the prior art, the synchronous refresh of the card data can be achieved without relying on the system application. Compared with the prior art, the embodiment of the present invention can not only update part of the card data of the source card on the terminal side, but also replace the entire card of the source card on the terminal side according to the dynamic configuration of the cloud side (the card data sent can be dynamically adjusted according to actual needs), so as to adapt to more usage scenarios. According to the dynamic configuration of the cloud side, a new card file link can be directly sent to the terminal side, and the terminal side can load and display it by downloading. Compared with the prior art (in the prior art, since the card is strongly bound to the application, the host application needs to be updated when the entire card is updated), there is no need to update the host application, which can improve the flexibility of card update. In the prior art, the external conditions required for card update are relatively strict, and additional conditions need to be added or the interaction path is long. However, the technical solution provided by the embodiment of the present invention has simple interaction between the cloud side and the terminal side, and the terminal side can be directly updated according to the card data sent by the cloud side.
[0069] Figure 3 A schematic diagram of a card updating device provided by an embodiment of the present disclosure is shown in FIG. Figure 3 As shown, the device includes: a cloud-side subscription module 310, a card data push module 320, a card query module 330, a data publishing module 340, an update module 350, a download module 360 and a new card file loading module 370;
[0070] The cloud-side subscription module 310 is used to establish a message queue telemetry transmission MQTT communication connection between the terminal side and the cloud side, and the terminal side subscribes to the card information from the cloud side;
[0071] The card data push module 320 is used for the cloud side to push the card data to the terminal side based on the card information; wherein the card data includes the card update data, the source card name to be updated and the target card name to be updated; the card update data includes the card data to be updated or the new card file link;
[0072] A card query module 330, configured to determine, on the terminal side, whether the source card to be updated is in operation based on the name of the source card to be updated if the card update data includes the card data to be updated;
[0073] The data publishing module 340 is used to publish the card data if the source card to be updated is in operation;
[0074] An updating module 350, configured to update a running source card based on the card data;
[0075] A download module 360, configured to download a new card file based on the new card file link if the card update data includes a new card file link;
[0076] The new card file loading module 370 is used to load the new card file on the terminal side and replace the source card file corresponding to the source card name to be updated when the new card file is downloaded.
[0077] The technical solution of the embodiment of the present disclosure is as follows: a message queue telemetry transmission MQTT communication connection is established between the terminal side and the cloud side through a cloud-side subscription module, and the terminal side subscribes to card information from the cloud side; the cloud side pushes card data to the terminal side based on the card information through a card data push module; wherein the card data includes card update data, a source card name to be updated, and a target card name to be updated; the card update data includes the card data to be updated or a new card file link; if the card update data includes the card data to be updated through a card query module, the terminal side determines whether the source card to be updated is in operation based on the source card name to be updated; if the source card to be updated is in operation through a data publishing module, the card data is published; the source card in operation is updated through an update module based on the card data; if the card update data includes a new card file link through a download module, the terminal side downloads a new card file based on the new card file link; when the new card file is downloaded, the terminal side loads the new card file and replaces the source card file corresponding to the source card name to be updated through a new card file loading module. The disclosed embodiment can not only update part of the card data of the source card, but also replace the entire source card, thereby adapting to multiple application scenarios without updating the host application, thereby improving the flexibility of card updates.
[0078] The above-mentioned device also includes a proxy refresh activation module, which is specifically used to: load a setting template card on the terminal side; and activate the proxy refresh to monitor whether the card data is updated.
[0079] The terminal side includes a push service application and an accompanying service. Optionally, the card query module is specifically used for: the push service application receives the card data and forwards the card data to the accompanying service; the accompanying service traverses multiple running cards; during the traversal process, if the name of the source card to be updated is consistent with the card name corresponding to the currently running card, it is determined that the source card to be updated is running.
[0080] Among them, the terminal side also includes data management services and card management services.
[0081] Optionally, the data publishing module is specifically used to: call a data management service interface to store the card data, and notify the card management service of the card data and a monitoring result of the card data; wherein the monitoring result includes whether the card data has been updated.
[0082] The terminal side also includes a card rendering service. Optionally, the update module is specifically used for: the card management service pushes the card data to the card rendering service; the card rendering service refreshes the running source card based on the card data to be updated; wherein the card data to be updated includes text data and / or image data to be updated.
[0083] Optionally, the download module is specifically used for: the accompanying service on the terminal side downloads a new card file based on the new card file link and saves the new card file;
[0084] Optionally, the new card file loading module is specifically used for: when the new card file is downloaded, the accompanying service on the end side notifies the card rendering service on the end side, the card rendering service loads the new card file, and replaces the source card file corresponding to the source card name to be updated; wherein, the card name corresponding to the new card file is the target card name to be updated.
[0085] The card updating device provided in the embodiments of the present disclosure can execute the card updating method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0086] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0087] like Figure 4As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0088] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0089] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as updating of method cards.
[0090] In some embodiments, the updating of the method card can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the updating of the method card described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the updating of the method card by any other appropriate means (for example, by means of firmware).
[0091] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0092] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0093] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0094] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0095] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0096] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0097] An embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements a card update method as provided in any embodiment of the present application.
[0098] In the process of implementation, the computer program product can be written in one or more programming languages or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0099] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A card updating method, characterized in that: include: The client side establishes a message queue telemetry transmission MQTT communication connection with the cloud side, and the client side subscribes to the card information on the cloud side; The cloud side pushes the card data to the terminal side based on the card information; wherein the card data includes the card update data, the source card name to be updated, and the target card name to be updated; the card update data includes the card data to be updated or a new card file link; If the card update data includes the card data to be updated, the terminal side determines whether the source card to be updated is in operation based on the name of the source card to be updated; if the source card to be updated is in operation, the card data is published; and the source card in operation is updated based on the card data; If the card update data includes a new card file link, the terminal side downloads a new card file based on the new card file link; When the download of the new card file is complete, the terminal side loads the new card file and replaces the source card file corresponding to the source card name to be updated.
2. The method according to claim 1, characterized in that: Before the cloud side pushes the card data to the terminal side based on the card information, the method further includes: The client side loads the setting template card; Enable proxy refresh to monitor whether the card data is updated.
3. The method according to claim 1, characterized in that: in, The terminal side includes a push service application and an accompanying service; the terminal side determines whether the source card to be updated is running based on the name of the source card to be updated, including: The push service application receives the card data and forwards the card data to the companion service; The accompanying service traverses multiple running cards; During the traversal process, if the name of the source card to be updated is consistent with the card name corresponding to the currently running card, it is determined that the source card to be updated is running.
4. The method according to claim 2, characterized in that: in, The terminal side also includes data management services and card management services; publishing card data includes: The data management service interface is called to store the card data, and the card data and the monitoring result of the card data are notified to the card management service; wherein the monitoring result includes whether the card data is updated.
5. The method according to claim 4, characterized in that in, The terminal side also includes a card rendering service; updating the running source card based on the card data, including: The card management service pushes the card data to the card rendering service; The card rendering service refreshes the running source card based on the card data to be updated; wherein the card data to be updated includes text data and / or picture data to be updated.
6. The method according to claim 1, characterized in that The terminal side downloads a new card file based on the new card file link, including: The accompanying service on the terminal side downloads the new card file based on the new card file link and saves the new card file; Correspondingly, when the new card file is downloaded, the terminal side loads and displays the new card file and replaces the source card file corresponding to the source card name to be updated; including: When the new card file is downloaded, the accompanying service on the terminal side notifies the card rendering service on the terminal side, and the card rendering service loads the new card file and replaces the source card file corresponding to the source card name to be updated; wherein the card name corresponding to the new card file is the target card name to be updated.
7. A card updating device, characterized in that: include: The cloud-side subscription module is used to establish a message queue telemetry transmission MQTT communication connection between the client and the cloud, and the client subscribes to the card information from the cloud. A card data push module, used for the cloud side to push card data to the terminal side based on the card information; wherein the card data includes card update data, the source card name to be updated, and the target card name to be updated; the card update data includes the card data to be updated or a new card file link; A card query module, configured to determine, on the terminal side, whether the source card to be updated is in operation based on the name of the source card to be updated if the card update data includes the card data to be updated; A data publishing module is used to publish card data if the source card to be updated is in operation; An updating module, used for updating the running source card based on the card data; A download module, configured to download a new card file based on the new card file link if the card update data includes a new card file link; The new card file loading module is used to load the new card file on the terminal side and replace the source card file corresponding to the source card name to be updated when the new card file is downloaded.
8. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the card update method as described in any one of claims 1-6.
9. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to execute the card updating method according to any one of claims 1 to 6 when executed by a computer processor.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the card updating method according to any one of claims 1 to 6.
