A method and device for controlling virtual elements

By introducing interactive icons and curve-moving virtual elements into the service order interface of the application service platform, the problem of insufficient user interactivity and poor animation effects is solved, and higher resource utilization and computing resource saving are achieved.

CN111857922BActive Publication Date: 2024-10-18BEIJING DIDI INFINITY TECH & DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010694264.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-17
Publication Date
2024-10-18
Estimated Expiration
2040-10-18

AI Technical Summary

Technical Problem

After the user initiates a service order, the existing application service platform lacks other leisure services, resulting in a lack of interaction between the user and the platform, low resource utilization, and the fixed movement trajectory of virtual elements leads to poor animation effects.

Method used

By introducing interactive icons into the service order interface, you can enter the interactive interface, respond to the sliding operation of virtual elements, calculate and control the virtual elements to move along the curve movement route, adjust the position of the virtual progress mark, increase user interactivity and save computing resources.

Benefits of technology

It improves the interaction between users and the service platform, improves resource utilization, and at the same time improves the animation effect and saves the computing resources of the terminal device through curved movement routes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111857922B_ABST
    Figure CN111857922B_ABST
Patent Text Reader

Abstract

The present application relates to the field of animation technology, and more particularly to a method and device for controlling virtual elements. By responding to the triggering operation of an interactive icon in an order interface, the interactive interface is entered, and in response to a sliding operation on any virtual element in the interactive interface, the virtual element is controlled to adjust its position, and in response to the positional relationship between at least two target virtual elements meeting a preset condition, the curved moving route of each target virtual element to move toward the virtual progress mark is calculated in the same curve calculation method, and each target virtual element is controlled to move along the corresponding curved moving route, and the position of the virtual progress mark is adjusted. Based on the above method, entering the interactive interface through the order interface can increase the interaction between the user and the service platform, and improve the resource utilization of the service platform. In addition, the virtual elements move along the curved moving route, which can save the computing resources of the terminal device while improving the animation effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of animation technology, and in particular to a method and device for controlling virtual elements. Background Art

[0002] At present, application service platforms mainly provide some services related to the platform business. For example, travel service platforms mainly provide services related to travel business. During the period from the time users initiate a service order to the end of the order, they usually do not pay attention to the service platform due to the lack of other leisure services. As a result, there is a lack of interaction between users and application service platforms, and the stickiness between users and application service platforms is low, resulting in low resource utilization of the service platform. Summary of the invention

[0003] In view of this, the embodiments of the present application at least provide a method and device for controlling a virtual element, which can improve the resource utilization of the service platform and save computing resources of the terminal device while improving the animation effect.

[0004] This application mainly includes the following aspects:

[0005] In a first aspect, an embodiment of the present application provides a method for controlling a virtual element, which is applied to a terminal device. The control method includes:

[0006] In response to a triggering operation of an interactive icon displayed in an order interface of a service order, an interactive interface is entered; the interactive interface displays a virtual progress indicator and a plurality of virtual elements;

[0007] In response to a sliding operation on any of the virtual elements, controlling the virtual element to adjust its position;

[0008] In response to the positional relationship between at least two target virtual elements among the multiple virtual elements meeting a preset condition, respectively calculating a curved moving route of each target virtual element moving toward the virtual progress indicator in the same curve calculation manner;

[0009] Each of the target virtual elements is controlled to move along a corresponding curved moving route, and the position of the virtual progress mark is adjusted.

[0010] In a possible implementation manner, the preset condition includes:

[0011] Among the multiple virtual elements, at least two target virtual elements of the same type are connected.

[0012] In a possible implementation manner, the curved moving route of each target virtual element moving toward the virtual progress indicator is calculated according to the following steps:

[0013] Determine, based on the first coordinates of each of the target virtual elements and the second coordinates of the virtual progress marker, a third coordinate of a waypoint of the curved moving route between the target virtual element and the virtual progress marker;

[0014] Based on the first coordinate of the target virtual element, the third coordinate of the waypoint corresponding to the target virtual element, and the second coordinate of the virtual progress marker, a curved moving route of the target virtual element toward the virtual progress marker is calculated.

[0015] In a possible implementation, determining the third coordinate of a waypoint of the curved moving route between the target virtual element and the virtual progress marker based on the first coordinate of each target virtual element and the second coordinate of the virtual progress marker includes:

[0016] determining, according to a positional relationship between the target virtual element and the virtual progress marker, a curve coefficient of a curved movement route of the target virtual element moving toward the virtual progress marker;

[0017] Based on the first coordinate of the target virtual element, the curve coefficient of the curved movement route between the target virtual element and the virtual progress marker, and the second coordinate of the virtual progress marker, the third coordinate of the waypoint of the curved movement route between the target virtual element and the virtual progress marker is determined.

[0018] In a possible implementation, the calculating, based on the first coordinate of the target virtual element, the third coordinate of the waypoint corresponding to the target virtual element, and the second coordinate of the virtual progress marker, the curved moving route of the target virtual element toward the virtual progress marker includes:

[0019] Calculating a curve parameter of a curved moving route between the target virtual element and the virtual progress indicator according to the first coordinate of the target virtual element, the third coordinate of a waypoint corresponding to the target virtual element, the second coordinate of the virtual progress indicator, and a preset curve formula;

