Methods, devices, and storage media for generating motion data sharing templates
By dynamically generating sports data sharing templates on the server side, the problem of insufficient flexibility in template adjustment and expansion in existing technologies is solved, enabling efficient and personalized sports data display, and improving user experience and application vitality.
Patent Information
- Application Number
- CN202411996212.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-12-31
AI Technical Summary
Existing sports data sharing templates are limited by the client's native development model, making it difficult to adjust or expand flexibly, resulting in high development and maintenance costs and insufficient timeliness and diversity in user experience.
The server dynamically generates sports data sharing templates, queries stickers from the database based on the target sports type, and combines them into the target data layer. The client receives and displays the dynamically generated templates, reducing the frequency of client updates.
It improves the flexibility and efficiency of template generation, optimizes the user experience, reduces development and maintenance costs, and meets users' diverse needs for displaying sports data.
Smart Images

Figure CN119762617B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software technology, and more specifically, to a method, apparatus, and storage medium for generating motion data sharing templates. Background Technology
[0002] In today's mobile internet era, fitness social apps have become important tools for promoting healthy lifestyles. Users record detailed data such as exercise routes, calories burned, and exercise duration through these apps, and can share these achievements on social media to interact with friends and communities, inspiring each other. However, the existing fitness sharing template system is limited by the native client-side development model, meaning that any changes to or additions to templates require updates to the client application. This not only increases development and maintenance costs but also reduces the timeliness and diversity of the user experience, as users must wait for application updates to enjoy new sharing templates or more flexible template editing features.
[0003] Specifically, exercise data sharing templates typically consist of several fixed elements, including borders, backgrounds, masks, data layers, and stickers. The data layer is the core of the template, used to display the user's exercise data, such as distance, speed, and calories burned. However, the display format of this data (such as pie charts, bar charts, and exercise calendars) is fixed in the client-side and cannot be dynamically adjusted or expanded. For example, if a user wants to move the display of exercise distance from the top to the bottom of the template, or replace the original line chart with a bar chart, such requests are difficult to meet immediately under the current technological framework, requiring a series of cumbersome processes including client-side development, testing, and release. Furthermore, with the increasing variety of sports, specific sports such as dog walking and stair climbing may require customized data layer display methods. This rapid growth in demand further highlights the shortcomings of existing technologies in terms of flexibility and responsiveness.
[0004] There is currently no effective solution to the above problems. Summary of the Invention
[0005] The main objective of this application is to provide a method, apparatus, and storage medium for generating sports data sharing templates, so as to at least solve the technical problem that traditional sports data sharing templates cannot flexibly add template styles according to dynamic needs.
[0006] To achieve the above objectives, according to one aspect of the embodiments of this application, a method for generating a sports data sharing template is provided, comprising: extracting the target sports type of a target user from a template generation request sent by a client via a server, wherein the template generation request is used to represent that the target user expects to generate a data sharing template corresponding to the target sports type on the client, and different sports types correspond to different data sharing templates; retrieving L stickers associated with the target sports type from a database via the server according to the target sports type, wherein L is an integer greater than or equal to 1, and each sticker represents a template element; when L is an integer greater than 1, combining the L stickers into a target data layer according to the preset position and preset layer of each sticker, wherein the target data layer is used to display the target user's sports data and sports trajectory; and sending the target data layer to the client, wherein the client generates a data sharing template corresponding to the target user based on the target data layer.
[0007] Optionally, before retrieving L stickers associated with the target motion type from the database based on the target motion type, N stickers are generated, where N is an integer greater than 1. The sticker types include at least a first type and a second type. Stickers of the first type are used to represent data elements, and stickers of the second type are used to represent pattern elements. Sticker attributes are set for each sticker, where the sticker attributes are used to determine whether the sticker can be rotated, dragged, and scaled. The N stickers and their sticker attributes are stored in the database.
[0008] Optionally, after storing N stickers and their sticker attributes in the database, a configuration file is generated, wherein the configuration file is used to establish the association between any sports type and at least one sticker; and a style file corresponding to any sports type is generated in the client based on the configuration file, wherein the style file includes the sticker attributes of the stickers associated with that sports type.
[0009] Optionally, when L is an integer greater than 1, the L stickers are combined into a target data layer according to the preset position and preset layer of each sticker, including: obtaining the interface size of the client's display interface; determining the size of each sticker in the L stickers according to the interface size; and combining the L stickers into a target data layer by the server according to the preset position and preset layer of each sticker.
[0010] Optionally, sending the target data layer to the client includes: sending the target data layer and at least one template element to the client, wherein the client generates a data sharing template corresponding to the target user based on the target data layer and at least one template element, and the at least one template element includes: a first element for representing the border of the data sharing template corresponding to the target user; a second element for representing the background image of the data sharing template corresponding to the target user; a third element for representing the mask of the data sharing template corresponding to the target user; and a fourth element for representing the image sticker used in conjunction with the target data layer in the data sharing template corresponding to the target user.
[0011] Optionally, after retrieving L stickers associated with the target motion type from the database based on the target motion type, when L equals 1, one sticker retrieved from the database is used as the target data layer.
[0012] To achieve the above objectives, according to another aspect of the embodiments of this application, a method for displaying a sports data sharing template is also provided, comprising: sending a template generation request to a server through a client, wherein the template generation request is used to represent that the target user expects to generate a data sharing template corresponding to the target sports type on the client, and different sports types correspond to different data sharing templates; receiving a target data layer generated by the server according to the target sports type, wherein the target data layer is used to display the target user's sports data and sports trajectory, and the target data layer is composed of L stickers obtained by the server according to the preset position and preset layer of each sticker, wherein L is an integer greater than or equal to 1, and each sticker represents a template element; and generating and displaying the data sharing template corresponding to the target user through the client based on the target data layer.
[0013] Optionally, the client generates and displays a data sharing template corresponding to the target user based on the target data layer, including: using the client, parsing each sticker in the target data layer according to the style file built into the client corresponding to the target motion type, wherein the style file includes sticker attributes of stickers associated with the target motion type; rendering each sticker in the target data layer in the client's display interface according to the sticker attributes of each sticker recorded in the style file, thereby obtaining and displaying the data sharing template corresponding to the target user.
[0014] To achieve the above objectives, according to another aspect of the embodiments of this application, an apparatus for generating a sports data sharing template is also provided, comprising: an extraction unit, which extracts the target sports type of a target user from a template generation request sent by a client via a server, wherein the template generation request is used to represent that the target user expects to generate a data sharing template corresponding to the target sports type on the client, and different sports types correspond to different data sharing templates; a query unit, which queries a database based on the target sports type via a server to obtain L stickers associated with the target sports type, wherein L is an integer greater than or equal to 1, and each sticker represents a template element; a combination unit, which, when L is an integer greater than 1, combines the L stickers into a target data layer according to the preset position and preset layer of each sticker, wherein the target data layer is used to display the sports data and sports trajectory of the target user; and a sending unit, which sends the target data layer to the client, wherein the client generates a data sharing template corresponding to the target user based on the target data layer.
[0015] To achieve the above objectives, according to another aspect of the embodiments of this application, a display device for a sports data sharing template is also provided, comprising: a request sending unit, which sends a template generation request to a server through a client, wherein the template generation request is used to represent that the target user expects to generate a data sharing template corresponding to the target sports type on the client, and different sports types correspond to different data sharing templates; a receiving unit, which receives a target data layer generated by the server according to the target sports type, wherein the target data layer is used to display the target user's sports data and sports trajectory, and the target data layer is composed of L stickers obtained by the server according to the preset position and preset layer of each sticker, wherein L is an integer greater than or equal to 1, and each sticker represents a template element; and a display unit, which generates and displays the data sharing template corresponding to the target user through the client based on the target data layer.
[0016] According to another aspect of the embodiments of this application, an electronic device is also provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when one or more programs are executed by one or more processors, the one or more processors cause the one or more processors to execute the above-described method for generating a motion data sharing template and the method for displaying a motion data sharing template.
[0017] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, which stores a computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located executes the above-described method for generating a motion data sharing template and the method for displaying a motion data sharing template.
[0018] In this application, the server first extracts the target user's target movement type from the template generation request sent by the client. The template generation request represents the target user's expectation to generate a data sharing template corresponding to the target movement type on the client; different movement types correspond to different data sharing templates. Then, the server retrieves L stickers associated with the target movement type from the database, where L is an integer greater than or equal to 1, and each sticker represents a template element. When L is a greater than 1, the L stickers are combined into a target data layer according to their preset positions and layers. This target data layer displays the target user's movement data and trajectory. Finally, the target data layer is sent to the client, which generates the corresponding data sharing template for the target user based on the target data layer.
[0019] As described above, the server can identify the target user's target sport type based on the template generation request sent by the client. This means that the generation of sharing templates is no longer limited to fixed templates preset by the client, but can dynamically generate corresponding templates according to different sport types. This greatly enhances the adaptability and scalability of sharing templates. For example, indoor running and outdoor cycling require different data types and formats to be displayed. The server can select the most suitable sticker combination based on the sport type to generate the data sharing template that best fits that sport.
[0020] Secondly, L stickers related to the target exercise type are retrieved via server-side query. These stickers are then combined according to their preset positions and layers to form the target data layer. This process enables flexible combination of template elements, allowing the data sharing template to be customized based on the characteristics of the exercise data and user preferences, thus improving the template's personalization and usability. For example, users can choose to place the exercise distance at the top and the exercise time at the bottom, or integrate the exercise trajectory into the background, instead of using a fixed layout.
[0021] It's important to note that in traditional technologies, adding new template styles or adjusting existing templates requires a client-side re-release, which is not only time-consuming but can also negatively impact user experience due to compatibility issues caused by version updates. In this application's solution, however, adjustments to template styles and element layouts are primarily completed on the server side. The client only needs to receive the target data layer from the server and generate a data-sharing template accordingly. This avoids frequent client updates, improving development efficiency and user satisfaction. Furthermore, dynamically generated data-sharing templates more accurately reflect users' exercise data and trajectories, while allowing users to customize selections based on exercise type and personal preferences. This not only provides a richer visual experience but also increases the fun and appeal of sharing, thereby stimulating users' willingness to share exercise data and promoting community interaction and user engagement.
[0022] Therefore, the server-side dynamic template generation mechanism facilitates content innovation and template iteration. Product teams can more quickly try out and launch new template designs without waiting for client version update cycles. This helps maintain the application's vitality and competitiveness, meeting users' ever-changing needs. Furthermore, clients no longer need frequent updates to adapt to new template styles or movement types, reducing development workload and version maintenance costs. Simultaneously, centralized configuration and generation on the server side simplifies template management, reducing the complexity and cost of long-term operation.
[0023] In summary, the proposed solution effectively addresses the limitations of traditional static design of sports data sharing templates by dynamically generating data sharing templates on the server side. This significantly improves the flexibility and efficiency of template generation, optimizes user experience, and reduces the burden of development and maintenance. Attached Figure Description
[0024] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0025] Figure 1 A hardware structure block diagram of a computer terminal for implementing a method for generating and displaying motion data sharing templates is shown.
[0026] Figure 2 This is a flowchart of an optional method for generating a motion data sharing template according to an embodiment of this application;
[0027] Figure 3 This is a schematic diagram of an optional data sharing template according to an embodiment of this application;
[0028] Figure 4 This is a flowchart of an optional motion data sharing template processing method according to an embodiment of this application;
[0029] Figure 5 This is a flowchart of an optional method for displaying a motion data sharing template according to an embodiment of this application;
[0030] Figure 6 This is a schematic diagram of an optional motion data sharing template generation device according to an embodiment of this application;
[0031] Figure 7 This is a schematic diagram of a display device for an optional motion data sharing template according to an embodiment of this application;
[0032] Figure 8This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0033] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0034] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0035] It should also be noted that the information collected in this application (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of related data all comply with relevant laws, regulations, and standards, necessary confidentiality measures have been taken, and they do not violate public order and good morals. Corresponding operation entry points are provided for users to choose to authorize or refuse. For example, interfaces are set up between this system and relevant users or organizations, providing users with corresponding operation entry points for them to choose to agree to or refuse automated decision results; if the user chooses to refuse, the process proceeds to the expert decision-making stage.
[0036] The methods and embodiments provided in this application can be executed on mobile terminals, computer terminals, or similar computing devices. Figure 1 A hardware block diagram of a computer terminal (or mobile device) for implementing a method for generating and displaying motion data sharing templates is shown. Figure 1As shown, the computer terminal 10 (or mobile device) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0037] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits can be implemented wholly or partially as software, hardware, firmware, or any other combination. Furthermore, the data processing circuits can be a single, independent processing module, or wholly or partially integrated into any other element within the computer terminal 10 (or mobile device). As in the motion data sharing template generation method and motion data sharing template display method involved in the embodiments of this application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0038] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the method for generating and displaying the motion data sharing template in this embodiment of the application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the above-mentioned method for generating and displaying the motion data sharing template. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0039] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0040] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0041] Under the aforementioned operating environment, this application provides the following: Figure 2 The method for generating the motion data sharing template shown. Figure 2 This is a flowchart of an optional method for generating a motion data sharing template according to an embodiment of this application. For example... Figure 2 As shown, the method includes the following steps:
[0042] Step S201: Extract the target motion type of the target user from the template generation request sent by the client through the server.
[0043] In step S201, the template generation request is used to represent the target user's expectation to generate a data sharing template corresponding to the target motion type on the client. Different motion types correspond to different data sharing templates.
[0044] Optionally, the execution entity of the method for generating sports data sharing templates can be a server. A server refers to a system or program within an internet architecture that provides functions such as data processing, logical operations, and resource management, typically running on a remote server. In this application, the server acts as the dynamic template generation center, responsible for receiving client requests, processing data, generating data sharing templates corresponding to specific sports types, and sending these templates back to the client for display. The client is a software application directly operated by the user, such as a mobile application or desktop software. In the context of this application, users can record and view sports data on the client, request and display data sharing templates generated by the server. The client is responsible for sending template generation requests to the server and displaying the template content returned by the server in a user-friendly manner.
[0045] Optionally, a template generation request is an instruction initiated by the user through the client to request the generation of a data sharing template. The request typically includes key information such as the type of exercise and exercise data, representing the template style and content the user expects. The server generates the template based on this information, ensuring that the template matches the type of exercise the user is currently engaged in and accurately displays the relevant exercise data. The target user refers to a specific user who uses the client application to request a data sharing template. In real-world application scenarios, each user may participate in different types of exercise and have personalized sharing needs. Therefore, the system needs to identify and meet the specific needs of each target user, generating a unique data sharing template.
[0046] Optionally, the target sport type refers to the type of sport the user is currently engaged in or wishes to record, such as indoor running, outdoor cycling, swimming, or fitness. Different sport types may involve different data types and display requirements. For example, indoor running might require displaying distance, time, speed, and calorie consumption, while swimming might focus more on displaying stroke distance, time, stroke style, and calorie consumption. The server needs to select and configure appropriate stickers based on the target sport type to generate a relevant data sharing template.
[0047] Optionally, a data sharing template is an interface design used to display user exercise data. It typically includes elements such as graphics, text, charts, and background images to present the user's exercise results in an attractive way. The template can be requested and displayed by the client, while its content and style are dynamically generated by the server based on the user's exercise data and type of exercise. Dynamic data sharing templates can better adapt to diverse user exercise scenarios and sharing needs, providing a more personalized display effect.
[0048] Step S202: The server retrieves L stickers associated with the target motion type from the database based on the target motion type.
[0049] Where L is an integer greater than or equal to 1, and each sticker represents a template element.
[0050] Optionally, in this application, "sticker" refers to the various visual elements or components that constitute the data sharing template, which can be images, icons, data charts, text boxes, etc. Each sticker represents a specific template element used to display a certain type of sports data or visual effect. For example, in a running sharing template, there might be one sticker to display the running distance, another sticker to display a line graph of the running speed, and a third sticker might be a decorative pattern or logo to enhance the visual appeal of the template.
[0051] Optionally, the database stores sticker information related to various sports types, including sticker type, style, size, position, and hierarchy. When the server receives a template generation request, it queries the database to retrieve the corresponding L stickers and their configuration information based on the sports type, for use in the dynamic generation of the template.
[0052] Optionally, the preset position of a sticker refers to the default coordinates or layout of each sticker in the template, while the preset layer describes the visual hierarchy of the stickers. Based on this preset information, the server combines L stickers into an ordered data layer, ensuring correct data display and visual harmony. For example, sticker A might be preset in the upper left corner of the template, while sticker B might be preset below sticker A. Thus, when dynamically generating the template, the server will arrange and overlay the stickers according to the preset positions and layer relationships.
[0053] Optionally, when a user completes an activity in a fitness app and chooses to share it, the client sends a template generation request to the server. This request includes information about the target activity type. Upon receiving the request, the server queries its database for L stickers associated with the target activity type. For example, if the target activity is indoor running, the server will look for stickers containing elements such as distance, time, speed charts, and calories burned. Based on the preset positions and layer information of each sticker, the server will combine these stickers into a data layer in a specific order and layout to display the running data. Finally, the server sends the combined data layer back to the client, which then combines the data layer with other elements such as background images, borders, and masks to generate a complete data sharing template for the user to preview, edit, and share.
[0054] Step S203: When L is an integer greater than 1, combine L stickers into a target data layer according to the preset position and preset layer of each sticker. The target data layer is used to display the target user's motion data and motion trajectory.
[0055] Optionally, the target data layer is a data combination layer generated on the server side, containing all L stickers. The server lays out and stacks the individual stickers according to preset positions and layer relationships, ultimately forming a complete display layer containing the target user's motion data and trajectory. The target data layer is the foundation used by the client to generate the final sharing template, ensuring that all motion data is displayed to the user in the correct format and layout. When L is greater than 1, the server retrieves multiple stickers matching the target motion type from the database. Then, based on the preset position information of each sticker, the server places the stickers in the designated positions on the template; simultaneously, based on preset layer information, it determines the display order and visual hierarchy of the stickers, ensuring the consistency and clarity of the data display. This combination process is completed dynamically on the server side, requiring no additional development or configuration on the client side, greatly improving the efficiency and flexibility of template generation.
[0056] For example, for the sport of indoor running, the server might need to extract L=4 stickers from the database to display the user's running distance, running time, speed line graph, and calorie consumption pie chart. The server will combine these stickers into a target data layer based on their preset positions and layer relationships. Distance and time might be placed at the top of the template, the speed line graph in the middle, and the calorie consumption pie chart at the bottom, forming a top-down data display flow. Simultaneously, the server will ensure that the speed line graph is not obscured by the distance and time figures, and that the calorie consumption chart does not obscure the line graph; by adjusting the layer relationships, all data is ensured to be clearly readable and visually harmonious.
[0057] Step S204: The target data layer is sent to the client, whereby the client generates a data sharing template corresponding to the target user based on the target data layer.
[0058] Optionally, the server sends the assembled target data layer to the client. After receiving the data layer, the client simply combines it with static elements such as backgrounds and borders to generate a complete data sharing template. This template can then be previewed, edited, and shared to social media or saved locally by the target user. This dynamic combination process not only increases template diversity but also optimizes client performance, reduces client update frequency, and enhances user experience.
[0059] Optionally, Figure 3 This is a schematic diagram of an optional data sharing template according to an embodiment of this application, such as... Figure 3 As shown, a data sharing template can be a sharing card, including the data element "Indoor running 3.25 km" and a chrysanthemum-like graphic element. The data sharing template also includes control graphic elements such as "Save to Local".
[0060] Based on the above steps S201 to S204, it is clear that in the technical solution of this application, the server can identify the target user's target sports type according to the template generation request sent by the client. This allows the generation of sharing templates to no longer be limited to fixed templates preset by the client, but can dynamically generate corresponding templates according to different sports types, greatly enhancing the adaptability and scalability of the sharing templates. For example, indoor running and outdoor cycling require different data types and formats to be displayed. The server can select the most suitable sticker combination based on the sports type to generate the most suitable data sharing template for that sports. Secondly, the server queries and obtains L stickers related to the target sports type, and combines them according to the preset position and preset layer of each sticker to form the target data layer. This process enables flexible combination of template elements, allowing the data sharing template to be customized according to the characteristics of the sports data and user preferences, improving the personalization and practicality of the template. For example, users can choose to place the sports distance at the top and the sports time at the bottom, or integrate the sports trajectory into the background, instead of using a fixed layout.
[0061] In one optional embodiment, before retrieving L stickers associated with the target motion type from the database based on the target motion type, the server can generate N stickers, where N is an integer greater than 1. The stickers include at least a first type and a second type; the first type of stickers represents data elements, and the second type represents pattern elements. Then, sticker attributes are set for each sticker, where the sticker attributes determine whether the sticker can be rotated, dragged, and scaled. Finally, the N stickers and their sticker attributes are stored in the database.
[0062] Optionally, the first type of stickers is specifically designed to represent data elements, such as exercise distance, speed, and calories burned. These stickers can dynamically populate content based on the user's exercise data and are a core part of showcasing exercise results in the sharing template. The second type of stickers is used to represent graphic elements, such as decorative icons, animated GIFs, and background images. These stickers add visual appeal to the template, helping users personalize their shared content, making it more vivid and interesting.
[0063] Optionally, for each generated sticker, the server sets sticker attributes. These attributes define the sticker's interactivity on the client side, including but not limited to: whether it can be rotated, dragged, and scaled. After setting the sticker attributes, the server stores N stickers and their attributes in the database. The database centrally manages the metadata of these stickers, including type, style, size, and attributes, ensuring that when a template needs to be dynamically generated based on a specific motion type, the corresponding sticker can be quickly retrieved and called.
[0064] For example, the server might pre-generate N stickers for indoor running, including a circular chart sticker (type 1, used to display calories burned), a line graph sticker (type 1, used to display changes in running speed), a running shoe icon sticker (type 2, used for decoration), and a running trajectory graph sticker (type 1, used to display the running route), etc. Each sticker has its specific attribute settings; for example, the line graph sticker can be rotated and scaled, and the running shoe icon sticker can be dragged to adjust its position, but cannot be rotated.
[0065] In one optional embodiment, after storing N stickers and their attributes in a database, the server can also generate a configuration file. This configuration file establishes an association between any sport type and at least one sticker. Then, based on the configuration file, the server generates a style file in the client corresponding to any sport type. This style file includes the sticker attributes of the stickers associated with that sport type.
[0066] Optionally, the configuration file establishes the association between different sports types and stickers. It records which stickers are required for each sports type, as well as the preset positions and layer relationships of these stickers in the sharing template. It's important to note that in the configuration file, these associations are established by associating a specific sports type with at least one sticker. For example, indoor running might be associated with stickers displaying line graphs of distance, time, and speed, and pie charts of calories burned; while outdoor cycling might be associated with stickers displaying distance, average speed, altitude changes, and images of scenery along the route. This association setting allows the server to call and combine appropriate data stickers and graphic stickers based on the sports type, providing users with sharing templates that precisely match their exercise results.
[0067] Optionally, the server can generate style files for the client based on the associations generated in the configuration file. The style files contain sticker attributes corresponding to the movement type, such as the ability to rotate, drag, and scale the stickers, as well as the preset positions and display levels of the stickers within the template. After receiving the style files, the client can combine sticker elements from the database into a data-sharing template according to preset rules and movement type requirements, based on the attributes and layout information in the files, without requiring additional release updates.
[0068] In one optional embodiment, when L is an integer greater than 1, the L stickers are combined into a target data layer according to their preset positions and preset layers. This includes: obtaining the interface size of the client's display interface through the server, and then determining the size of each of the L stickers based on the interface size. Finally, the L stickers are combined into the target data layer by the server according to their preset positions and preset layers.
[0069] Optionally, when the server receives a template generation request from the client, it first obtains the specific size of the client's display interface, i.e., screen resolution or device size information. This is because different client devices, such as smartphones, tablets, or PCs, may have different screen sizes and resolutions, and the display effect of the shared template should be consistent across various devices as much as possible to avoid layout problems or reading difficulties caused by size mismatches. Once the server obtains the client's interface size, it can dynamically calculate the size of each sticker based on this information. This calculation is based on the sticker's preset size and proportion, as well as the actual size of the client's screen. Through appropriate scaling and adjustment, it ensures that the sticker is displayed completely on the client's interface and is harmonious with the overall layout. For example, if a circular chart sticker is preset to have a diameter of 10cm, the server will adjust this size according to the client's screen size to ensure that it does not look too crowded on small screen devices or too empty on large screen devices.
[0070] Finally, the server combines L stickers into the target data layer based on their preset positions and layers, along with the calculated dimensions. The preset positions ensure the stickers have fixed coordinates within the template, while the preset layers define the display order of the stickers, determining which elements appear before and after them to avoid visual obstruction. Through this process, the dynamically generated data layer perfectly adapts to the client's interface size, presenting a beautiful and clear data sharing template whether on a small mobile phone or a large monitor.
[0071] For example, assuming the client device's screen width is 360px, the server will adjust the diameter of the circular chart sticker (used to display calories burned) to fit the screen size, while ensuring the sticker is positioned in the preset top-left corner and is not obscured by other stickers. For the line chart sticker (used to display speed changes), the server might adjust its height to one-third of the screen height, while automatically scaling the width according to the screen width to ensure the entire line chart is displayed completely and maintains an appropriate proportion to the interface size.
[0072] Finally, the server sends L resized stickers, arranged according to preset positions and layer relationships, to the client. Upon receiving the target data layer, the client combines it with other static elements such as the background and borders to generate the final data sharing template. This dynamic resizing mechanism ensures the adaptability and aesthetics of the sharing template across different client devices, providing users with a consistent and high-quality sharing experience regardless of their device. Simultaneously, the technical solution of this application provides the server with greater flexibility, enabling rapid response to size differences across devices without frequent client application updates, reducing maintenance costs and improving user experience and application compatibility.
[0073] In one optional embodiment, sending the target data layer to the client includes: sending the target data layer and at least one template element to the client, wherein the client generates a data sharing template corresponding to the target user based on the target data layer and at least one template element, the at least one template element including:
[0074] The first element is the border used to represent the data sharing template corresponding to the target user;
[0075] The second element is the background image used to represent the data sharing template corresponding to the target user;
[0076] The third element is a mask used to characterize the data sharing template corresponding to the target user;
[0077] The fourth element is the image sticker used in conjunction with the target data layer in the data sharing template corresponding to the target user.
[0078] Optionally, after receiving the target data layer and at least one template element from the server, the client combines the border, background image, mask, and image sticker with the target data layer based on the attribute information of the template element. For example, first, the client applies the border element to create the outer frame of the template around the target data layer; then, it loads the background image element as the background of the template; next, it adjusts the transparency and shape of the mask according to the mask element and adds it to the template; finally, it places the image sticker in a preset position to coordinate the layout with the data sticker. Through this sequence of steps, the client ultimately generates a data sharing template corresponding to the target user.
[0079] Optionally, borders are decorative elements surrounding the data sharing template, used to highlight the template content and enhance visual appeal. Background images serve as the visual base of the sharing template, providing a rich background environment for the data sharing content. Masks are overlays with adjustable transparency, used to create specific visual effects within the template, such as gradients, blurring, or highlighting focal areas. Image stickers are image elements in the template used to decorate or assist in data display; unlike data stickers in the data layer, image stickers primarily serve to increase the template's interest and aesthetics.
[0080] In an alternative embodiment, when L equals 1, a sticker retrieved from the database is used as the target data layer.
[0081] Alternatively, if the server only retrieves a sticker from the database, it can directly use that sticker as the target data layer.
[0082] In one alternative embodiment, Figure 4 This is a flowchart of an optional motion data sharing template processing method according to an embodiment of this application, such as... Figure 4 As shown, it includes the following steps:
[0083] First, the data stickers are generated during the preparation phase through the configuration backend. This includes creating the data stickers, which requires setting the data items (sticker attributes) of the stickers, such as whether they can be rotated and dragged. Then, the generated data stickers are stored in the database.
[0084] It should be noted that during the preparation stage, a style file can also be generated by the client according to the type of sticker template, and the style file can be placed in the source code. The style file should include at least the specific data items of the data sticker, such as whether it can be rotated and whether it can be dragged.
[0085] Optionally, such as Figure 4 As shown, when creating an interface template (i.e., a data sharing template), the user first initiates a template creation request (i.e., a template generation request) on the client side. This request is used to request dynamic data from the server. After receiving the client's request, the server retrieves data stickers and the required dynamic images (e.g., L stickers) from the database based on the requested category (i.e., the target motion type in the template generation request). Then, the server assembles the retrieved data (L stickers) into a target data layer and returns the target data layer to the client. It should be noted that the server can also store the retrieved dynamic stickers in a dynamic sticker production center (which can be understood as a program with storage capabilities), and then send the dynamic stickers to the client through the dynamic sticker production center.
[0086] Optionally, such as Figure 4As shown, when the client loads the interface, it can parse the target data layer sent by the server to obtain each sticker that makes up the target data layer and its corresponding attributes. Then, it renders each sticker according to the client's built-in style file, thus displaying the target data layer on the client. It should be noted that the client can also load images sent by the dynamic sticker production center and display those images along with the rendered target data layer.
[0087] It's important to note that in traditional technologies, adding new template styles or adjusting existing templates requires a client-side re-release, which is not only time-consuming but can also negatively impact user experience due to compatibility issues caused by version updates. In this application's solution, however, adjustments to template styles and element layouts are primarily completed on the server side. The client only needs to receive the target data layer from the server and generate a data-sharing template accordingly. This avoids frequent client updates, improving development efficiency and user satisfaction. Furthermore, dynamically generated data-sharing templates more accurately reflect users' exercise data and trajectories, while allowing users to customize selections based on exercise type and personal preferences. This not only provides a richer visual experience but also increases the fun and appeal of sharing, thereby stimulating users' willingness to share exercise data and promoting community interaction and user engagement.
[0088] Therefore, the server-side dynamic template generation mechanism facilitates content innovation and template iteration. Product teams can more quickly try out and launch new template designs without waiting for client version update cycles. This helps maintain the application's vitality and competitiveness, meeting users' ever-changing needs. Furthermore, clients no longer need frequent updates to adapt to new template styles or movement types, reducing development workload and version maintenance costs. Simultaneously, centralized configuration and generation on the server side simplifies template management, reducing the complexity and cost of long-term operation.
[0089] According to another aspect of the embodiments of this application, a method for displaying a sports data sharing template is also provided, wherein, Figure 5 This is a flowchart of an optional method for displaying a motion data sharing template according to an embodiment of this application.
[0090] like Figure 5 As shown, it includes the following steps:
[0091] Step S501: Send a template generation request to the server via the client.
[0092] In step S501, the template generation request is used to represent the target user's expectation to generate a data sharing template corresponding to the target motion type on the client. Different motion types correspond to different data sharing templates.
[0093] Optionally, the entity executing the method for displaying the exercise data sharing template can be a client, where the client is a software application directly operated by the user, such as a mobile application or desktop software. In the context of this application, the user can record and view exercise data in the client, and request and display the data sharing template generated by the server. The client is responsible for sending a template generation request to the server and displaying the template content returned by the server in a user-friendly manner.
[0094] Furthermore, the server mentioned above refers to a system or program that provides functions such as data processing, logical operations, and resource management within the internet architecture, typically running on a remote server. In this application, the server acts as a dynamic template generation center, responsible for receiving client requests, processing data, generating data sharing templates corresponding to specific sports types, and sending these templates back to the client for display.
[0095] Step S502: Receive the target data layer generated by the server according to the target motion type.
[0096] In step S502, the target data layer is used to display the target user's motion data and motion trajectory. The target data layer is composed of L stickers obtained by the server according to the preset position and preset layer of each sticker, where L is an integer greater than or equal to 1, and each sticker represents a template element.
[0097] Optionally, the target data layer is a data combination layer generated on the server side, containing all L stickers. The server lays out and stacks the individual stickers according to preset positions and layer relationships, ultimately forming a complete display layer containing the target user's motion data and trajectory. The target data layer is the foundation used by the client to generate the final sharing template, ensuring that all motion data is displayed to the user in the correct format and layout. When L is greater than 1, the server retrieves multiple stickers matching the target motion type from the database. Then, based on the preset position information of each sticker, the server places the stickers in the designated positions on the template; simultaneously, based on preset layer information, it determines the display order and visual hierarchy of the stickers, ensuring the consistency and clarity of the data display. This combination process is completed dynamically on the server side, requiring no additional development or configuration on the client side, greatly improving the efficiency and flexibility of template generation.
[0098] For example, for the sport of indoor running, the server might need to extract L=4 stickers from the database to display the user's running distance, running time, speed line graph, and calorie consumption pie chart. The server will combine these stickers into a target data layer based on their preset positions and layer relationships. Distance and time might be placed at the top of the template, the speed line graph in the middle, and the calorie consumption pie chart at the bottom, forming a top-down data display flow. Simultaneously, the server will ensure that the speed line graph is not obscured by the distance and time figures, and that the calorie consumption chart does not obscure the line graph; by adjusting the layer relationships, all data is ensured to be clearly readable and visually harmonious.
[0099] Optionally, in this application, "sticker" refers to the various visual elements or components that constitute the data sharing template, which can be images, icons, data charts, text boxes, etc. Each sticker represents a specific template element used to display a certain type of sports data or visual effect. For example, in a running sharing template, there might be one sticker to display the running distance, another sticker to display a line graph of the running speed, and a third sticker might be a decorative pattern or logo to enhance the visual appeal of the template.
[0100] Optionally, the database stores sticker information related to various sports types, including sticker type, style, size, position, and hierarchy. When the server receives a template generation request, it queries the database to retrieve the corresponding L stickers and their configuration information based on the sports type, for use in the dynamic generation of the template.
[0101] Optionally, the preset position of a sticker refers to the default coordinates or layout of each sticker in the template, while the preset layer describes the visual hierarchy of the stickers. Based on this preset information, the server combines L stickers into an ordered data layer, ensuring correct data display and visual harmony. For example, sticker A might be preset in the upper left corner of the template, while sticker B might be preset below sticker A. Thus, when dynamically generating the template, the server will arrange and overlay the stickers according to the preset positions and layer relationships.
[0102] Optionally, when a user completes an activity in a fitness app and chooses to share it, the client sends a template generation request to the server. This request includes information about the target activity type. Upon receiving the request, the server queries its database for L stickers associated with the target activity type. For example, if the target activity is indoor running, the server will look for stickers containing elements such as distance, time, speed charts, and calories burned. Based on the preset positions and layer information of each sticker, the server will combine these stickers into a data layer in a specific order and layout to display the running data. Finally, the server sends the combined data layer back to the client, which then combines the data layer with other elements such as background images, borders, and masks to generate a complete data sharing template for the user to preview, edit, and share.
[0103] Step S503: The client generates and displays a data sharing template corresponding to the target user based on the target data layer.
[0104] Optionally, the server sends the assembled target data layer to the client. After receiving the data layer, the client simply combines it with static elements such as backgrounds and borders to generate a complete data sharing template. This template can then be previewed, edited, and shared to social media or saved locally by the target user. This dynamic combination process not only increases template diversity but also optimizes client performance, reduces client update frequency, and enhances user experience.
[0105] In one optional embodiment, the client generates and displays a data sharing template corresponding to the target user based on the target data layer. This includes: using the client, parsing each sticker in the target data layer according to a built-in style file corresponding to the target motion type, wherein the style file includes sticker attributes associated with the target motion type. Then, the client renders each sticker in the target data layer in the client's display interface according to the sticker attributes of each sticker recorded in the style file, thereby obtaining and displaying the data sharing template corresponding to the target user.
[0106] Optionally, the server can generate style files for the client based on the associations generated in the configuration file. The style files contain sticker attributes corresponding to the motion type, such as the ability to rotate, drag, and scale the stickers, as well as the preset positions and display levels of the stickers within the template. After receiving the style files, the client can combine sticker elements from the database into a data-sharing template according to preset rules and motion type requirements, based on the attributes and layout information in the files, without requiring additional release updates. When the client loads the interface, it can parse the target data layer sent by the server, obtaining each sticker that makes up the target data layer and its corresponding attributes. Then, it renders each parsed sticker according to the client's built-in style files, thus displaying the target data layer on the client.
[0107] As described above, in the technical solution of this application, the server can identify the target user's target sport type based on the template generation request sent by the client. This allows the generation of sharing templates to no longer be limited to fixed templates preset by the client, but to dynamically generate corresponding templates according to different sport types. This greatly enhances the adaptability and scalability of the sharing templates. For example, indoor running and outdoor cycling require different data types and formats to be displayed. The server can select the most suitable sticker combination based on the sport type to generate the data sharing template that best fits the sport. Secondly, the server queries and obtains L stickers related to the target sport type, and combines them according to the preset position and preset layer of each sticker to form the target data layer. This process enables flexible combination of template elements, allowing the data sharing template to be customized according to the characteristics of the sports data and user preferences, improving the personalization and practicality of the template. For example, users can choose to place the sports distance at the top and the sports time at the bottom, or integrate the sports trajectory into the background, instead of using a fixed layout.
[0108] According to another aspect of the embodiments of this application, an apparatus for generating a motion data sharing template is also provided, wherein, Figure 6 This is a schematic diagram of an optional motion data sharing template generation device according to an embodiment of this application, such as... Figure 6 As shown, the device for generating motion data sharing templates includes: an extraction unit 601, a query unit 602, a combination unit 603, and a sending unit 604.
[0109] Extraction unit 601 is used to extract the target user's target motion type from the template generation request sent by the client via the server. The template generation request represents the target user's expectation to generate a data sharing template corresponding to the target motion type on the client. Different motion types correspond to different data sharing templates. Query unit 602 is used to query the database based on the target motion type via the server to obtain L stickers associated with the target motion type. L is an integer greater than or equal to 1, and each sticker represents a template element. Combination unit 603 is used to combine the L stickers into a target data layer according to the preset position and preset layer of each sticker when L is an integer greater than 1. The target data layer is used to display the target user's motion data and motion trajectory. Sending unit 604 is used to send the target data layer to the client, whereby the client generates the data sharing template corresponding to the target user based on the target data layer.
[0110] Optionally, the device for generating motion data sharing templates further includes: a second generation unit, a first processing unit, and a second processing unit. The second generation unit generates N stickers, where N is an integer greater than 1. The stickers include at least a first type and a second type, where the first type of stickers represents data elements and the second type of stickers represents pattern elements. The first processing unit sets sticker attributes for each sticker, where the sticker attributes determine whether the sticker can be rotated, dragged, and scaled. The second processing unit stores the N stickers and their sticker attributes in a database.
[0111] Optionally, the device for generating the sports data sharing template further includes a third generation unit and a fourth generation unit. The third generation unit is used to generate a configuration file, which establishes an association between any sports type and at least one sticker. The fourth generation unit is used to generate a style file corresponding to any sports type in the client based on the configuration file, wherein the style file includes sticker attributes of the stickers associated with that sports type.
[0112] Optionally, the combination unit 603 includes: a first acquisition subunit, a first determination subunit, and a first combination subunit. The first acquisition subunit is used to acquire the interface size of the client's display interface; the first determination subunit is used to determine the size of each of the L stickers based on the interface size; and the first combination subunit is used to combine the L stickers into a target data layer according to the preset position and preset layer of each sticker, via the server based on the size of each sticker.
[0113] Optionally, the sending unit 604 includes: a first sending subunit, configured to send the target data layer and at least one template element to the client, wherein the client generates a data sharing template corresponding to the target user based on the target data layer and at least one template element, the at least one template element including: a first element, used to represent the border of the data sharing template corresponding to the target user; a second element, used to represent the background image of the data sharing template corresponding to the target user; a third element, used to represent the mask of the data sharing template corresponding to the target user; and a fourth element, used to represent the image sticker used in conjunction with the target data layer in the data sharing template corresponding to the target user.
[0114] Optionally, the motion data sharing template generation device further includes a third processing unit, used as a target data layer when L equals 1, by retrieving a sticker from the database.
[0115] According to another aspect of the embodiments of this application, a display device for a motion data sharing template is also provided, wherein, Figure 7 This is a schematic diagram of a display device for an optional motion data sharing template according to an embodiment of this application, such as... Figure 7 As shown, the display device for the motion data sharing template includes: a request sending unit 701, a receiving unit 702, and a display unit 703.
[0116] The request sending unit 701 is used to send a template generation request to the server through the client. The template generation request represents the target user's expectation to generate a data sharing template corresponding to the target movement type on the client. Different movement types correspond to different data sharing templates. The receiving unit 702 is used to receive the target data layer generated by the server according to the target movement type. The target data layer is used to display the target user's movement data and movement trajectory. The target data layer is composed of L stickers obtained by the server according to the preset position and preset layer of each sticker. L is an integer greater than or equal to 1. Each sticker represents a template element. The display unit 703 is used to generate and display the data sharing template corresponding to the target user through the client based on the target data layer.
[0117] Optionally, the display unit 703 includes: a first processing subunit and a second processing subunit. The first processing subunit is used to parse each sticker in the target data layer using a client, based on a style file built into the client corresponding to the target motion type. The style file includes sticker attributes associated with the target motion type. The second processing subunit is used to render each sticker in the target data layer on the client's display interface according to the sticker attributes recorded in the style file, thereby obtaining and displaying the data sharing template corresponding to the target user.
[0118] Embodiments of this application may provide an electronic device. Figure 8 This is a structural block diagram of an electronic device according to an embodiment of this application. Figure 8 As shown, the electronic device may include: one or more ( Figure 8 Only one is shown in the diagram. The processor, memory, memory controller, and peripheral interface are connected to the radio frequency module, audio module, and display.
[0119] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the methods and apparatus in the embodiments of this application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, to implement the above-mentioned method for displaying and / or generating motion data sharing templates. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0120] Those skilled in the art will understand that Figure 8 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones (such as Android phones, iOS phones, etc.), tablets, PDAs, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 8 This does not limit the structure of the aforementioned electronic device. For example, electronic devices may also include components that are more... Figure 8 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 8 The different configurations shown.
[0121] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0122] According to another aspect of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer-readable storage medium, wherein when the computer program is executed, the device on which the computer-readable storage medium is located executes the above-described method for generating the motion data sharing template and the method for displaying the motion data sharing template.
[0123] The above-described embodiments or examples disclosed in this application are not exhaustive, but merely illustrative of some embodiments or examples, and are not intended to limit the scope of protection of this application. Unless otherwise specified, each step in a particular embodiment or example can be implemented as an independent embodiment, and the steps can be arbitrarily combined. For example, a solution after removing some steps in a particular embodiment or example can also be implemented as an independent embodiment, and the order of the steps in a particular embodiment or example can be arbitrarily interchanged. Furthermore, optional methods or examples in a particular embodiment or example can be arbitrarily combined; moreover, various embodiments or examples can be arbitrarily combined. For example, some or all steps of different embodiments or examples can be arbitrarily combined, and a particular embodiment or example can be arbitrarily combined with optional methods or examples of other embodiments or examples.
[0124] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0125] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0126] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.
[0127] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0128] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0129] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0130] The above are merely preferred embodiments of this application. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for generating a motion data sharing template, characterized in that, include: The server extracts the target user's target motion type from the template generation request sent by the client. The template generation request is used to represent the target user's expectation to generate a data sharing template corresponding to the target motion type on the client. Different motion types correspond to different data sharing templates. The server retrieves L stickers associated with the target motion type from the database based on the target motion type, where L is an integer greater than or equal to 1, and each sticker represents a template element. When L is an integer greater than 1, the L stickers are combined into a target data layer according to the preset position and preset layer of each sticker. The target data layer is used to display the target user's motion data and motion trajectory. The target data layer is sent to the client, wherein the client generates a data sharing template corresponding to the target user based on the target data layer; Before retrieving L stickers associated with the target motion type from the database based on the target motion type, N stickers are generated, where N is an integer greater than 1. The types of the stickers include at least a first type and a second type. The first type of stickers is used to represent data elements, and the second type of stickers is used to represent pattern elements. Sticker attributes are set for each sticker, wherein the sticker attributes are used to determine whether the sticker can be rotated, dragged, and scaled. The N stickers and their sticker attributes are stored in the database. Sending the target data layer to the client includes: sending the target data layer and at least one template element to the client, wherein the client generates a data sharing template corresponding to the target user based on the target data layer and the at least one template element, and the at least one template element includes: a first element for representing the border of the data sharing template corresponding to the target user; a second element for representing the background image of the data sharing template corresponding to the target user; a third element for representing the mask of the data sharing template corresponding to the target user; and a fourth element for representing the image sticker used in conjunction with the target data layer in the data sharing template corresponding to the target user.
2. The method for generating a motion data sharing template according to claim 1, characterized in that, After storing N stickers and their attributes in the database, the method for generating the motion data sharing template further includes: Generate a configuration file, wherein the configuration file is used to establish an association between any type of sport and at least one sticker; Based on the configuration file, a style file corresponding to any type of sport is generated in the client, wherein the style file includes sticker attributes of stickers associated with that sport type.
3. The method for generating a motion data sharing template according to claim 1, characterized in that, When L is an integer greater than 1, the L stickers are combined into a target data layer according to the preset position and preset layer of each sticker, including: Obtain the size of the client's display interface; The size of each of the L stickers is determined based on the interface size; According to the preset position and preset layer of each sticker, the server combines the L stickers into the target data layer based on the size of each sticker.
4. The method for generating a motion data sharing template according to claim 1, characterized in that, After retrieving L stickers associated with the target motion type from the database based on the target motion type, the method for generating the motion data sharing template further includes: When L equals 1, a sticker obtained from the database will be used as the target data layer.
5. A method for displaying a sports data sharing template, characterized in that, include: The client sends a template generation request to the server. The template generation request is used to represent the target user's expectation to generate a data sharing template corresponding to the target sports type on the client. Different sports types correspond to different data sharing templates. The server receives a target data layer generated based on the target motion type. The target data layer is used to display the motion data and motion trajectory of the target user. The target data layer is composed of L stickers obtained by the server according to the preset position and preset layer of each sticker, where L is an integer greater than or equal to 1, and each sticker represents a template element. The client generates and displays a data sharing template corresponding to the target user based on the target data layer. The server is configured to generate N stickers before retrieving L stickers associated with the target motion type from the database based on the target motion type, where N is an integer greater than 1. The stickers include at least a first type and a second type, where the first type of stickers represents data elements and the second type of stickers represents pattern elements. Sticker attributes are set for each sticker, where the sticker attributes determine whether the sticker can be rotated, dragged, and scaled. The N stickers and their sticker attributes are stored in the database. The server is used to send the target data layer to the client, including: sending the target data layer and at least one template element to the client, wherein the client generates a data sharing template corresponding to the target user based on the target data layer and the at least one template element, the at least one template element including: a first element for representing the border of the data sharing template corresponding to the target user; a second element for representing the background image of the data sharing template corresponding to the target user; a third element for representing the mask of the data sharing template corresponding to the target user; and a fourth element for representing the image sticker used in conjunction with the target data layer in the data sharing template corresponding to the target user.
6. The method for displaying a motion data sharing template according to claim 5, characterized in that, The client generates and displays a data sharing template corresponding to the target user based on the target data layer, including: Using the client, each sticker in the target data layer is parsed based on the style file built into the client that corresponds to the target motion type. The style file includes sticker attributes of the stickers associated with the target motion type. Based on the sticker attributes of each sticker recorded in the style file, each sticker in the target data layer is rendered in the display interface of the client to obtain and display the data sharing template corresponding to the target user.
7. An apparatus for generating a motion data sharing template, used to implement the method for generating a motion data sharing template according to any one of claims 1 to 4, characterized in that, include: The extraction unit extracts the target user's target motion type from the template generation request sent by the client through the server. The template generation request is used to represent the target user's expectation to generate a data sharing template corresponding to the target motion type on the client. Different motion types correspond to different data sharing templates. The query unit retrieves L stickers associated with the target motion type from the database through the server, based on the target motion type, where L is an integer greater than or equal to 1, and each sticker represents a template element. The combination unit, when L is an integer greater than 1, combines the L stickers into a target data layer according to the preset position and preset layer of each sticker, wherein the target data layer is used to display the motion data and motion trajectory of the target user; The sending unit sends the target data layer to the client, wherein the client generates a data sharing template corresponding to the target user based on the target data layer.
8. A display device for a motion data sharing template, used to implement the display method of the motion data sharing template according to any one of claims 5 to 6, characterized in that, include: The request sending unit sends a template generation request to the server through the client. The template generation request is used to represent the target user's expectation to generate a data sharing template corresponding to the target motion type on the client. Different motion types correspond to different data sharing templates. The receiving unit receives the target data layer generated by the server according to the target motion type. The target data layer is used to display the motion data and motion trajectory of the target user. The target data layer is composed of L stickers obtained by the server according to the preset position and preset layer of each sticker, where L is an integer greater than or equal to 1, and each sticker represents a template element. The display unit generates and displays a data sharing template corresponding to the target user based on the target data layer through the client.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the computer program is executed, the device on which the computer-readable storage medium is located performs the method for generating a motion data sharing template as described in any one of claims 1 to 4 and the method for displaying a motion data sharing template as described in any one of claims 5 to 6.
10. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to perform the method for generating a motion data sharing template according to any one of claims 1 to 4 and the method for displaying a motion data sharing template according to any one of claims 5 to 6.
Citation Information
Patent Citations
Data sticker generation for sports
CN117915992A
Method and system for creating stickers from user-generated content
US20240104808A1