Method for generating virtual card and interactive implementation method and device thereof
Through virtual card technology, the interaction between different applications is converted into interaction between data source applications and virtual cards, solving the problems of high operational costs and low efficiency caused by application isolation, and achieving cross-application interoperability and efficient user experience.
Patent Information
- Application Number
- CN202110049810.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-14
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2041-01-14
AI Technical Summary
Isolation between different applications results in high operational cost and inefficiency when users switch back and forth between different applications, making it impossible to achieve effective cross-application interoperability.
By generating virtual cards, using the target card model, user interaction response logic and card rendering functions, the interaction between the data source application and the host application is converted into the interaction between the data source application and the virtual card, achieving cross-application interoperability and user interaction The behavior communicates with the data source application through user interaction response logic to obtain updated data and re-render the presentation.
There is no need to perform additional development of host applications, which achieves cross-application interaction effect, improves user event processing efficiency, and supports the reuse of virtual cards in different host applications, providing a unified user experience.
Smart Images

Figure CN114764360B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network communication technology, and in particular to a method for generating a virtual card and an interactive implementation method and device thereof. Background Art
[0002] With the continuous development of Internet technology, more and more applications are available to users. On the one hand, this enriches the various functions that can be realized. On the other hand, since different applications are isolated from each other and cannot communicate with each other, users often need to switch back and forth between different applications, resulting in high operating costs and low efficiency for users. Summary of the invention
[0003] In view of this, the present specification provides a method for generating a virtual card and an interactive implementation method, device method and device thereof to address the deficiencies in the related art.
[0004] Specifically, this specification is implemented through the following technical solutions:
[0005] According to a first aspect of the present specification, a method for generating a virtual card is proposed, comprising:
[0006] Obtain a target card model, wherein the target card model defines a card template, user interaction response logic, and card rendering function related to a target function;
[0007] Acquire event data from a data source application, wherein the event data is used to cooperate with the card template to realize a target event under the target function;
[0008] The event data is imported into the target card model to configure the target card model as a target virtual card; after the target virtual card is delivered to the host application, the card rendering function is used to realize the rendering and display of the target virtual card in the host application, and the user interaction response logic is used to instruct the target virtual card to communicate with the data source application according to the user interaction behavior to obtain updated data, and the updated data is used to re-render and display the target virtual card.
[0009] According to a second aspect of the present specification, a method for implementing interaction through a virtual card is proposed, comprising:
[0010] Obtain a target virtual card, where the target virtual card is generated by importing event data from a data source application into a target card model; the target card model defines a card template, user interaction response logic, and card rendering function related to a target function, and the event data is used to cooperate with the card template to implement a target event under the target function;
[0011] The target virtual card is placed in a container within a host application; wherein the card rendering function is used to implement rendering and display of the target virtual card in the container, and the user interaction response logic is used to instruct the target virtual card to communicate with the data source application to obtain updated data based on user interaction behavior, and the updated data is used to re-render and display the target virtual card.
[0012] According to a third aspect of the present specification, a method for implementing interaction through a virtual card is proposed, comprising:
[0013] The target virtual card is rendered and displayed through the card rendering function; the target virtual card is generated by importing the event data from the data source application into the target card model; the target card model defines the card template related to the target function, the user interaction response logic and the card rendering function, and the event data is used to cooperate with the card template to realize the target event under the target function;
[0014] In response to a user interaction behavior with respect to the target virtual card, communicating with the data source application through the user interaction response logic to obtain updated data;
[0015] The updated data is processed by the card rendering function to re-render and display the target virtual card.
[0016] According to a fourth aspect of the present specification, a device for generating a virtual card is provided, comprising:
[0017] A model acquisition unit, used to acquire a target card model, wherein the target card model defines a card template, a user interaction response logic, and a card rendering function related to a target function;
[0018] A data acquisition unit, used to acquire event data from a data source application, wherein the event data is used to cooperate with the card template to realize a target event under the target function;
[0019] A card generation unit is used to import the event data into the target card model to configure the target card model as a target virtual card; after the target virtual card is delivered to the host application, the card rendering function is used to realize the rendering and display of the target virtual card in the host application, and the user interaction response logic is used to instruct the target virtual card to communicate with the data source application according to the user interaction behavior to obtain updated data, and the updated data is used to re-render and display the target virtual card.
[0020] According to a fifth aspect of the present specification, a device for implementing interaction through a virtual card is provided, comprising:
[0021] A card acquisition unit is used to acquire a target virtual card, wherein the target virtual card is generated by importing event data from a data source application into a target card model; the target card model defines a card template, user interaction response logic, and card rendering function related to a target function, and the event data is used to cooperate with the card template to realize a target event under the target function;
[0022] A card placement unit is used to place the target virtual card into a container within a host application; wherein the card rendering function is used to implement rendering and display of the target virtual card in the container, and the user interaction response logic is used to instruct the target virtual card to communicate with the data source application to obtain updated data based on user interaction behavior, and the updated data is used to re-render and display the target virtual card.
[0023] According to a sixth aspect of the present specification, a device for implementing interaction through a virtual card is provided, comprising:
[0024] A rendering unit, used to render and display a target virtual card through a card rendering function; the target virtual card is generated by importing event data from a data source application into a target card model; the target card model defines a card template, user interaction response logic and the card rendering function related to the target function, and the event data is used to cooperate with the card template to realize a target event under the target function;
[0025] An interaction unit is used to respond to user interaction behavior with respect to the target virtual card, and communicate with the data source application through the user interaction response logic to obtain updated data; wherein the rendering module also processes the updated data through the card rendering function to re-render and display the target virtual card.
[0026] According to a seventh aspect of the present specification, there is provided an electronic device, including:
[0027] processor;
[0028] a memory for storing processor-executable instructions;
[0029] The processor implements the method described in the embodiments of the first aspect, the second aspect or the third aspect by running the executable instructions.
[0030] According to an eighth aspect of the embodiments of this specification, a computer-readable storage medium is provided, on which computer instructions are stored. When the instructions are executed by a processor, the steps of the method described in the embodiments of the first, second or third aspects above are implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the specification and, together with the description, serve to explain the principles of the specification.
[0032] Figure 1 is a flow chart of a method for generating a virtual card according to an exemplary embodiment of this specification;
[0033] Figure 2 is a schematic diagram of the data structure of a target card model using an embodiment of this specification;
[0034] Figure 3 is a flow chart of a method for implementing interaction through a virtual card according to an exemplary embodiment of this specification;
[0035] Figure 4 is a flow chart of another method for implementing interaction through a virtual card according to an exemplary embodiment of this specification;
[0036] Figure 5a-5b is a multi-party interaction flow chart of a method for generating a virtual card according to an exemplary embodiment of this specification;
[0037] Figure 6 is a multi-party interaction flow chart of a method for implementing interaction through a virtual card according to an exemplary embodiment of this specification;
[0038] Figure 7a-7b is a schematic diagram of an operation of realizing interaction through a virtual card provided by an exemplary embodiment;
[0039] Figure 8a-8b is another operation diagram of realizing interaction through virtual cards provided by an exemplary embodiment;
[0040] Fig. 9 is a schematic diagram of an electronic device for generating a virtual card according to an exemplary embodiment of this specification;
[0041] Fig.10 is a block diagram of a device for generating a virtual card according to an exemplary embodiment of the present specification;
[0042] Fig.11 is a schematic diagram of an electronic device implementing interaction through a virtual card according to an exemplary embodiment of this specification;
[0043] Fig.12 is a block diagram of a device for implementing interaction through a virtual card according to an exemplary embodiment of this specification;
[0044] Fig.13is a schematic diagram of another electronic device for implementing interaction through a virtual card according to an exemplary embodiment of this specification;
[0045] Fig.14 It is a block diagram of another device for implementing interaction through virtual cards according to an exemplary embodiment of the present specification. DETAILED DESCRIPTION
[0046] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this specification. Instead, they are merely examples of devices and methods consistent with some aspects of this specification as detailed in the appended claims.
[0047] The terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit this specification. The singular forms "a", "the" and "the" used in this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0048] It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0049] Next, the embodiments of this specification are described in detail.
[0050] Figure 1 FIG. 1 is a flow chart of a method for generating a virtual card according to an exemplary embodiment of this specification. Figure 1 As shown, the following steps may be included:
[0051] Step 102: Obtain a target card model, wherein the target card model defines a card template, user interaction response logic, and card rendering function related to a target function.
[0052] In one embodiment, the target virtual card can be generated by the data source application or by the card platform, and this specification does not limit this. When the target virtual card is generated by the data source application, the target card model can be maintained by the data source application and selected by itself, or the data source application receives the candidate card model sent by the card platform and selects the target card model from the candidate card model; when the target virtual card is generated by the card platform, the card platform receives the target card model sent by the data source application, or the card platform sends the candidate card model to the data source application so that the data source application selects from the candidate card model and receives the target card model sent by the data source application.
[0053] In one embodiment, the target card model of the present specification has a special data structure, so that it can include the card template, user interaction response logic and card rendering function as described above. For example, the data structure of the target card model can adopt the MVC architecture, for example, the MVC architecture can specifically include Figure 2 The model layer, controller layer, and view layer are shown.
[0054] The model layer can be used to deploy the card templates as described above. In addition to the card templates, the model layer can also be used to deploy other data to achieve other functions. For example, the model layer in the data structure of the target card model can also include a listener center module for monitoring the user's interactive behavior, an event handler module for notifying the corresponding trigger object when a specific event is executed, and a data-cache module for storing event information sent by the data source application.
[0055] The controller layer can be used to deploy the user interaction response logic as described above. In addition to the user interaction response logic, the controller layer can also be used to deploy other data to achieve other functions. For example, the controller layer in the data structure of the target card model can also include a fallback module and an error boundary module for capturing errors that occur in subcomponents during rendering and preventing the errors from continuing to propagate, a vip alarm module for alerting the data source application when receiving abnormal event data, and a messenger module for implementing communication between the view layer and the model layer.
[0056] The view layer can be used to deploy the card rendering function as described above. In addition to the card rendering function, the view layer can also be used to deploy other data to achieve other functions. For example, the view layer in the data structure of the target card model can also include a local render module for local offline rendering of virtual cards, a dynamicX render module for dynamic online rendering of virtual cards, an event handler module for notifying the corresponding trigger object when a specific event is executed, and a template-cache module for storing rendering templates. Among them, the target virtual card can select different rendering modes according to needs during the rendering process, with high local rendering efficiency and high dynamic rendering flexibility. By selecting a card model, the pre-defined card template, user interaction response logic and card rendering function can be directly obtained, so that the data source application only needs to provide corresponding event data according to the target card model, and the implementation method is simple.
[0057] Step 104: Acquire event data from a data source application, where the event data is used in conjunction with the card template to implement a target event under the target function.
[0058] In one embodiment, the obtaining of event data from the data source application includes: when the target virtual card is generated by the data source application, the data source application obtains its own event data; when the target virtual card is generated by the card platform, the card platform receives the event data sent by the data source application.
[0059] In one embodiment, since the card template and user interaction response logic have been defined in the target card model, the data source application only needs to provide event data to conveniently generate a target virtual card for realizing the target event, and the user interaction response logic in the target card model can ensure that the generated target virtual card realizes an appropriate response to the user interaction, especially realizing data communication between the target virtual card and the data source application according to the user interaction behavior, so that the data source application can provide updated data to the target virtual card to realize the re-rendering of the target virtual card, and the data source application does not need to pay attention to the underlying model structure, which greatly simplifies the card generation process and improves the card generation efficiency.
[0060] Step 106: Import the event data into the target card model to configure the target card model as a target virtual card; after the target virtual card is delivered to the host application, the card rendering function is used to implement the rendering and display of the target virtual card in the host application, and the user interaction response logic is used to instruct the target virtual card to communicate with the data source application according to the user interaction behavior to obtain updated data, and the updated data is used to re-render and display the target virtual card.
[0061] In one embodiment, importing the event data into the target card model may be performed by a data source application or by a card platform, and this specification does not impose any limitation on this.
[0062] In one embodiment, Figure 2 For example, during the target virtual card generation process, the model layer in the data structure of the target card model obtains the event data sent by the data source application, and generates the target virtual card in combination with the card template pre-defined in the model layer and the user interaction response logic pre-defined in the controller layer in the target card model. After the target virtual card is delivered to the host application, the card rendering function pre-defined in the view layer will render and display the target virtual card. When the user interacts with the target virtual card, the listenercenter module of the model layer listens to the user interaction action, communicates with the data source application through the user interaction response logic pre-defined in the controller layer, and the model layer receives the update information returned by the data source application so that the view layer re-renders the target virtual card according to the received update information.
[0063] In one embodiment, the event data is imported into the target card model by the data source application; or, after the event data is provided by the data source application to the card platform, the card platform imports the target card model. The target card model can be configured by the data source application or by the card platform, and this specification does not limit this. When the data source application maintains a card model and imports event data by itself, it can generate and deliver the target virtual card without interacting with the card platform, thereby improving delivery efficiency. And because the card template, user interaction response logic and card rendering function in the target card model are all pre-defined, and the event data is provided by the data source application in cooperation with the data source application, the import method for generating the target virtual card is simple, convenient and not prone to errors.
[0064] In one embodiment, the host application is determined, and the target virtual card is placed in the host application. The host application is a default application; or, the host application is an application selected by the data source application. For example, the user's frequently used application can be set as the default application, or different default applications can be set for different data source applications, or the user can select the host application to be placed by the target virtual card during the placement process. By setting the host application, the target virtual card can be flexibly placed in the host application required by the user, thereby improving the utilization rate of the target virtual card.
[0065] In one embodiment, the data source application is another application different from the host application. During the delivery of the target virtual card, the data source application itself contains the event data of the target virtual card, and if the user is in the data source application, the user can directly interact with the data source application without interacting with the target virtual card. By avoiding delivery of the target virtual card that realizes the target function of the data source application in the data source application, the waste of resources caused by meaningless delivery is reduced.
[0066] In one embodiment, after being delivered to the host application, the target virtual card is placed in a container provided by the host application; wherein the container includes a native page in the host application or a mini-program page in the host application. By providing a delivery container for the target virtual card in the host application, the rendering and display of the target virtual card in the host application will not affect the interface display of the host application itself. In fact, since the target card model predefines the card template, user interaction response logic and card rendering function, after the target virtual card is generated in conjunction with the event data provided by the data source application, it can ensure that the target virtual card itself can complete rendering and display, respond to user interaction behaviors (communicate data with the data source application based on user interaction behaviors to obtain updated data), and other operations, and the host application only needs to provide a container for placing the target virtual card, and does not need to participate in or pay attention to the operations implemented by the target virtual card. This is equivalent to converting the cross-application interaction originally implemented between the data source application and the host application into an interaction process between the data source application and the target virtual card, so that there is no need to redevelop various host applications to achieve effects similar to cross-application interaction, and the same target virtual card can be put into various host applications for reuse, and users can get the same usage experience in various host applications.
[0067] In one embodiment, the user interaction behavior is used to trigger one or more interactive objects displayed by the target virtual card, and the update data is generated by the data source application for the triggered interactive objects. By setting different interactive objects in the target virtual card and corresponding the interactive objects with the update data, the data source application can clearly identify and distinguish the operations performed by the user, and thus update the target virtual card accordingly.
[0068] In one embodiment, the update data is determined by the data source application based on the determined interactive objects and the pre-maintained mapping relationship between each interactive object and the corresponding data. By setting the mapping relationship between the interactive object and the corresponding data in the data source application, it is convenient for the data source application to feedback the corresponding data according to the user operation. And the update data provided by the data source data corresponds to the interactive object, which can ensure that the target virtual card is re-rendered and displayed according to the updated data.
[0069] In one embodiment, the interactive object is a processing option related to the target event, and the updated data is obtained by the data source application processing the target event according to the triggered processing option. The interactive object can be a function button displayed on the target virtual card, or a display interface on the target virtual card, which is not limited in this specification. For example, when the target event is a card draw, the processing options are the cards to be drawn, and the updated data is obtained by the data source application flipping and displaying the card triggered by the user.
[0070] In one embodiment, the update data includes at least one of the following: the processing result of the target event, the information of the associated event of the target event, and another target virtual card associated with the target event. For example, when the target event is an approval event, the update data may be the approval result; when the target event is a communication event, the update data may be the message content or the operation associated with the message content; when the target event is a transaction event, the update data may be the logistics information associated with the transaction order; when the target event is a navigation event, the update data may be the route information related to the travel destination; when the target event is an instruction event, the update data may be another target virtual card associated with the instruction. It should be understood that the above examples are merely illustrative examples of update data and do not impose any limitations on this specification.
[0071] It can be seen from the technical solution provided in the above specification that the specification provides a target card model including a card template, user interaction response logic and card rendering function, so that the data source application only needs to provide event data to quickly generate a target virtual card. At the same time, after the target virtual card is placed in the host application, the target virtual card can realize rendering display, human-computer interaction with the user, data communication with the data source application, etc. The host application only needs to provide a container for accommodating the target virtual card and does not need to directly participate in the above process. It is equivalent to the host application realizing cross-application interaction with the data source application through the target virtual card, without the need for additional software development or improvement of the existing host application. It has great scalability and can support users to quickly process the target events of the data source application in the host application, which helps to improve the user's event processing efficiency.
[0072] Figure 3 FIG. 1 is a flow chart of a method for implementing interaction through a virtual card according to an exemplary embodiment of this specification. Figure 3 As shown, the following steps may be included:
[0073] Step 302: Obtain a target virtual card, where the target virtual card is generated by importing event data from a data source application into a target card model; the target card model defines a card template, user interaction response logic, and card rendering function related to a target function, and the event data is used in conjunction with the card template to implement a target event under the target function.
[0074] In one embodiment, the target virtual card is obtained by obtaining the target virtual card generated and sent by the data source application; or, the target virtual card is obtained by the card platform; wherein the target virtual card is provided to the card platform after being generated by the data source application, or the target virtual card is generated by the card platform. By directly placing the obtained target virtual card into the host application, the host application does not need to perform any operation on the card, so that the host application does not have too many restrictions on the generation method and generation platform of the target virtual card that can be placed, which helps to improve the convenience of placing the target virtual card.
[0075] Step 304: placing the target virtual card into a container within a host application; wherein the card rendering function is used to implement rendering and display of the target virtual card in the container, and the user interaction response logic is used to instruct the target virtual card to communicate with the data source application to obtain updated data based on the user interaction behavior, and the updated data is used to re-render and display the target virtual card.
[0076] For details about user interaction behaviors, interaction objects, updated data, and the relationship between the data source application and the host application, refer to Figure 1 The description of step 106 in the illustrated embodiment will not be repeated here.
[0077] It can be seen from the technical solution provided in the above specification that, by placing the target virtual card in the host application, the target virtual card can realize rendering and display, human-computer interaction with the user, data communication with the data source application, etc., so that the user can interact with the target virtual card that displays the data source application data in the host application, and the host application only needs to provide a container for the target virtual card and does not need to directly participate in the above process. There is no need for additional software development or improvement of the existing host application. It has great scalability and can support users to quickly process target events of the data source application in the host application, which helps to improve the user's event processing efficiency.
[0078] Figure 4 FIG. 1 is a flow chart of another method for implementing interaction through a virtual card according to an exemplary embodiment of this specification. Figure 4 As shown, the following steps may be included:
[0079] Step 402: Render and display the target virtual card through the card rendering function; the target virtual card is generated by importing event data from a data source application into a target card model; the target card model defines a card template related to the target function, user interaction response logic and the card rendering function, and the event data is used to cooperate with the card template to realize the target event under the target function.
[0080] For instructions on how to generate the target virtual card, please refer to Figure 1 The relevant descriptions of step 102 and step 104 in the illustrated embodiment are not repeated here.
[0081] Step 406: In response to the user interaction behavior with respect to the target virtual card, communicate with the data source application through the user interaction response logic to obtain updated data.
[0082] For an explanation of the relationship between user interaction and updated data, see Figure 1 The description of step 106 in the illustrated embodiment will not be repeated here.
[0083] Step 408: Process the updated data through the card rendering function to re-render and display the target virtual card.
[0084] For instructions on re-rendering, please refer to Figure 1The description of step 106 in the illustrated embodiment will not be repeated here.
[0085] In the technical solution of this specification, by providing a target card model including a card template, user interaction response logic and card rendering function, the data source application only needs to provide event data to quickly generate a target virtual card, which can realize cross-application interaction between the host application and the data source application. Figure 5a-5b Detailed description is given. Figure 5a-5b FIG. 1 is a multi-party interaction flow chart of a method for generating a virtual card according to an exemplary embodiment of this specification. Figure 5a As shown, the interaction process between the data source application, the card platform, and the host application includes the following steps:
[0086] Step 501: The card platform receives event data and a target card template sent by a data source application.
[0087] Among them, the target card model is maintained by the data source application, and the event data is used to cooperate with the card template to realize the target event under the target function.
[0088] Step 502: The card platform generates a target virtual card based on the event data and the target card model.
[0089] The card platform imports the received event data into the target card model to generate a target virtual card.
[0090] Step 503: The card platform delivers the target virtual card to the host application.
[0091] The host application is the default delivery application of the card platform. After receiving the target virtual card, the host application can place the target virtual card into a container within the host application.
[0092] like Figure 5b As shown, the interaction process between the data source application, the card platform, and the host application may also include the following steps:
[0093] Step 512: The data source application receives the candidate card model sent by the card platform.
[0094] A number of candidate card models are maintained in the card platform, and the card platform sends the number of candidate card models to the data source application for selection by the data source application.
[0095] Step 512: The data source application determines the event data and the target card model.
[0096] The data source application selects the target card model from the candidate card models provided by the card platform, and determines the event data in conjunction with the card template in the target card model.
[0097] Step 513: The data source application generates a target virtual card.
[0098] The data source application imports the received event data into the target card model to generate a target virtual card.
[0099] Step 514: The data source application delivers the target virtual card to the host application.
[0100] The host application is selected by the data source application, and the data source application places a target virtual card on the selected host application.
[0101] During the interaction between the data source application, the card platform and the host application, the target card model can be provided by the data source application or the card platform, and the target virtual card can be generated by the data source application or the card platform, which is not limited in this specification.
[0102] Figure 6 FIG. 1 is a multi-party interaction flow chart of a method for implementing interaction through a virtual card according to an exemplary embodiment of this specification. Figure 6 As shown, the interaction process between the data source application and the target virtual card includes the following steps:
[0103] Step 601: Render and display the target virtual card.
[0104] After the target virtual card is placed in the host application, the rendering function in the card realizes the rendering and display of the target virtual card.
[0105] Step 602, the target virtual card sends the user interaction behavior to the data source application according to the user interaction response logic.
[0106] Step 606: The data source application sends update data to the target virtual card.
[0107] A mapping relationship between interactive objects and corresponding data is maintained in advance in the data source application, and update data is generated by the data source application for the triggered interactive objects.
[0108] Step 607: The target virtual card is re-rendered and displayed according to the updated data.
[0109] Figure 7a-7bThis is an operation diagram of realizing a lottery interaction through a virtual card provided by an exemplary embodiment. For ease of understanding, the technical solution of this specification is described below by taking an instant messaging application and a lottery application as examples. Assume that the instant messaging application is a host application, the lottery application is a data source application, and the lottery application maintains a target card model for a card lottery. User B sets event data such as the name of the lottery event and the number of lottery cards in the lottery application. The lottery application imports the event data into the target card model to generate a lottery virtual card. User B chooses to place the lottery virtual card into the instant messaging application, so that the lottery virtual card can be rendered and displayed in the instant messaging application. The user can interact with the lottery virtual card in the instant messaging application to realize the card lottery operation. The technical solution of this specification is described in detail below based on this process.
[0110] according to Figure 7a-7b In the instant messaging interface shown, user A can interact with the lucky draw virtual card 71 sent by user B on the message page 70 included in the instant messaging application. Figure 7a As shown, the lottery virtual card 71 contains six interactive objects, namely, cards "Prize a", "Prize b" ... "Prize f". User A can draw the lottery by triggering any card on the virtual card 71. Assuming that user A clicks on the card "Prize b", the lottery virtual card 71 corresponds to the user A's interactive action on the interactive object 71b, and sends an update message request corresponding to the card "Prize b" to the lottery application according to the user interaction response logic in the card model. The lottery application confirms that the prize corresponding to the card "Prize b" is "mobile phone" based on the pre-maintained mapping relationship between each card and the prize, and sends the relevant information of "mobile phone" as update data to the lottery virtual card 71. As shown Figure 7b As shown, the lottery virtual card 71 is re-rendered according to the relevant information of the prize "mobile phone" returned by the lottery application, and the relevant information of the specific prize "mobile phone" is displayed at the card 71b.
[0111] Figure 8a-8b This is another operational diagram of implementing approval interaction through virtual cards provided by an exemplary embodiment. For ease of understanding, the technical solution of this specification is explained below by taking the approval application and the conference application as examples. Assuming that the conference application is the host application and the approval application is the data source application, the card platform provides a variety of alternative card models. The approval application sends event data such as approval content and applicants to the card platform and selects the target card model, so that the card platform imports the event data into the target card template, generates an approval virtual card, and delivers it to the conference application according to the default settings, so that users can perform approval operations on the approval virtual card rendered and displayed on the conference application. Based on this process, the technical solution of this specification is described in detail below.
[0112] according to Figure 8a-8b The operation diagram of implementing approval interaction through virtual cards is shown, and the user can interact with the approval virtual card 81 generated by the approval application in the conference initiation interface 80 included in the conference application. Figure 8a As shown, the approval virtual card 81 has two interactive objects, "Agree" 81a and "Reject" 81b. The user can approve the application by triggering the interactive objects displayed on the approval virtual card 81. Assuming that user A clicks "Agree", the approval virtual card 81 responds to user A's interactive action on the interactive object 81a, and sends an update request related to the interactive object 81a to the approval application according to the user interaction response logic in the card model. The approval returns the update information according to the mapping relationship between the preset interactive objects and the corresponding data. For example, in the approval application, the interactive object 81a is preset to correspond to the update information of "You have agreed to the approval", and the interactive object 81b is preset to correspond to the update information of "You have rejected the approval". When the user interacts with the interactive object 81a, the approval application determines that the update message is "You have agreed to the approval" and sends it to the approval virtual card 81, as shown in FIG. Figure 8b As shown, the approval virtual card 81 is re-rendered according to the update message, and displays "You have agreed to the approval" to user A.
[0113] Corresponding to the above method embodiment, this specification also provides an embodiment of a device.
[0114] Fig. 9 FIG. 1 is a schematic diagram of a structure of an electronic device for generating a virtual card according to an exemplary embodiment of the present specification. Fig. 9 At the hardware level, the electronic device includes a processor 902, an internal bus 904, a network interface 906, a memory 908, and a non-volatile memory 910, and may also include hardware required for other services. The processor 902 reads the corresponding computer program from the non-volatile memory 810 into the memory 908 and then runs it, forming a device for solving the problem of displaying interactive virtual cards across applications at the logical level. Of course, in addition to the software implementation method, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0115] Fig.10 is a block diagram of a device for generating a virtual card according to an exemplary embodiment of the present specification. Fig.10 The device includes a model acquisition unit 1002, a data acquisition unit 1004 and a card generation unit 1006, wherein:
[0116] The model acquisition unit 1002 is configured to acquire a target card model, where the target card model defines a card template, user interaction response logic, and a card rendering function related to a target function.
[0117] The data acquisition unit 1004 is configured to acquire event data from a data source application, and the event data is used to cooperate with the card template to realize the target event under the target function.
[0118] The card generation unit 1006 is configured to import the event data into the target card model to configure the target card model as a target virtual card; after the target virtual card is delivered to the host application, the card rendering function is used to realize the rendering and display of the target virtual card in the host application, and the user interaction response logic is used to instruct the target virtual card to communicate with the data source application according to the user interaction behavior to obtain updated data, and the updated data is used to re-render and display the target virtual card.
[0119] Optionally, the target card model is maintained and selected by the data source application; or, the target card model is selected by the data source application from candidate card models maintained by the card platform.
[0120] Optionally, the event data is imported into the target card model by the data source application; or, after the event data is provided to the card platform by the data source application, the card platform imports the event data into the target card model.
[0121] Optionally, the above apparatus further includes: a host determination unit 1008 configured to determine the host application and place the target virtual card into the host application.
[0122] Optionally, the host application is a default application; or, the host application is an application selected by the data source application.
[0123] Optionally, the data source application is another application different from the host application.
[0124] Optionally, after being delivered to the host application, the target virtual card is placed in a container provided by the host application; wherein the container includes a native page within the host application or a mini-program page within the host application.
[0125] Optionally, the user interaction behavior is used to trigger one or more interactive objects displayed by the target virtual card, and the update data is generated by the data source application for the triggered interactive objects.
[0126] Optionally, the update data is determined by the data source application according to the determined interaction objects and the pre-maintained mapping relationship between each interaction object and the corresponding data.
[0127] Optionally, the interaction object is a processing option related to the target event, and the update data is obtained by the data source application processing the target event according to the triggered processing option.
[0128] Optionally, the update data includes at least one of the following: a processing result of the target event, and information of an event associated with the target event.
[0129] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0130] Fig.11 FIG. 1 is a schematic diagram of an electronic device structure for implementing interaction through a virtual card according to an exemplary embodiment of the present specification. Fig.11 At the hardware level, the electronic device includes a processor 1102, an internal bus 1104, a network interface 1106, a memory 1108, and a non-volatile memory 1110, and may also include hardware required for other services. The processor 1102 reads the corresponding computer program from the non-volatile memory 1110 into the memory 1108 and then runs it, forming a device for solving the problem of displaying interactive virtual cards across applications at the logical level. Of course, in addition to the software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0131] Fig.12 is a block diagram of a device for implementing interaction through a virtual card according to an exemplary embodiment of this specification. Fig.12 , the device includes a card acquisition unit 1202 and a card insertion unit 1204, wherein:
[0132] The card acquisition unit 1202 is configured to acquire a target virtual card, which is generated by importing event data from a data source application into a target card model; the target card model defines a card template, user interaction response logic and card rendering function related to a target function, and the event data is used in conjunction with the card template to implement the target event under the target function.
[0133] The card placement unit 1204 is configured to place the target virtual card into a container within a host application; wherein the card rendering function is used to implement the rendering and display of the target virtual card in the container, and the user interaction response logic is used to instruct the target virtual card to communicate with the data source application to obtain updated data based on the user interaction behavior, and the updated data is used to re-render and display the target virtual card.
[0134] Optionally, obtaining the target virtual card includes: obtaining the target virtual card generated and sent by the data source application; or, obtaining the target virtual card sent by the card platform; wherein, the target virtual card is generated by the data source application and provided to the card platform, or the target virtual card is generated by the card platform.
[0135] Optionally, the user interaction behavior is used to trigger one or more interaction objects included in the target virtual card, and the update data is generated by the data source application for the triggered interaction objects.
[0136] Optionally, the data source application pre-maintains a mapping relationship between each interactive object and corresponding data, and the update data is determined by the data source application according to the triggered interactive object and the mapping relationship.
[0137] Optionally, the interaction object is a processing option related to the target event, and the update data is obtained after the data source application processes the target event according to the triggered processing option.
[0138] Optionally, the update data includes at least one of the following: a processing result of the target event, and information of an event associated with the target event.
[0139] Optionally, the data source application is another application different from the host application.
[0140] Optionally, the container includes a native page within the host application or a mini-program page within the host application.
[0141] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0142] Fig.13 FIG. 1 is a schematic diagram of an electronic device structure for implementing interaction through a virtual card according to an exemplary embodiment of the present specification. Fig.13At the hardware level, the electronic device includes a processor 1302, an internal bus 1304, a network interface 1306, a memory 1308, and a non-volatile memory 1310, and may also include hardware required for other services. The processor 1302 reads the corresponding computer program from the non-volatile memory 1310 into the memory 1308 and then runs it, forming a device for solving the problem of displaying interactive virtual cards across applications at the logical level. Of course, in addition to the software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0143] Fig.14 is a block diagram of a device for implementing interaction through a virtual card according to an exemplary embodiment of this specification. Fig.14 , the device includes a rendering unit 1402 and an interaction module 1404, wherein:
[0144] The rendering unit 1402 is configured to render and display the target virtual card through the card rendering function; the target virtual card is generated by importing the event data from the data source application into the target card model; the target card model defines the card template related to the target function, the user interaction response logic and the card rendering function, and the event data is used to cooperate with the card template to realize the target event under the target function;
[0145] The interaction unit 1404 is configured to respond to user interaction behavior with the target virtual card and communicate with the data source application through the user interaction response logic to obtain updated data; wherein the rendering module also processes the updated data through the card rendering function to re-render and display the target virtual card.
[0146] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. Ordinary technicians in this field can understand and implement it without paying creative work.
[0147] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory including instructions, and the above instructions can be executed by a processor of a device for implementing interaction through a virtual card to implement any method as described in the above embodiments, for example, the method may include:
[0148] Obtain a target virtual card, where the target virtual card is generated by importing event data from a data source application into a target card model; the target card model defines a card template, user interaction response logic, and card rendering function related to a target function, and the event data is used to cooperate with the card template to implement a target event under the target function;
[0149] The target virtual card is placed in a container within a host application; wherein the card rendering function is used to implement rendering and display of the target virtual card in the container, and the user interaction response logic is used to instruct the target virtual card to communicate with the data source application to obtain updated data based on user interaction behavior, and the updated data is used to re-render and display the target virtual card.
[0150] The non-temporary computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc., and this specification does not limit this.
[0151] The above description is only a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.
Claims
1. A method for generating a virtual card, characterized in that: include: Obtain a target card model, wherein the target card model defines a card template, user interaction response logic, and card rendering function related to a target function, and the target card model is maintained by a data source application; Acquire event data from a data source application, wherein the event data is used to cooperate with the card template to realize a target event under the target function; Generate a target virtual card related to the target function by combining the card template defined in the target card model, the user interaction response logic defined in the target card model and the event data; Determine a host application, and place the target virtual card into the host application; After the target virtual card is placed in the host application, the card rendering function is used to realize the rendering and display of the target virtual card in the host application, and the user interaction response logic is used to instruct the target virtual card to communicate with the data source application to obtain updated data according to the user interaction behavior, and the updated data is used to re-render and display the target virtual card; the target virtual card is placed in a container provided by the host application; wherein the container includes a native page within the host application or a mini-program page within the host application.
2. The method according to claim 1, characterized in that: The target card model is selected by the data source application; or, The target card model is selected by the data source application from candidate card models maintained by the card platform.
3. The method according to claim 1, characterized in that: The event data is imported into the target card model by the data source application; or, After the event data is provided to the card platform by the data source application, the event data is imported into the target card model by the card platform.
4. The method according to claim 1, characterized in that: The host application is a default application; or, The host application is an application selected by the data source application.
5. The method according to claim 1, characterized in that: The data source application is another application different from the host application.
6. The method according to claim 1, characterized in that: The user interaction behavior is used to trigger one or more interaction objects displayed by the target virtual card, and the update data is generated by the data source application for the triggered interaction objects.
7. The method according to claim 6, characterized in that: The update data is determined by the data source application according to the determined interaction objects and the pre-maintained mapping relationship between each interaction object and the corresponding data.
8. The method according to claim 6, characterized in that: The interactive object is a processing option related to the target event, and the update data is obtained by the data source application processing the target event according to the triggered processing option.
9. The method according to claim 8, characterized in that: The update data includes at least one of the following: a processing result of the target event, and information of an event associated with the target event.
10. A method for realizing interaction through virtual cards, characterized in that: include: Obtain a target virtual card related to a target function, wherein the target virtual card is generated by a data source application, and is generated by combining a card template defined in a target card model, a user interaction response logic defined in the target card model, and event data; the target card model defines a card template, a user interaction response logic, and a card rendering function related to the target function, and the event data is used to cooperate with the card template to implement a target event under the target function; A host application is determined, and the target virtual card is placed in the host application, and the target virtual card is placed in a container within the host application; wherein the card rendering function is used to realize the rendering and display of the target virtual card in the container, and the user interaction response logic is used to instruct the target virtual card to communicate with the data source application according to the user interaction behavior to obtain updated data, and the updated data is used to re-render and display the target virtual card, and the container includes a native page within the host application or a mini-program page within the host application.
11. The method according to claim 10, characterized in that: Also includes: Obtain the target virtual card sent by the data source application; or, The target virtual card sent by the card platform is obtained; wherein the target virtual card is generated by the data source application and provided to the card platform.
12. The method according to claim 10, characterized in that: The user interaction behavior is used to trigger one or more interaction objects included in the target virtual card, and the update data is generated by the data source application for the triggered interaction objects.
13. The method according to claim 12, characterized in that: The data source application maintains in advance a mapping relationship between each interactive object and corresponding data, and the update data is determined by the data source application according to the triggered interactive object and the mapping relationship.
14. The method according to claim 12, characterized in that: The interactive object is a processing option related to the target event, and the update data is obtained after the data source application processes the target event according to the triggered processing option.
15. The method according to claim 14, characterized in that: The update data includes at least one of the following: a processing result of the target event, and information of an event associated with the target event.
16. The method according to claim 10, characterized in that: The data source application is another application different from the host application.
17. A method for realizing interaction through virtual cards, characterized in that: include: Render and display the target virtual cards related to the target function through the card rendering function; The target virtual card is generated by combining the card template defined in the target card model, the user interaction response logic and the event data defined in the target card model; the target card model defines the card template, user interaction response logic and the card rendering function related to the target function, and the target card model is maintained by the data source application; the event data is used to cooperate with the card template to realize the target event under the target function; In response to a user interaction behavior with respect to the target virtual card, communicating with the data source application through the user interaction response logic to obtain updated data; Processing the updated data through the card rendering function to re-render and display the target virtual card; A host application is determined, and the target virtual card is placed in the host application, where the target virtual card is placed in a container provided by the host application; wherein the container includes a native page in the host application or a mini-program page in the host application.
18. A device for generating a virtual card, characterized in that: include: A model acquisition unit, used to acquire a target card model, wherein the target card model defines a card template, user interaction response logic, and card rendering function related to a target function, and the target card model is maintained by a data source application; A data acquisition unit, used to acquire event data from a data source application, wherein the event data is used to cooperate with the card template to realize a target event under the target function; A card generation unit, configured to generate a target virtual card related to the target function by combining the card template defined in the target card model, the user interaction response logic defined in the target card model and the event data; determine a host application, and place the target virtual card into the host application; After the target virtual card is placed in the host application, the card rendering function is used to realize the rendering and display of the target virtual card in the host application, and the user interaction response logic is used to instruct the target virtual card to communicate with the data source application to obtain updated data according to the user interaction behavior, and the updated data is used to re-render and display the target virtual card; the target virtual card is placed in a container provided by the host application; wherein the container includes a native page within the host application or a mini-program page within the host application.
19. A device for realizing interaction through virtual cards, characterized in that: include: A card acquisition unit, used to acquire a target virtual card related to a target function, wherein the target virtual card is generated by a data source application, and is generated by combining a card template defined in a target card model, a user interaction response logic defined in the target card model, and event data; the target card model defines a card template, a user interaction response logic, and a card rendering function related to the target function, and the event data is used to cooperate with the card template to realize a target event under the target function; A card placement unit is used to determine a host application and place the target virtual card into the host application, where the target virtual card is placed in a container within the host application; wherein the card rendering function is used to implement rendering and display of the target virtual card in the container, and the user interaction response logic is used to instruct the target virtual card to communicate with the data source application to obtain updated data based on user interaction behavior, and the updated data is used to re-render and display the target virtual card; the container includes a native page within the host application or a mini-program page within the host application.
20. A device for realizing interaction through virtual cards, characterized in that: include: A rendering unit, used for rendering and displaying a target virtual card related to a target function through a card rendering function; The target virtual card is generated by combining the card template defined in the target card model, the user interaction response logic and the event data defined in the target card model; the target card model defines the card template, user interaction response logic and the card rendering function related to the target function, and the target card model is maintained by the data source application; the event data is used to cooperate with the card template to realize the target event under the target function; an interaction unit, configured to respond to a user interaction behavior with respect to the target virtual card, and communicate with the data source application through the user interaction response logic to obtain updated data; wherein the rendering unit further processes the updated data through the card rendering function to re-render and display the target virtual card; A delivery unit is used to determine a host application and deliver the target virtual card to the host application, wherein the target virtual card is placed in a container provided by the host application; wherein the container includes a native page within the host application or a mini-program page within the host application.
21. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 17 by running the executable instructions.
22. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 17 are implemented.
Citation Information
Patent Citations
Card management method and device, terminal and computer readable storage medium
CN109656592A
Page rendering system, page rendering method and page rendering device
CN109697266A
Card template creating method, card display method and device
CN110121004A
Card display method and device of affiliated application terminal, equipment and storage medium
CN110457038A
Small program interaction method and device, electronic equipment and storage medium
CN110928706A