[0020] The curved moving route of the target virtual element moving toward the virtual progress indicator is calculated according to the calculated curve parameters of the curved moving route corresponding to the target virtual element and the preset curve formula.

[0021] In a possible implementation, controlling each of the target virtual elements to move along a corresponding curved moving route includes:

[0022] Each of the at least two connected target virtual elements is controlled to move simultaneously along the corresponding curved moving routes at a preset speed.

[0023] In a possible implementation manner, adjusting the position of the virtual progress indicator includes:

[0024] The virtual progress indicator is controlled to move forward a preset distance along a preset path.

[0025] In a possible implementation manner, after controlling each of the target virtual elements to move along the corresponding curved movement route and adjusting the position of the virtual progress indicator, the control method further includes:

[0026] Determining whether the position of the virtual progress mark is a preset position;

[0027] If so, send the virtual resources to the account corresponding to the service order.

[0028] In a possible implementation, the virtual resource includes at least one of the following resources:

[0029] Discount coupons; vouchers; travel vouchers.

[0030] In a possible implementation manner, after the at least two target virtual elements move to the virtual progress mark, the control method further includes:

[0031] The at least two connected target virtual elements are eliminated.

[0032] In a possible implementation, the service order includes a travel order.

[0033] In a second aspect, an embodiment of the present application further provides a control device for a virtual element, which is applied to a terminal device, and the control device includes:

[0034] A display module, used to respond to a triggering operation of an interactive icon displayed in an order interface of a service order, and enter an interactive interface; the interactive interface displays a virtual progress indicator and a plurality of virtual elements;

[0035] A control module, configured to respond to a sliding operation on any of the virtual elements and control the virtual element to adjust its position;

[0036] A moving module, configured to calculate, in response to a positional relationship between at least two target virtual elements among the plurality of virtual elements meeting a preset condition, a curved moving route for each target virtual element to move toward the virtual progress indicator in the same curve calculation manner;

[0037] The adjustment module is used to control each of the target virtual elements to move along a corresponding curved moving route and adjust the position of the virtual progress mark.

[0038] In a possible implementation manner, the preset condition includes:

[0039] Among the multiple virtual elements, at least two target virtual elements of the same type are connected.

[0040] In a possible implementation, the mobile module includes:

[0041] a determining unit, configured to determine, based on the first coordinates of each of the target virtual elements and the second coordinates of the virtual progress marker, a third coordinate of a waypoint of the curved moving route between the target virtual element and the virtual progress marker;

[0042] A calculation unit is used to calculate a curved moving route of the target virtual element toward the virtual progress marker based on the first coordinate of the target virtual element, the third coordinate of the waypoint corresponding to the target virtual element, and the second coordinate of the virtual progress marker.

[0043] In a possible implementation manner, the determining unit is specifically configured to determine the third coordinate of the waypoint according to the following steps:

[0044] determining, according to a positional relationship between the target virtual element and the virtual progress marker, a curve coefficient of a curved movement route of the target virtual element moving toward the virtual progress marker;

[0045] Based on the first coordinate of the target virtual element, the curve coefficient of the curved movement route between the target virtual element and the virtual progress marker, and the second coordinate of the virtual progress marker, the third coordinate of the waypoint of the curved movement route between the target virtual element and the virtual progress marker is determined.

[0046] In a possible implementation manner, the calculation unit is used to calculate the curved movement route according to the following steps:

[0047] Calculating a curve parameter of a curved moving route between the target virtual element and the virtual progress indicator according to the first coordinate of the target virtual element, the third coordinate of a waypoint corresponding to the target virtual element, the second coordinate of the virtual progress indicator, and a preset curve formula;

[0048] The curved moving route of the target virtual element moving toward the virtual progress indicator is calculated according to the calculated curve parameters of the curved moving route corresponding to the target virtual element and the preset curve formula.

[0049] In a possible implementation manner, the adjustment module is used to adjust the position of the virtual progress indicator according to the following steps:

[0050] Each of the at least two connected target virtual elements is controlled to move simultaneously along the corresponding curved moving routes at a preset speed.

[0051] In a possible implementation, the adjustment module is used to:

[0052] The virtual progress indicator is controlled to move forward a preset distance along a preset path.

[0053] In a possible implementation manner, the control device further includes:

[0054] A determination module, used to determine whether the position of the virtual progress mark is a preset position;

[0055] The sending module is used to send the virtual resources to the account corresponding to the service order.

[0056] In a possible implementation, the virtual resource includes at least one of the following resources:

[0057] Discount coupons; vouchers; travel vouchers.

[0058] In a possible implementation manner, the adjustment module is further used for:

[0059] The at least two connected target virtual elements are eliminated.

[0060] In a possible implementation, the service order includes a travel order.

[0061] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the virtual element control method described in the first aspect or any possible implementation manner of the first aspect.

[0062] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for controlling a virtual element described in the first aspect or any possible implementation manner of the first aspect are executed.

[0063] The control method and arrangement of virtual elements provided in the embodiment of the present application are provided with an interactive icon in the order interface of the service order, and then when the interactive icon is triggered, the interactive interface can be entered. Compared with the application service platform in the prior art that lacks other types of services, resulting in a lack of interaction between users and the application service platform, the present application can increase the interaction between users and the service platform and improve the resource utilization of the service platform. In addition, compared with the virtual elements in the prior art that move along fixed routes, the virtual elements of the present application move along a curved movement route, which can improve the animation effect, and the curved movement route corresponding to each target virtual element is calculated separately in the same curve calculation method, which can reduce the amount of calculation of the curved movement route, and thus, can save the computing resources of the terminal device.

[0064] Furthermore, the control method of the virtual element provided in the embodiment of the present application determines the third coordinate of the waypoint of the curved moving route between the target virtual element and the virtual progress marker based on the first coordinate of each target virtual element and the second coordinate of the virtual progress marker, and then calculates the curved moving route of the target virtual element to the virtual progress marker based on the first coordinate of the target virtual element, the third coordinate of the waypoint corresponding to the target virtual element, and the second coordinate of the virtual progress marker. Based on the above method, the three points required for drawing the curved moving route all depend on the user's input and user behavior data. As the user's input changes dynamically at any time, the dynamic effect of the movement of the virtual element can be guaranteed, and the degree of interaction between the user and the terminal device can be improved.

[0065] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0067] Figure 1 A flowchart of a method for controlling a virtual element provided in an embodiment of the present application is shown;

[0068] Figure 2a A schematic diagram of an interactive interface before a virtual element moves to a virtual progress indicator provided by a specific embodiment of the present application is shown;

[0069] Figure 2bA schematic diagram of an interactive interface after a virtual element provided in a specific embodiment of the present application moves to a virtual progress indicator is shown;

[0070] Figure 3 One of the functional module diagrams of a virtual element control device provided in an embodiment of the present application is shown;

[0071] Figure 4 A functional module diagram of a mobile module provided in an embodiment of the present application is shown;

[0072] Figure 5 A second functional module diagram of a virtual element control device provided in an embodiment of the present application is shown;

[0073] Figure 6 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown.

[0074] Description of main component symbols:

[0075] In the figure: 300 - control device of virtual element; 310 - display module; 320 - control module; 330 - moving module; 331 - determination unit; 332 - calculation unit; 340 - adjustment module; 350 - determination module; 360 - sending module; 600 - electronic device; 610 - processor; 620 - memory; 630 - bus. DETAILED DESCRIPTION

[0076] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art, under the guidance of the content of the present application, can add one or more other operations to the flowchart, or remove one or more operations from the flowchart.

[0077] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0078] In order to enable those skilled in the art to use the contents of this application, the following implementation is provided in combination with the specific application scenario of "controlling virtual elements". For those skilled in the art, the general principles defined herein can be applied to other embodiments and application scenarios without departing from the spirit and scope of this application.

[0079] The following methods, devices, electronic devices or computer-readable storage media of the embodiments of the present application can be applied to any scenario where virtual elements need to be controlled. The embodiments of the present application are not limited to specific application scenarios. Any scheme using the control method and device of the virtual elements provided by the embodiments of the present application is within the protection scope of the present application.

[0080] It is worth noting that before this application was filed, the application service platform mainly provided some services related to the platform business. For example, the travel service platform mainly provided services related to the travel business. After the user initiated a service order, due to the lack of other leisure services, they usually would not pay attention to the service platform again. As a result, there was a lack of interaction between the user and the application service platform, resulting in low stickiness between the user and the application service platform.

[0081] In addition, in the game, the movement trajectory of the virtual elements is usually fixed and rigid. For example, in an elimination game, when eliminating virtual elements, the movement trajectories of different virtual elements are fixed, and the resulting animation effect is not good.

[0082] In response to the above problems, the embodiment of the present application enters the interactive interface by responding to the trigger operation of the interactive icon in the order interface, responds to the sliding operation on any virtual element in the interactive interface, controls the virtual element to adjust its position, responds to the position relationship between at least two target virtual elements meeting the preset conditions, calculates the curve movement route of each target virtual element to the virtual progress mark in the same curve calculation method, controls each target virtual element to move along the corresponding curve movement route, and adjusts the position of the virtual progress mark. Based on the above method, entering the interactive interface through the order interface can increase the interaction between the user and the service platform and improve the resource utilization of the service platform. In addition, the virtual elements move along the curve movement route, which can save the computing resources of the terminal device while improving the animation effect.

[0083] It should be noted that the terminal device includes but is not limited to a mobile terminal, a personal computer (PC), and a tablet computer.

[0084] To facilitate the understanding of the present application, the technical solution provided by the present application is described in detail below in conjunction with specific embodiments.

[0085] Figure 1 This is a flow chart of a method for controlling a virtual element provided in an embodiment of the present application. Figure 1 As shown, the control method of the virtual element provided in the embodiment of the present application is applied to a terminal device, comprising the following steps:

[0086] S101: responding to a triggering operation of an interactive icon displayed in an order interface of a service order, entering an interactive interface; the interactive interface displays a virtual progress indicator and a plurality of virtual elements.

[0087] In a specific implementation, when it is detected that the interactive icon displayed in the order interface of the service order is triggered, the interface jumps from the order interface to the interactive interface. Specifically, when the user is viewing the order interface of the service order, he sees the interactive icon displayed on the order interface. By clicking the interactive icon, the terminal device jumps the order interface to the interactive interface. Then, the user can operate the virtual elements on the interactive interface to realize the interaction between the user and the service platform, so as to improve the resource utilization of the service platform.

[0088] Here, the service order can be an order for various services, such as travel service orders, accommodation service orders, catering service orders, etc. The order interface can be an interface for completing an order or an interface for an order in progress. For example, the order interface for a travel service order can display interactive icons on the order interface for an uncompleted order, so that users can pass the time by operating virtual elements on the interactive interface during their travels, thereby realizing interaction between users and the application service platform; interactive icons can also be displayed on the order interface for completing an order, so that users can obtain virtual resources, such as rewards, by operating virtual elements on the interactive interface.

[0089] Among them, a virtual progress indicator and multiple virtual elements are displayed in the interactive interface. Here, the multiple virtual elements can be virtual elements of different types; the virtual progress indicator is used to indicate the progress of the interaction.

[0090] S102: In response to a sliding operation on any of the virtual elements, controlling the virtual element to adjust its position.

[0091] In a specific implementation, the user can slide the virtual elements displayed in the interactive interface. When the terminal device detects that any displayed virtual element is slid, it controls and adjusts the position of the virtual element according to the sliding position of the virtual element. For example, the first virtual element slides to the position of the second virtual element, and the position of the first virtual element and the position of the second virtual element are replaced, that is, the first virtual element moves to the position of the second virtual element, and similarly, the second virtual element moves to the position of the first virtual element.

[0092] S103: In response to the positional relationship between at least two target virtual elements among the multiple virtual elements meeting a preset condition, respectively calculating a curved moving route of each target virtual element moving toward the virtual progress indicator in the same curve calculation manner.

[0093] In a specific implementation, after the user slides the virtual element, it is detected whether there is a positional relationship between at least two target virtual elements among the multiple virtual elements displayed that meets the preset conditions. If so, in response to the positional relationship between the at least two target virtual elements meeting the preset conditions, the curved movement route between each target virtual element and the virtual progress marker is calculated separately using the same curve calculation method, and each target virtual element can move along its corresponding curved movement route to the position of the virtual progress marker.

[0094] Here, each target virtual element moves along the calculated curved moving route, which can improve the animation effect compared with the virtual element moving only along a fixed route. Since the calculation method of the curved moving route corresponding to each target virtual element in the present application is the same, the amount of calculation of the curved moving route can be reduced, thereby saving the computing resources of the terminal device. Among them, the curved moving route can be a Bezier curve, which is also called a Bezier curve or a Bezier curve, and is a mathematical curve applied to two-dimensional graphics applications.

[0095] Optionally, the preset condition is that there are at least two target virtual elements of the same type connected among the multiple virtual elements displayed. For example, when three target virtual elements of the same type are detected to be connected, the three connected target virtual elements are moved to the virtual progress mark for elimination.

[0096] Optionally, when it is detected that the positional relationship between at least two target virtual elements among the displayed multiple virtual elements meets the preset conditions, the curved moving route of each target virtual element moving toward the virtual progress indicator is first calculated. Specifically, for any target virtual element, the target virtual element is taken as the starting point and the virtual progress indicator is taken as the end point, and the waypoint between the starting point and the end point is found. Then, according to the starting point, the waypoint, and the end point, a curved moving path from the position of the target virtual element, through the position of the waypoint, to the position of the virtual progress indicator is calculated. That is, in step S103, the curved moving route of each target virtual element moving toward the virtual progress indicator is calculated according to the following steps:

[0097] Step 1031: Based on the first coordinates of each of the target virtual elements and the second coordinates of the virtual progress marker, determine the third coordinates of the waypoints of the curved moving route between the target virtual element and the virtual progress marker.

[0098] In a specific implementation, for any target virtual element, the first coordinate of the target virtual element and the current second coordinate of the virtual progress marker are determined, and then, based on the first coordinate of the target virtual element and the second coordinate of the virtual progress marker, the third coordinate of the passing point of the curved moving route between the target virtual element and the virtual progress marker is calculated.

[0099] Optionally, determining the third coordinate of a waypoint of the curved moving route between the target virtual element and the virtual progress marker based on the first coordinate of each target virtual element and the second coordinate of the virtual progress marker in step 1031 comprises the following steps:

[0100] According to the positional relationship between the target virtual element and the virtual progress marker, a curve coefficient of the curved movement route of the target virtual element toward the virtual progress marker is determined; based on the first coordinate of the target virtual element, the curve coefficient of the curved movement route between the target virtual element and the virtual progress marker, and the second coordinate of the virtual progress marker, a third coordinate of a waypoint on the curved movement route between the target virtual element and the virtual progress marker is determined.

[0101] In a specific implementation, when calculating the third coordinate of a passing point of a curved moving route between a target virtual element and a virtual progress indicator, the positional relationship between the target virtual element and the virtual progress indicator can be determined first, and then the curve direction can be determined according to the positional relationship, and the curve coefficient of the curved moving route of the target virtual element moving toward the virtual progress indicator can be determined by the curve direction, and further, based on the first coordinate of the target virtual element, the curve coefficient of the curved moving route between the target virtual element and the virtual progress indicator, and the second coordinate of the virtual progress indicator, the third coordinate of the passing point of the curved moving route between the target virtual element and the virtual progress indicator can be jointly determined.

[0102] In one example, the target virtual element P1(x p1 ,y p1 ) is the starting point, and the virtual progress mark P2(x p2 ,y p2 ) as the end point, calculate the waypoint P3 (x p3 ,y p3 ), first determine the positional relationship between point P1 and point P2. If P2 is to the left of P1, that is, x p2 ≤x p1 , then the curve coefficient K = a of the curve moving route from P1 to P2; if P2 is on the right side of P1, that is, x p2 >x p1 , then the curve coefficient K = b of the curve moving route from P1 to P2; where a and b are both constants, a<0, b>0. The calculation formula for point P3 can be: p3 =(x p1 -x p2 ) / 3+K;y p3 =(y p1 -y p2 )*(2 / 3)+y p2 In this way, the passing point P3 of the curved moving route between the target virtual element P1 and the virtual progress mark P2 is calculated.

[0103] Step 1032: Based on the first coordinate of the target virtual element, the third coordinate of the waypoint corresponding to the target virtual element, and the second coordinate of the virtual progress marker, calculate the curved moving route of the target virtual element toward the virtual progress marker.

[0104] In a specific implementation, based on the first coordinate of the target virtual element, the third coordinate of the waypoint corresponding to the target virtual element, and the second coordinate of the virtual progress marker, the curved movement route of the target virtual element toward the virtual progress marker can be directly calculated. Here, for each target virtual element among at least two of the multiple virtual elements displayed, the curved movement route corresponding to each target virtual element is calculated according to the above-mentioned curve calculation method.

[0105] It should be noted that in the design of some interactive interfaces or games, the curved movement route of the virtual element can change dynamically with the user's input, so that the user can be given timely, rich, and dynamically changing feedback experience and interactive experience. For this application, the coordinates of the starting point (target virtual element) are determined by the position after the user's sliding operation, and the end point (virtual progress bar) is calculated by the user's previous interaction and data accumulation, that is, as the target virtual element moves to the virtual progress mark, the position of the virtual progress mark also changes with the transmission, and the coordinates of the waypoints are calculated from the coordinates of the starting point and the end point. That is, through the user's operation, the curved trajectory followed by the movement of the elements in the interactive interface, the starting point, end point, and waypoints of which all depend on the user's input and are calculated in real time and dynamically. Due to the increase in the interactive link, the stickiness between the user and the service platform can be improved, and the user's perception can be improved.

[0106] Optionally, in step 1032, based on the first coordinate of the target virtual element, the third coordinate of the waypoint corresponding to the target virtual element, and the second coordinate of the virtual progress marker, calculating the curved movement route of the target virtual element toward the virtual progress marker comprises the following steps:

[0107] According to the first coordinate of the target virtual element, the third coordinate of the waypoint corresponding to the target virtual element, the second coordinate of the virtual progress marker, and a preset curve formula, the curve parameters of the curved movement route between the target virtual element and the virtual progress marker are calculated; according to the calculated curve parameters of the curved movement route corresponding to the target virtual element and the preset curve formula, the curved movement route of the target virtual element toward the virtual progress marker is calculated.

[0108] In a specific implementation, after calculating the third coordinate of the waypoint corresponding to the target virtual element, the curve parameters of the curved movement route between the target virtual element and the virtual progress marker can be calculated according to the first coordinate of the target virtual element, the third coordinate of the waypoint corresponding to the target virtual element, the second coordinate of the virtual progress marker, and the preset curve formula. Here, the preset curve formula is used to limit the curved movement routes corresponding to each target virtual element to remain consistent. For example, the preset curve formula is a Bezier curve formula. In this way, the first coordinate of the target virtual element, the second coordinate of the virtual progress marker, and the third coordinate of the waypoint corresponding to the target virtual element are substituted into the preset curve formula, and the curve parameters of the curved movement route corresponding to the target virtual element can be calculated, thereby calculating the curved movement route of the target virtual element to the virtual progress marker.

[0109] S104: Control each of the target virtual elements to move along a corresponding curved moving route, and adjust the position of the virtual progress mark.

[0110] In a specific implementation, when it is detected that the positional relationship between at least two target virtual elements among the multiple virtual elements displayed in the interactive interface meets the preset conditions, each of the at least two target virtual elements is controlled to move along the calculated corresponding curved movement route, and when the at least two target virtual elements move to the position of the virtual progress marker, the position of the virtual progress marker is adjusted.

[0111] Optionally, in step S104, controlling each of the target virtual elements to move along a corresponding curved moving route includes the following steps:

[0112] Each of the at least two connected target virtual elements is controlled to move simultaneously along the corresponding curved moving routes at a preset speed.

[0113] In a specific implementation, when it is detected that the positional relationship between at least two target virtual elements among the multiple virtual elements displayed in the interactive interface meets a preset condition, where the preset condition is that the at least two target virtual elements are connected and each of the at least two target virtual elements is of the same type, then each of the at least two connected target virtual elements is controlled to move simultaneously along their corresponding curved moving routes at a preset speed.

[0114] Here, adjusting the position of the virtual progress indicator in step S104 includes:

[0115] The virtual progress indicator is controlled to move forward a preset distance along a preset path.

[0116] In a specific implementation, the virtual progress marker is used to indicate the progress of the interaction. Each time the positional relationship between at least two target virtual elements meets a preset condition, when the at least two target virtual elements move to the virtual progress marker, the virtual progress marker will move forward a preset distance along a preset path.

[0117] Optionally, after each adjustment of the position of the virtual progress indicator, it is necessary to detect whether the current position of the virtual progress indicator reaches the preset position. If so, virtual resources can be sent to the account corresponding to the service order as a reward. That is, after controlling each of the target virtual elements to move along the corresponding curved moving route and adjusting the position of the virtual progress indicator in step S104, the following steps are also included:

[0118] Determine whether the location of the virtual progress indicator is a preset location; if so, send the virtual resource to the account corresponding to the service order.

[0119] In a specific implementation, after each adjustment of the position of the virtual progress marker, it is detected whether the current position of the virtual progress marker reaches the preset position. Specifically, a progress end marker can be set on the interactive interface, that is, it is detected whether the virtual progress marker moves to the progress end marker. If so, virtual resources can be sent to the account corresponding to the service order. Here, the virtual resources are sent to the user as a reward; if not, it is continued to detect whether there are at least two target virtual elements among the multiple virtual resources displayed whose positional relationship meets the preset conditions.

[0120] Here, the virtual resource includes at least one of the following resources: discount coupons; vouchers; travel coupons.

[0121] In the specific implementation, when the user operates the virtual elements on the interactive interface and makes the virtual progress indicator reach the preset position, it can be understood that the user has successfully passed the level and completed the task. Then, virtual resources are sent to the account corresponding to the current service order as rewards. Usually, the virtual resources are rewards related to the service business corresponding to the service order, such as discount coupons, vouchers, and travel coupons. In this way, the interaction between users and the service platform can be increased, the stickiness between users and the service platform can be improved, and the resource utilization rate of the service platform can be improved.

[0122] Here, after at least two target virtual elements satisfying preset conditions among the multiple virtual elements displayed on the interactive interface are moved to the virtual progress mark, the at least two connected target virtual elements are eliminated.

[0123] like Figure 2a and Figure 2b As shown, Figure 2a A schematic diagram of an interactive interface before a virtual element moves to a virtual progress indicator provided by a specific embodiment of the present application is shown. Figure 2bA schematic diagram of an interactive interface after a virtual element provided in a specific embodiment of the present application moves to a virtual progress indicator is shown. Figure 2a and Figure 2b Multiple virtual elements of different types and virtual progress indicators are displayed on the interactive interface, wherein the patterns and shapes of different types of virtual elements are different.

[0124] Figure 2a The virtual elements in the dotted area are elements of the same type, and three virtual elements of the same type are connected, that is, the positional relationship between the three virtual elements meets the preset conditions. Here, the virtual elements in the dotted area are called target virtual elements, and then, each target virtual element is controlled to move to the position of the virtual progress mark along the corresponding curved moving route. Figure 2b A schematic diagram of an interactive interface after a virtual element provided in a specific embodiment of the present application moves to a virtual progress indicator is shown. Figure 2b The virtual elements in the dashed area are Figure 2a The virtual element originally located in a row above the target virtual element is eliminated, and at this time, the virtual progress indicator moves forward a preset distance along a preset path.

[0125] Here, the interactive interface takes the game interface as an example. Figure 2a and Figure 2b To elaborate, after detecting that any three virtual elements (such as beads) on the screen are connected together, the three virtual elements "carpool" successfully, and the three virtual elements will fly along a curve into the virtual progress mark (car) at the top of the screen; each time a group is formed, the accumulated data will increase. The position of the virtual progress mark is the current position of the progress bar of the number of pieces. As the user continues to form a group, the user's score will continue to accumulate, the progress bar will increase, and the virtual progress mark will continue to move closer to the preset position. Here, Figure 2a The target virtual element in is the starting point, and the virtual progress marker is the end point.

[0126] In the embodiment of the present application, by responding to the trigger operation of the interactive icon in the order interface, entering the interactive interface, responding to the sliding operation on any virtual element in the interactive interface, controlling the virtual element to adjust its position, responding to the positional relationship between at least two target virtual elements meeting the preset conditions, respectively calculating the curve movement route of each target virtual element to the virtual progress mark in the same curve calculation method, and controlling each target virtual element to move along the corresponding curve movement route, and adjusting the position of the virtual progress mark. Based on the above method, entering the interactive interface through the order interface can increase the interaction between the user and the service platform and improve the resource utilization of the service platform. In addition, the virtual elements move along the curve movement route, which can save the computing resources of the terminal device while improving the animation effect.

[0127] Based on the same application concept, the embodiments of the present application also provide a control device for a virtual element corresponding to the control method for a virtual element provided in the above embodiments. Since the principle of solving the problem by the device in the embodiments of the present application is similar to the control method for a virtual element in the above embodiments of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0128] like Figures 3 to 5 As shown, Figure 3 One of the functional module diagrams of a virtual element control device provided in an embodiment of the present application is shown; Figure 4 A functional module diagram of a mobile module provided in an embodiment of the present application is shown; Figure 5 A second functional module diagram of a virtual element control device provided in an embodiment of the present application is shown.

[0129] like Figure 3 As shown, the control device 300 of the virtual element includes:

[0130] The display module 310 is used to respond to the triggering operation of the interactive icon displayed in the order interface of the service order and enter the interactive interface; the interactive interface displays a virtual progress indicator and multiple virtual elements;

[0131] The control module 320 is used to control the virtual element to adjust its position in response to a sliding operation on any of the virtual elements;

[0132] A moving module 330 is configured to calculate, in response to a positional relationship between at least two target virtual elements among the plurality of virtual elements meeting a preset condition, a curved moving route for each target virtual element to move toward the virtual progress indicator in the same curve calculation manner;

[0133] The adjustment module 340 is used to control each of the target virtual elements to move along a corresponding curved moving route and adjust the position of the virtual progress indicator.

[0134] In a possible implementation manner, the preset condition includes:

[0135] Among the multiple virtual elements, at least two target virtual elements of the same type are connected.

[0136] In a possible implementation, Figure 4 As shown, the mobile module 330 includes:

[0137] A determining unit 331, configured to determine a third coordinate of a waypoint of a curved moving route between the target virtual element and the virtual progress indicator based on the first coordinate of each target virtual element and the second coordinate of the virtual progress indicator;

[0138] The calculation unit 332 is used to calculate the curved moving route of the target virtual element toward the virtual progress marker based on the first coordinate of the target virtual element, the third coordinate of the waypoint corresponding to the target virtual element, and the second coordinate of the virtual progress marker.

[0139] In a possible implementation, Figure 4 As shown, the determining unit 331 is specifically configured to determine the third coordinate of the waypoint according to the following steps:

[0140] determining, according to a positional relationship between the target virtual element and the virtual progress marker, a curve coefficient of a curved movement route of the target virtual element moving toward the virtual progress marker;

[0141] Based on the first coordinate of the target virtual element, the curve coefficient of the curved movement route between the target virtual element and the virtual progress marker, and the second coordinate of the virtual progress marker, the third coordinate of the waypoint of the curved movement route between the target virtual element and the virtual progress marker is determined.

[0142] In a possible implementation, Figure 4 As shown, the calculation unit 332 is used to calculate the curved moving route according to the following steps:

[0143] Calculating a curve parameter of a curved moving route between the target virtual element and the virtual progress indicator according to the first coordinate of the target virtual element, the third coordinate of a waypoint corresponding to the target virtual element, the second coordinate of the virtual progress indicator, and a preset curve formula;

[0144] The curved moving route of the target virtual element moving toward the virtual progress indicator is calculated according to the calculated curve parameters of the curved moving route corresponding to the target virtual element and the preset curve formula.

[0145] In a possible implementation, Figure 3 As shown, the adjustment module 340 is used to adjust the position of the virtual progress mark according to the following steps:

[0146] Each of the at least two connected target virtual elements is controlled to move simultaneously along the corresponding curved moving routes at a preset speed.

[0147] In a possible implementation, Figure 3 As shown, the adjustment module 340 is used to:

[0148] The virtual progress indicator is controlled to move forward a preset distance along a preset path.

[0149] In a possible implementation, Figure 5 As shown, the control device 300 of the virtual element further includes:

[0150] A determination module 350 is used to determine whether the position of the virtual progress mark is a preset position;

[0151] The sending module 360 ​​is used to send the virtual resources to the account corresponding to the service order.

[0152] In a possible implementation, the virtual resource includes at least one of the following resources:

[0153] Discount coupons; vouchers; travel vouchers.

[0154] In the embodiment of the present application, by responding to the trigger operation of the interactive icon in the order interface, entering the interactive interface, responding to the sliding operation on any virtual element in the interactive interface, controlling the virtual element to adjust its position, responding to the positional relationship between at least two target virtual elements meeting the preset conditions, respectively calculating the curve movement route of each target virtual element to the virtual progress mark in the same curve calculation method, and controlling each target virtual element to move along the corresponding curve movement route, and adjusting the position of the virtual progress mark. Based on the above method, entering the interactive interface through the order interface can increase the interaction between the user and the service platform and improve the resource utilization of the service platform. In addition, the virtual elements move along the curve movement route, which can save the computing resources of the terminal device while improving the animation effect.

[0155] Based on the same application concept, see Figure 6 As shown, it is a structural schematic diagram of an electronic device 600 provided in an embodiment of the present application, including: a processor 610, a memory 620 and a bus 630, the memory 620 stores machine-readable instructions executable by the processor 610, when the electronic device 600 is running, the processor 610 and the memory 620 communicate through the bus 630, and the machine-readable instructions are executed by the processor 610 when running to perform the steps of the virtual element control method as described in any of the above embodiments.

[0156] Specifically, when the machine-readable instruction is executed by the processor 610, the following processing may be performed:

[0157] In response to a triggering operation of an interactive icon displayed in an order interface of a service order, an interactive interface is entered; the interactive interface displays a virtual progress indicator and a plurality of virtual elements;

[0158] In response to a sliding operation on any of the virtual elements, controlling the virtual element to adjust its position;

[0159] In response to the positional relationship between at least two target virtual elements among the multiple virtual elements meeting a preset condition, respectively calculating a curved moving route of each target virtual element moving toward the virtual progress indicator in the same curve calculation manner;

[0160] Each of the target virtual elements is controlled to move along a corresponding curved moving route, and the position of the virtual progress mark is adjusted.

[0161] In the embodiment of the present application, by responding to the trigger operation of the interactive icon in the order interface, entering the interactive interface, responding to the sliding operation on any virtual element in the interactive interface, controlling the virtual element to adjust its position, responding to the positional relationship between at least two target virtual elements meeting the preset conditions, respectively calculating the curve movement route of each target virtual element to the virtual progress mark in the same curve calculation method, and controlling each target virtual element to move along the corresponding curve movement route, and adjusting the position of the virtual progress mark. Based on the above method, entering the interactive interface through the order interface can increase the interaction between the user and the service platform, improve the resource utilization of the service platform, and in addition, the virtual elements move along the curve movement route, which can save the computing resources of the terminal device while improving the animation effect.

[0162] Based on the same application concept, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the virtual element control method provided in the above embodiment are executed.

[0163] Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the storage medium is run, it can execute the above-mentioned virtual element control method, and enter the interactive interface through the order interface, which can increase the interaction between the user and the service platform and improve the resource utilization of the service platform. In addition, the virtual elements move along the curved moving route, which can save the computing resources of the terminal device while improving the animation effect.

[0164] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0165] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0166] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0167] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0168] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for controlling a virtual element, characterized in that: Applied to a terminal device, the control method includes: In response to a triggering operation of an interactive icon displayed in an order interface of a service order, an interactive interface is entered; the interactive interface displays a virtual progress indicator and a plurality of virtual elements; In response to a sliding operation on any of the virtual elements, controlling the virtual element to adjust its position; In response to the positional relationship between at least two target virtual elements among the multiple virtual elements meeting a preset condition, respectively calculating a curved moving route of each target virtual element moving toward the virtual progress indicator in the same curve calculation manner; Each of the target virtual elements is controlled to move along a corresponding curved moving route, and the position of the virtual progress mark is adjusted.

2. The control method according to claim 1, characterized in that: The preset conditions include: Among the multiple virtual elements, at least two target virtual elements of the same type are connected.

3. The control method according to claim 1, characterized in that: The curved moving route of each target virtual element moving toward the virtual progress indicator is calculated according to the following steps: Determine, based on the first coordinates of each of the target virtual elements and the second coordinates of the virtual progress marker, a third coordinate of a waypoint of the curved moving route between the target virtual element and the virtual progress marker; Based on the first coordinate of the target virtual element, the third coordinate of the waypoint corresponding to the target virtual element, and the second coordinate of the virtual progress marker, a curved moving route of the target virtual element toward the virtual progress marker is calculated.

4. The control method according to claim 3, characterized in that: The determining, based on the first coordinate of each of the target virtual elements and the second coordinate of the virtual progress indicator, a third coordinate of a waypoint of the curved moving route between the target virtual element and the virtual progress indicator comprises: determining, according to a positional relationship between the target virtual element and the virtual progress indicator, a curve coefficient of a curved movement route of the target virtual element moving toward the virtual progress indicator; Based on the first coordinate of the target virtual element, the curve coefficient of the curved movement route between the target virtual element and the virtual progress marker, and the second coordinate of the virtual progress marker, the third coordinate of the waypoint of the curved movement route between the target virtual element and the virtual progress marker is determined.

5. The control method according to claim 3, characterized in that: The calculating, based on the first coordinate of the target virtual element, the third coordinate of the waypoint corresponding to the target virtual element, and the second coordinate of the virtual progress marker, a curved moving route of the target virtual element toward the virtual progress marker comprises: Calculating a curve parameter of a curved moving route between the target virtual element and the virtual progress indicator according to the first coordinate of the target virtual element, the third coordinate of a waypoint corresponding to the target virtual element, the second coordinate of the virtual progress indicator, and a preset curve formula; The curved moving route of the target virtual element moving toward the virtual progress indicator is calculated according to the calculated curve parameters of the curved moving route corresponding to the target virtual element and the preset curve formula.

6. The control method according to claim 2, characterized in that: The controlling each of the target virtual elements to move along a corresponding curved moving route comprises: Each of the at least two connected target virtual elements is controlled to move simultaneously along the corresponding curved moving routes at a preset speed.

7. The control method according to claim 6, characterized in that: The adjusting the position of the virtual progress indicator includes: The virtual progress indicator is controlled to move forward a preset distance along a preset path.

8. The control method according to claim 1, characterized in that: After controlling each of the target virtual elements to move along the corresponding curved moving route and adjusting the position of the virtual progress mark, the control method further includes: Determining whether the position of the virtual progress mark is a preset position; If so, send the virtual resources to the account corresponding to the service order.

9. The control method according to claim 8, characterized in that: The virtual resource includes at least one of the following resources: Discount coupons; vouchers; travel vouchers.

10. The control method according to claim 2, characterized in that: After the at least two target virtual elements are moved to the virtual progress mark, the control method further includes: The at least two connected target virtual elements are eliminated.

11. The control method according to claim 1, characterized in that: The service order includes a travel order.

12. A control device for a virtual element, characterized in that: Applied to terminal equipment, the control device comprises: A display module, used to respond to a triggering operation of an interactive icon displayed in an order interface of a service order, and enter an interactive interface; the interactive interface displays a virtual progress indicator and a plurality of virtual elements; A control module, configured to respond to a sliding operation on any of the virtual elements and control the virtual element to adjust its position; A moving module, configured to calculate, in response to a positional relationship between at least two target virtual elements among the plurality of virtual elements meeting a preset condition, a curved moving route for each target virtual element to move toward the virtual progress indicator in the same curve calculation manner; The adjustment module is used to control each of the target virtual elements to move along a corresponding curved moving route and adjust the position of the virtual progress mark.

13. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the control method of the virtual element as described in any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for controlling a virtual element according to any one of claims 1 to 11 are executed.

Citation Information

Patent Citations

  • Animation display method, device and equipment and storage medium

    CN111275797A

  • Virtual article interaction method and device, computer equipment and storage medium

    CN111324253A