Mobile power supply renting method and system, electronic device and storage medium
Patent Information
- Application Number
- CN202111169916.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-08
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2041-10-08
AI Technical Summary
[0004]在本实施例中提供了一种移动电源租借方法、系统、电子装置和存储介质,以解决相关技术中存在的移动电源租借业务的前端开发和维护成本高的问题
[0050] Compared with related technologies, the mobile power rental method, system, electronic device and storage medium provided in this embodiment solve the problem of high front-end development and maintenance costs of mobile power rental services and reduce front-end development and maintenance costs.
Smart Images

Figure CN114022234B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of shared goods rental, and in particular to methods, systems, electronic devices, and storage media for renting power banks. Background Technology
[0002] Shared charging stations are equipped with multiple charging bays and power banks. When a user unlocks a power bank in a shared charging station, a virtual page for the station is generated on the user's device. This virtual page displays a "Unlocked, Awaiting Retrieval" visual effect, instructing the user to retrieve the power bank from a specific bay. However, this visual effect is hardcoded into the front-end code. Different models of shared charging stations have different appearances, requiring the development of corresponding visual effect code for each new station. Furthermore, the design, development, testing, and release of the new virtual page components are also necessary, resulting in significant manpower costs. Additionally, any updates to the shared charging station necessitate modifications to the front-end code, leading to high maintenance costs.
[0003] There is currently no effective solution to the problem of high front-end development and maintenance costs for mobile power bank rental services in related technologies. Summary of the Invention
[0004] This embodiment provides a mobile power bank rental method, system, electronic device, and storage medium to address the problem of high front-end development and maintenance costs in mobile power bank rental services in related technologies.
[0005] Firstly, this embodiment provides a mobile power bank rental method applied to shared charging devices, the method comprising:
[0006] Send a rental request message carrying a set of information to the server, wherein the set of information includes the device information of the shared charging device, the user information, and the store information where the shared charging device is located, and the shared charging device is communicatively connected to the server;
[0007] Obtain the rental response message returned by the server in response to the rental request message. The rental response message carries configuration information and business data. The configuration information includes element configuration information and element organization relationship information corresponding to the elements in the virtual page of the shared charging device.
[0008] The corresponding elements are rendered according to the element configuration information and the business data to generate the rendering result of the elements. The virtual page class of the shared charging device is instantiated and rendered according to the rendering result of the elements and the element organization relationship information to generate the virtual page of the shared charging device.
[0009] The selected target power bank is identified, and based on the user information and / or the store information, a dynamic effect is displayed on the virtual page of the shared charging device, showing the target power bank popping into its location.
[0010] In some embodiments, the element organization relationship information includes a structure tree stored in the form of key-value pairs, wherein the structure tree uses the element identifier of the parent node as the key and the element identifier of the child node as the value.
[0011] In some embodiments, rendering corresponding elements based on the element configuration information and the business data to generate rendering results for the elements, and instantiating and rendering the virtual page class of the shared charging device based on the rendering results and the element organization relationship information to generate the virtual page of the shared charging device, includes:
[0012] The system iterates through each node of the tree structure, calls the corresponding element implementation code for each node, and passes in the corresponding element parameters and business data. The elements of each node are then rendered to generate the virtual page of the shared charging device.
[0013] In some embodiments, the elements of the virtual page include at least one of the following: a shared charging device background, a charging bay, a power bank, and human-computer interaction buttons;
[0014] The element configuration information includes at least one of the following: element position information, element quantity information, element size information, element shape information, element color information, and element dynamic effect information.
[0015] In some embodiments, the business data includes power parameters obtained by the server from the shared charging device. The rendering of the corresponding elements is performed based on the element configuration information and the business data, generating the rendering result of the elements, including:
[0016] Based on the element configuration information and the power parameters of the power bank, the power bank is rendered to generate a power bank rendering result carrying power information.
[0017] The remaining battery information of the power bank is marked on the virtual page; or, at least one candidate power bank with a remaining battery level greater than a preset threshold is selected on the virtual page, and the remaining battery information of the candidate power bank is marked on the virtual page.
[0018] In some embodiments, if a candidate power bank with a remaining battery level greater than a preset threshold is selected from the virtual page, the candidate power bank is chosen as the target power bank, and a dynamic effect of the target power bank popping into its designated charging slot is displayed on the virtual page of the shared charging device; or...
[0019] If multiple candidate power banks with remaining power greater than a preset threshold are selected in the virtual page, one of the candidate power banks is selected as the target power bank according to the user's input, and the target power bank is displayed in a dynamic effect on the virtual page of the shared charging device as it pops into its designated compartment.
[0020] In some embodiments, the configuration information further includes first rental logic configuration information and second rental logic configuration information, wherein,
[0021] The first rental logic configuration information is used to indicate that a candidate power bank with a remaining power greater than a preset threshold is selected in the virtual page, and the candidate power bank is selected as the target power bank;
[0022] The second rental logic configuration information is used to instruct multiple candidate power banks with remaining power greater than a preset threshold to be filtered in the virtual page, and to select one of the candidate power banks as the target power bank according to the user's input operation.
[0023] In some embodiments, the business data includes occupancy parameters obtained by the server from the shared charging device, indicating whether the power bank is occupied. The rendering of the corresponding element is performed based on the element configuration information and the business data, generating the rendering result of the element, including:
[0024] Based on the occupancy parameters, determine the unoccupied power banks;
[0025] Based on the configuration information and the service data, the corresponding unoccupied power banks are rendered to generate rendering results for the unoccupied power banks.
[0026] In some embodiments, the virtual page elements include a theme, the element configuration information includes theme information, and the business data includes theme parameters obtained by the server based on user information and / or store information carried in the rental request message. The rendering of the corresponding elements is performed based on the element configuration information and the business data, generating the rendering result of the elements, including:
[0027] Based on the user information, a member theme is determined. Based on the member theme information and parameters, the member theme is rendered to generate a member theme rendering result. This rendering result corresponds to a virtual page style set by the member user that differentiates it from non-member users in terms of color and shape; and / or,
[0028] The store theme is determined based on the store information. The store theme is then rendered based on the store theme information and store theme parameters to generate a store theme rendering result. The store theme rendering result is a virtual page style that is differentiated in color and shape according to the store type.
[0029] In some embodiments, the method further includes, before sending the rental request message carrying the information set to the server:
[0030] The user terminal scans the tag carried by the shared charging device to obtain the device information;
[0031] The user terminal obtains its own location information and then obtains the store information based on its own location information.
[0032] The user terminal generates the rental request message based on the device information, the user information, and the store information.
[0033] In some embodiments, determining the selected target power bank and displaying a dynamic effect of the target power bank popping into its designated location on the virtual page of the shared charging device, based on the user information and / or the store information, includes:
[0034] The user terminal interface displays a dynamic effect of the target power bank popping out of its designated compartment.
[0035] In some embodiments, the shared charging device stores the store information, and the method further includes: before sending a rental request message carrying the information set to the server.
[0036] The shared charging device collects user facial images and compares the user facial images with pre-stored user facial images. If the comparison matches, it obtains user information corresponding to the user facial image.
[0037] The shared charging device generates the rental request message based on the device information, the user information, and the store information.
[0038] In some embodiments, determining the selected target power bank and displaying a dynamic effect of the target power bank popping into its designated location on the virtual page of the shared charging device, based on the user information and / or the store information, includes:
[0039] The interface of the shared charging device displays a dynamic effect of the target power bank popping out of its designated compartment.
[0040] Secondly, this embodiment provides a mobile power bank rental system, including: a user terminal, a shared charging device, and a server, wherein the user terminal and the shared charging device are respectively communicatively connected to the server; wherein,
[0041] The shared charging device is equipped with multiple compartments and multiple power banks. After determining the selected target power bank, the shared charging device will eject the target power bank from the corresponding compartment.
[0042] The server is used to respond to the rental request message initiated by the user terminal and generate a rental response message. The rental response message carries configuration information and business data. The configuration information includes element configuration information and element organization relationship information corresponding to the elements in the virtual page of the shared charging device.
[0043] The user terminal is used to obtain the device information of the shared charging device and the store information where the shared charging device is located, and send a rental request message carrying the device information, user information and store information to the server. After receiving the rental response message, the user terminal renders the corresponding elements according to the element configuration information and the business data to generate the rendering result of the elements, and instantiates and renders the virtual page class of the shared charging device according to the rendering result of the elements and the element organization relationship information to generate the virtual page of the shared charging device. After determining the selected target power bank, the user terminal displays the dynamic effect of the target power bank popping out of its location in the virtual page of the shared charging device according to the user information and / or the store information.
[0044] Thirdly, this embodiment provides a mobile power bank rental system, including: a shared charging device and a server, wherein the shared charging device is communicatively connected to the server; wherein,
[0045] The server is used to respond to rental request messages and generate rental response messages. The rental response messages carry configuration information and business data. The configuration information includes element configuration information and element organization relationship information corresponding to elements in the virtual page of the shared charging device.
[0046] The shared charging device is equipped with multiple compartments and multiple power banks. After determining the selected target power bank, the shared charging device will eject the target power bank from the corresponding compartment.
[0047] The shared charging device is also used to acquire the user's facial image, determine the user information based on the user's facial image, and send a rental request message carrying the device information, user information, and store information to the server. After receiving the rental response message, the shared charging device renders the corresponding elements according to the element configuration information and the business data, generates the rendering result of the elements, and instantiates and renders the virtual page class of the shared charging device according to the rendering result of the elements and the element organization relationship information, generating the virtual page of the shared charging device. After determining the selected target power bank, the device displays the dynamic effect of the target power bank popping into its location on the virtual page of the shared charging device according to the user information and / or the store information.
[0048] Fourthly, this embodiment provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the mobile power bank rental method described in the first aspect above.
[0049] Fifthly, this embodiment provides a storage medium storing a computer program that, when executed by a processor, implements the mobile power bank rental method described in the first aspect above.
[0050] Compared with related technologies, the mobile power rental method, system, electronic device and storage medium provided in this embodiment solve the problem of high front-end development and maintenance costs of mobile power rental services and reduce front-end development and maintenance costs.
[0051] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description
[0052] 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:
[0053] Figure 1 This is a hardware structure block diagram of a terminal for a mobile power bank rental method according to an embodiment of this application;
[0054] Figure 2 This is a flowchart of a mobile power bank rental method according to an embodiment of this application;
[0055] Figure 3 This is an architectural diagram of a mobile power bank rental system according to an embodiment of this application;
[0056] Figure 4 This is a schematic diagram illustrating the operating principle of a mobile power bank rental system according to an embodiment of this application;
[0057] Figure 5 This is a schematic diagram of a virtual page illustrating the door unlocking process according to an embodiment of this application;
[0058] Figure 6 This is a schematic diagram of a virtual page showing the compartment door unlocked and the power bank popped out of the compartment according to an embodiment of this application. Detailed Implementation
[0059] To better understand the purpose, technical solution, and advantages of this application, the application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0060] Unless otherwise defined, the technical or scientific terms used in this application shall have the general meaning as understood by one of ordinary skill in the art to which this application pertains. Words such as “a,” “an,” “an,” “the,” “the,” and “these,” used in this application, do not indicate quantitative limitation and may be singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or modules (units) is not limited to the listed steps or modules (units) but may include steps or modules (units) not listed, or may include other steps or modules (units) inherent to such processes, methods, products, or devices. The terms “connected,” “linked,” and “coupled,” used in this application, are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. The term “multiple” used in this application refers to two or more. The "and / or" operator describes the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: A alone, A and B simultaneously, and B alone. Typically, the character " / " indicates that the objects before and after it are in an "or" relationship. The terms "first," "second," and "third," etc., used in this application are merely for distinguishing similar objects and do not represent a specific ordering of the objects.
[0061] The method embodiments provided in this example can be executed on a terminal, computer, or similar computing device. For example, it can run on a terminal. Figure 1 This is a hardware structure block diagram of a terminal for a mobile power bank rental method according to an embodiment of this application. For example... Figure 1 As shown, a terminal may include one or more ( Figure 1Only one is shown in the diagram. A processor 102 and a memory 104 for storing data are also included. The processor 102 may be, but is not limited to, a microprocessor (MCU) or a programmable logic device (FPGA). The terminal may also include a transmission device 106 for communication functions and an input / output device 108. 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 terminal described above. For example, the terminal may also include components that are larger than... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown are illustrated.
[0062] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the mobile power bank rental method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. 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 terminal 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.
[0063] The transmission device 106 is used to receive or send data via a network. This network includes a wireless network provided by the terminal's communication provider. 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 can be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0064] This embodiment provides a method for renting a portable power bank. The steps shown in the flowchart below or in the accompanying drawings can be executed in a computer system, such as a set of computer-executable instructions. For example, a program for implementing the portable power bank rental method can be packaged into software and installed on a front-end device such as a mobile phone, tablet computer, or shared charging device, so that the front-end implements the portable power bank rental method by executing the program.
[0065] Figure 2 This is a flowchart of a mobile power bank rental method according to an embodiment of this application. The process includes the following steps:
[0066] Step S201: Send a rental request message carrying an information set to the server. The information set includes the device information of the shared charging device, user information, and the store information where the shared charging device is located. The shared charging device communicates with the server.
[0067] The equipment information includes equipment identification, user information includes user identification, and store information includes store location. Shared charging equipment is used to centrally store and power portable power banks. Each shared charging device is equipped with a control module that monitors the remaining power of the portable power banks and transmits this information to the server via a wireless network.
[0068] The server is built from at least one server. The server can communicate and connect with multiple shared charging devices. The server is used to monitor information from shared charging devices and process information from user terminals.
[0069] The front end can be a user terminal or a shared charging device; the user terminal can be a smartphone, a smart wearable device, or a tablet computer.
[0070] Using the user terminal as the front end, when a user wants to rent a power bank from a shared charging device, the user terminal obtains the device information by scanning a QR code on the device or manually entering characters. The user terminal then uses location services to determine the location of the shared charging device and obtains the store information. Alternatively, the shared charging device can be linked to the store's geolocation information when it is installed, thus obtaining the store information. The user terminal generates a rental request message based on the device information, user information, and store information and sends it to the server.
[0071] In some application scenarios, when a user's terminal is without power or malfunctions, it cannot generate a rental request message, preventing the user from renting a power bank. To solve this problem, a shared charging device is used as the front end. This device stores store information. When a user wants to rent a power bank from the shared charging device, it captures the user's facial image and compares it with pre-stored facial images. If they match, it retrieves the user information corresponding to the facial image. Based on the device information, user information, and store information, the shared charging device generates a rental request message and sends it to the server. This setup avoids power bank rental failures due to the user's terminal being unusable.
[0072] Step S202: Obtain the rental response message returned by the server in response to the rental request message. The rental response message carries configuration information and business data. The configuration information includes element configuration information and element organization relationship information corresponding to the elements in the virtual page of the shared charging device.
[0073] After receiving the rental request message, the server will retrieve the configuration information from its own database. This configuration information integrates the common attributes of various models of shared charging devices. In other words, this configuration information can support the implementation of elements of various models of shared charging devices.
[0074] The elements correspond to the components obtained by dividing the shared charging equipment according to its functions, such as the background of the shared charging equipment, the charging slots, the power bank, and the human-computer interaction buttons.
[0075] Element configuration information includes element position information, element quantity information, element size information, element shape information, element color information, and element dynamic effect information.
[0076] The server identifies the device based on its device number and retrieves the corresponding rendering data, which includes the background elements of the shared charging device, the power bank element, and the keyframe attributes of the charging bay. The front end compares the background elements of the shared charging device with virtual nodes based on the current data and then renders the actual background image of the shared charging device. The power bank element is rendered to the same bay as the real device using keyframe data. Specifically, the power bank element is fixed to the virtual bay using CSS capabilities through keyframe displacement, rotation, scale, and opacity properties.
[0077] When a user unlocks the power bank using their device, to make the user perceive that the power bank is unlocked through touch, the front end will trigger a phone vibration effect after rendering is complete and the unlocked status is received. The power bank will also pop up with a dynamic effect using the CSS animations property to prompt the user to take the power bank.
[0078] Element organization relationship information refers to information describing the organizational relationships between various elements. This information guides the organic integration of independent, scattered elements with reference to the appearance of the shared charging equipment, forming a virtual page. Specifically, the preferred design for the shared charging equipment's appearance is a frontal projection image of the mobile shared charging equipment with the power bank's inlet and outlet facing the user during human-computer interaction.
[0079] Business data refers to the data generated by shared charging equipment and user terminals. The server extracts equipment information and user information from the rental request message, reads the business data of the shared charging equipment corresponding to that equipment information, and determines the business data of the user terminal based on the user information. For the server, the business data is not pre-configured, but determined based on the usage of the shared charging equipment and the user's identity.
[0080] Step S203: Render the corresponding elements according to the element configuration information and business data to generate the element rendering results, and instantiate and render the virtual page class of the shared charging device according to the element rendering results and element organization relationship information to generate the virtual page of the shared charging device.
[0081] The organizational relationship information of elements can be constructed using a structure tree, and the structure tree is stored in the form of key-value pairs, where the element identifier of the parent node is the key and the element identifier of the child node is the value.
[0082] During the rendering of the virtual page on the user terminal, the user terminal traverses each node of the tree structure, calls the implementation code of the element corresponding to each node, and passes in the corresponding element configuration information and business data. The user terminal renders the elements of each node, obtains the rendering results of each element, and integrates the rendering results of each element according to the organizational relationship of each node to generate the virtual page of the shared charging device.
[0083] Step S204: Determine the selected target power bank, and display the dynamic effect of the target power bank popping up in its location on the virtual page of the shared charging equipment based on user information and / or store information.
[0084] The target power source can be specified by any one of the server, user terminal, or shared charging device.
[0085] When the target power bank is specified by the server, the server sends the location information of the target power bank to the user terminal and the shared charging device. The user terminal displays a dynamic effect of the target power bank popping out of its designated compartment on a virtual page based on the location information. The shared charging device's display screen simultaneously shows the location information of the target power bank, and displays the effect of the target power bank popping out dynamically for the user to take and use.
[0086] When a target power source is specified by the user terminal, the user terminal sends the location information of the target power source to the server, which then sends the location information to the shared charging device. Based on this location information, the user terminal displays a dynamic effect on a virtual page showing the target power source popping out of its designated compartment. The shared charging device then pops out the target power source based on the compartment's location information, allowing the user to take it for use.
[0087] When a target power bank is specified by a shared charging device, the shared charging device sends the location information of the target power bank to the server, which then sends the location information to the user terminal. The user terminal displays a dynamic effect of the target power bank popping out of its compartment on a virtual page based on the location information. The shared charging device then pops out the target power bank based on the location information for the user to take and use.
[0088] For a virtual page demonstration, please refer to [the example provided]. Figure 5 and Figure 6 ,in, Figure 5 This is a diagram illustrating the process of unlocking the cargo door. Figure 6 This is an illustration showing the storage compartment door is unlocked and the power bank has popped out of its slot. When displaying the virtual page, the front-end will determine if the user is a member based on their information. If so, it will render a virtual page style that differentiates the user from non-members in terms of color and shape. Alternatively, the front-end can determine the store type (food service, nursing service, shopping mall) based on store information and render a virtual page style that differentiates the user from non-members in terms of color and shape.
[0089] In this embodiment, the virtual page is divided into multiple elements. When the virtual page class is instantiated and rendered later, the elements can be rendered according to the pre-configured element configuration information and the real-time acquired business data, and the elements can be integrated to obtain the entire virtual page.
[0090] Because the element configuration information integrates common attributes of various shared charging device models, it masks the differences between these models. When developing and maintaining the virtual page, only the common attributes of different shared charging device models need to be set on the server side, without needing to hardcode the attributes of each specific model in the front-end code. In other words, when shared charging devices are updated iteratively, updates are performed on an element-by-element basis, rather than updating the entire virtual page. This eliminates the need for developing and maintaining virtual pages for each specific model of shared charging device, thereby improving the resource utilization of the computer system.
[0091] When updating on an element-by-element basis, the content (element configuration information and business data) of the virtual page is separated from its structure to avoid changes in the structure due to changes in content. These steps resolve the issue of high front-end development and maintenance costs for the power bank rental business, thereby reducing those costs.
[0092] Once the rental logic of shared charging devices changes, virtual pages developed using traditional methods will no longer be able to adapt to this logic. For example, after a user confirms a rental order, the traditional rental logic involves the shared charging device randomly popping up a power bank, and the virtual page displaying a dynamic effect of that power bank being popped up. However, when the rental logic changes, the shared charging device no longer randomly pops up a power bank, but the virtual page does not display anything that adapts to the current rental logic, resulting in poor responsiveness.
[0093] For example, after a user terminal confirms a rental order, the user may not know the remaining power of the power bank. This may cause user experience problems for users who rent for a long time. To solve this problem, in some embodiments, after the server extracts the device information of the shared charging device from the rental request message, it obtains the power parameters from the shared charging device, and renders the power bank according to the element configuration information and the power parameters of the power bank to generate a power bank rendering result carrying power information.
[0094] After obtaining the rendered results of the power banks carrying power information, the remaining power information of these power banks can be marked on the virtual page. Alternatively, at least one candidate power bank with a remaining power greater than a preset threshold can be selected from the virtual page, and its remaining power information can be marked on the virtual page.
[0095] In this scenario, when a candidate power bank with a remaining battery level greater than a preset threshold is selected in the virtual page, the candidate power bank is chosen as the target power bank, and a dynamic effect is displayed on the virtual page of the shared charging device, showing the target power bank popping into its designated charging bay.
[0096] Alternatively, if multiple candidate power banks with remaining battery power greater than a preset threshold are selected in the virtual page, one of the candidate power banks can be selected as the target power bank based on the user's input, and the target power bank can be dynamically displayed in the virtual page of the shared charging device as it pops into its designated compartment.
[0097] Whether the target power bank is selected by the server or by the user terminal can be determined by configuring the rental logic. In some embodiments, the configuration information also includes first rental logic configuration information and second rental logic configuration information.
[0098] The first rental logic configuration information is used to instruct the selection of a candidate power bank with a remaining power greater than a preset threshold in the virtual page, and to select the candidate power bank as the target power bank.
[0099] The second rental logic configuration information is used to instruct the selection of multiple candidate power banks with remaining power greater than a preset threshold in the virtual page, and to select one of the candidate power banks as the target power bank based on the user's input.
[0100] This setting allows the virtual page to be displayed in a way that adapts to the current rental logic, improving the adaptability of the virtual page.
[0101] In some embodiments, the server obtains occupancy parameters from the shared charging device to determine whether the power bank is occupied. Based on the occupancy parameters, it identifies the unoccupied power banks. The server then renders the corresponding unoccupied power banks according to the configuration information and business data to generate rendering results for the unoccupied power banks.
[0102] This setting allows the virtual page to display unused power banks instead of occupied ones, thus reducing the resource overhead on the computer system caused by rendering elements.
[0103] In order to differentiate the display of virtual pages for different user identities, in some embodiments, the front end writes user information into the rental request message, the service terminal finds the corresponding member theme parameters based on the user information, the front end renders the member theme based on the member theme information and member theme parameters, and generates a member theme rendering result. The member theme rendering result is a virtual page style that is set for member users and is different from that of non-member users in terms of color and shape.
[0104] For example, premium members see a cool black theme, while basic members see a standard blue theme.
[0105] In order to differentiate the virtual page display for different store types, in some embodiments, the front end writes store information in the rental request message, the service terminal finds the corresponding store theme parameters based on the store information, and the front end renders the store theme based on the store theme information and store theme parameters to generate a store theme rendering result. The store theme rendering result is a virtual page style that is set to be different in color and shape for different store types.
[0106] One embodiment of this application also provides a mobile power bank rental system, such as... Figure 3 As shown, the system includes: a user terminal 31, a shared charging device 32, and a server 33. The user terminal 31 and the shared charging device 32 are respectively connected to the server 33.
[0107] The shared charging device 32 is equipped with multiple compartments and multiple power banks. After the selected target power bank is determined, the shared charging device 32 ejects the target power bank from the corresponding compartment.
[0108] The server 33 is used to respond to the rental request message initiated by the user terminal 31 and generate a rental response message. The rental response message carries configuration information and business data. The configuration information includes element configuration information and element organization relationship information corresponding to the elements in the virtual page of the shared charging device 32.
[0109] User terminal 31 obtains device information from shared charging equipment 32 and sends a rental request message carrying the device information to server 33. After receiving the rental response message, user terminal 31 renders the corresponding elements according to element configuration information and business data, generates the element rendering result, and instantiates and renders the virtual page class of shared charging equipment 32 according to the element rendering result and element organization relationship information, generating the virtual page of shared charging equipment 32. After determining the selected target power bank, user terminal 31 displays the dynamic effect of the target power bank popping out of its location in the virtual page of shared charging equipment according to user information and / or store information. Similarly, the virtual page can also be displayed on the screen of shared charging equipment, showing the dynamic effect of the target power bank popping out of its location.
[0110] Figure 4 This is a schematic diagram illustrating the operating principle of a mobile power bank rental system according to an embodiment of this application, as follows: Figure 4 As shown, user terminal 31, shared charging device 32, and developer terminal 34 are respectively connected to server 33.
[0111] In this process, the staff developing the virtual page uploads configuration information to the server 33 via the developer terminal 34. To allow staff to preview the configuration effect more intuitively while configuring the information, WebGL (Web Graphics Library, a 3D drawing protocol) or Canvas (a "container" for user interface components) can be used to render the simulation effect, and the virtual page can be previewed in real time by changing the data in real time, thereby improving configuration efficiency.
[0112] Server 33 stores configuration information. Server 33 will monitor shared charging device 32 and receive business data from shared charging device 32. Server 33 will also store existing business data from user terminal 31, and when it subsequently receives a rental request message initiated by user terminal 31, it will send the configuration information and corresponding business data to user terminal 31, enabling user terminal 31 to instantiate and render the virtual page class to obtain the virtual page.
[0113] User terminal 31 can obtain the code for implementing the virtual page by downloading and installing software. After receiving the rental response message, user terminal 31 extracts the configuration information and business data from it, passes the configuration information and business data to the implementation code, instantiates and renders the virtual page class, and obtains the virtual page.
[0114] This embodiment also provides another mobile power rental system, which includes: a shared charging device and a server, wherein the shared charging device and the server are communicatively connected.
[0115] The server is used to respond to rental request messages and generate rental response messages. The rental response messages carry configuration information and business data. The configuration information includes element configuration information and element organization relationship information corresponding to the elements in the virtual page of the shared charging device.
[0116] The shared charging equipment is equipped with multiple charging bays and multiple power banks. After the selected power bank is identified, the shared charging equipment will eject the target power bank from the corresponding charging bay.
[0117] The shared charging equipment is also used to acquire users' facial images, determine user information based on the facial images, and send a rental request message carrying equipment information, user information, and store information to the server. After receiving the rental response message, the shared charging equipment renders the corresponding elements according to the element configuration information and business data, generates the element rendering results, and instantiates and renders the virtual page class of the shared charging equipment according to the element rendering results and element organization relationship information, generating the virtual page of the shared charging equipment. After determining the selected target power bank, the system displays the dynamic effect of the target power bank popping up in the virtual page of the shared charging equipment according to the user information and / or store information.
[0118] This embodiment also provides an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.
[0119] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0120] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0121] S1, send a rental request message carrying a set of information to the server. The set of information includes the device information of the shared charging device, the user information, and the store information where the shared charging device is located. The shared charging device communicates with the server.
[0122] S2, obtain the rental response message returned by the server in response to the rental request message. The rental response message carries configuration information and business data. The configuration information includes element configuration information and element organization relationship information corresponding to the elements in the virtual page of the shared charging device.
[0123] S3 renders the corresponding elements based on element configuration information and business data, generates the element rendering results, and instantiates and renders the virtual page class of the shared charging device based on the element rendering results and element organization relationship information, generating the virtual page of the shared charging device.
[0124] S4. Identify the selected target power bank and, based on user information and / or store information, display the dynamic effect of the target power bank popping up in its location on the virtual page of the shared charging equipment.
[0125] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated in this embodiment.
[0126] Furthermore, in conjunction with the mobile power bank rental method provided in the above embodiments, this embodiment can also provide a storage medium for implementation. This storage medium stores a computer program; when executed by a processor, the computer program implements any of the mobile power bank rental methods described in the above embodiments.
[0127] It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. All other embodiments derived by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.
[0128] Obviously, the accompanying drawings are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar situations based on these drawings without any creative effort. Furthermore, it is understood that although the work done in this development process may be complex and lengthy, for those skilled in the art, certain design, manufacturing, or production modifications made based on the technical content disclosed in this application are merely conventional technical means and should not be considered as insufficient disclosure of this application.
[0129] The term "embodiment" in this application refers to a specific feature, structure, or characteristic described in connection with an embodiment that may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily imply the same embodiment, nor does it imply that it is mutually exclusive with or independent of other embodiments. It will be clearly or implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0130] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of patent protection. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the appended claims.
Claims
1. A method for renting a portable power bank, applied to shared charging equipment, characterized in that, include: Send a rental request message carrying a set of information to the server, wherein the set of information includes the device information of the shared charging device, the user information, and the store information where the shared charging device is located, and the shared charging device is communicatively connected to the server; Obtain the rental response message returned by the server in response to the rental request message. The rental response message carries configuration information and business data. The configuration information includes element configuration information and element organization relationship information corresponding to elements in the virtual page of the shared charging device. The element configuration information integrates common attributes of various models of shared charging devices. The element organization relationship information includes a structure tree stored in the form of key-value pairs, wherein the structure tree uses the element identifier of the parent node as the key and the element identifier of the child node as the value. Rendering the corresponding elements according to the element configuration information and the business data to generate the rendering result of the elements, and instantiating and rendering the virtual page class of the shared charging device according to the rendering result of the elements and the element organization relationship information to generate the virtual page of the shared charging device includes: traversing each node of the structure tree, calling the element implementation code corresponding to each node respectively, and passing in the corresponding element parameters and the business data, rendering the elements of each node respectively to obtain the rendering result of each element, and integrating the rendering results of each element according to the organization relationship of each node to generate the virtual page of the shared charging device; The selected target power bank is identified, and based on the user information and / or the store information, a dynamic effect is displayed on the virtual page of the shared charging device, showing the target power bank popping into its location.
2. The mobile power bank rental method according to claim 1, characterized in that, The elements of the virtual page include at least one of the following: the background of the shared charging device, the charging bay, the power bank, and the human-computer interaction button; The element configuration information includes at least one of the following: element position information, element quantity information, element size information, element shape information, element color information, and element dynamic effect information.
3. The mobile power bank rental method according to claim 1, characterized in that, The business data includes the power parameters of the power bank obtained by the server from the shared charging device. Based on the element configuration information and the business data, the server renders the corresponding elements, generating the rendering result of the elements, including: Based on the element configuration information and the power parameters of the power bank, the power bank is rendered to generate a power bank rendering result carrying power information. The remaining battery information of the power bank is marked on the virtual page; or, at least one candidate power bank with a remaining battery level greater than a preset threshold is selected on the virtual page, and the remaining battery information of the candidate power bank is marked on the virtual page.
4. The mobile power bank rental method according to claim 3, characterized in that, If a candidate power bank with remaining battery power greater than a preset threshold is selected from the virtual page, then that candidate power bank is chosen as the target power bank, and a dynamic effect of the target power bank popping into its designated charging bay is displayed on the virtual page of the shared charging device; or, If multiple candidate power banks with remaining power greater than a preset threshold are selected in the virtual page, one of the candidate power banks is selected as the target power bank according to the user's input, and the target power bank is displayed in a dynamic effect on the virtual page of the shared charging device as it pops into its designated compartment.
5. The mobile power bank rental method according to claim 4, characterized in that, The configuration information also includes first rental logic configuration information and second rental logic configuration information, wherein, The first rental logic configuration information is used to indicate that a candidate power bank with a remaining power greater than a preset threshold is selected in the virtual page, and the candidate power bank is selected as the target power bank; The second rental logic configuration information is used to instruct multiple candidate power banks with remaining power greater than a preset threshold to be filtered in the virtual page, and to select one of the candidate power banks as the target power bank according to the user's input operation.
6. The mobile power bank rental method according to claim 1, characterized in that, The business data includes occupancy parameters obtained by the server from the shared charging device, indicating whether the power bank is occupied. Based on the element configuration information and the business data, the corresponding elements are rendered, and the rendering result of the elements is generated, including: Based on the occupancy parameters, determine the unoccupied power banks; Based on the configuration information and the service data, the corresponding unoccupied power banks are rendered to generate rendering results for the unoccupied power banks.
7. The mobile power bank rental method according to claim 1, characterized in that, The virtual page elements include a theme, the element configuration information includes theme information, and the business data includes theme parameters obtained by the server based on user information and / or store information carried in the rental request message. The corresponding elements are rendered according to the element configuration information and the business data, and the rendering result of the elements is generated as follows: Based on the user information, a member theme is determined. Based on the member theme information and parameters, the member theme is rendered to generate a member theme rendering result. This rendering result corresponds to a virtual page style set by the member user that differentiates it from non-member users in terms of color and shape; and / or, The store theme is determined based on the store information. The store theme is then rendered based on the store theme information and store theme parameters to generate a store theme rendering result. The store theme rendering result is a virtual page style that is differentiated in color and shape according to the store type.
8. The mobile power bank rental method according to any one of claims 1 to 7, characterized in that, Before sending the rental request message carrying the information set to the server, the method further includes: The user terminal scans the tag carried by the shared charging device to obtain the device information of the shared charging device; The user terminal obtains its own location information and then obtains the store information based on its own location information. The user terminal generates the rental request message based on the device information, the user information, and the store information.
9. The mobile power bank rental method according to claim 8, characterized in that, The process of identifying the selected target power bank and displaying a dynamic effect of the target power bank popping into its location on the virtual page of the shared charging device, based on the user information and / or the store information, includes: The user terminal interface displays a dynamic effect of the target power bank popping out of its designated compartment.
10. The mobile power bank rental method according to any one of claims 1 to 7, characterized in that, The shared charging device stores the store information. Before sending a rental request message carrying the information set to the server, the method further includes: The shared charging device collects user facial images and compares the user facial images with pre-stored user facial images. If the comparison matches, it obtains user information corresponding to the user facial image. The shared charging device generates the rental request message based on the device information, the user information, and the store information.
11. The mobile power bank rental method according to claim 10, characterized in that, The process of identifying the selected target power bank and displaying a dynamic effect of the target power bank popping into its location on the virtual page of the shared charging device, based on the user information and / or the store information, includes: The interface of the shared charging device displays a dynamic effect of the target power bank popping out of its designated compartment.
12. A portable power bank rental system, characterized in that, include: The system comprises a user terminal, shared charging equipment, and a server, wherein the user terminal and the shared charging equipment are communicatively connected to the server; wherein... The shared charging device is equipped with multiple compartments and multiple power banks. After determining the selected target power bank, the shared charging device will eject the target power bank from the corresponding compartment. The server is used to respond to the rental request message initiated by the user terminal and generate a rental response message. The rental response message carries configuration information and business data. The configuration information includes element configuration information and element organization relationship information corresponding to elements in the virtual page of the shared charging device. The element configuration information integrates common attributes of various models of shared charging devices. The element organization relationship information includes a structure tree stored in the form of key-value pairs, wherein the structure tree uses the element identifier of the parent node as the key and the element identifier of the child node as the value. The user terminal is used to obtain the device information of the shared charging device and the store information where the shared charging device is located, and send a rental request message carrying the device information, user information and store information to the server. After receiving the rental response message, the user terminal renders the corresponding elements according to the element configuration information and the business data to generate the rendering result of the elements, and instantiates and renders the virtual page class of the shared charging device according to the rendering result of the elements and the element organization relationship information to generate the virtual page of the shared charging device. After determining the selected target power bank, the user terminal displays the dynamic effect of the target power bank popping out of the storage compartment in the virtual page of the shared charging device according to the user information and / or the store information. The steps of rendering the corresponding elements according to the element configuration information and the business data to generate the rendering result of the elements, and instantiating and rendering the virtual page class of the shared charging device according to the rendering result of the elements and the element organization relationship information to generate the virtual page of the shared charging device include: traversing each node of the structure tree, calling the element implementation code corresponding to each node respectively, and passing in the corresponding element parameters and the business data, rendering the elements of each node respectively to obtain the rendering result of each element, and integrating the rendering results of each element according to the organization relationship of each node to generate the virtual page of the shared charging device.
13. A portable power bank rental system, characterized in that, include: A shared charging device and a server, wherein the shared charging device and the server are communicatively connected; wherein... The server is used to respond to rental request messages and generate rental response messages. The rental response messages carry configuration information and business data. The configuration information includes element configuration information and element organization relationship information corresponding to elements in the virtual page of the shared charging device. The element configuration information integrates common attributes of various models of shared charging devices. The element organization relationship information includes a structure tree stored in the form of key-value pairs, wherein the structure tree uses the element identifier of the parent node as the key and the element identifier of the child node as the value. The shared charging device is equipped with multiple compartments and multiple power banks. After determining the selected target power bank, the shared charging device will eject the target power bank from the corresponding compartment. The shared charging device is also used to acquire the user's facial image, determine the user information based on the user's facial image, and send a rental request message carrying the device information, user information, and store information to the server. After receiving the rental response message, the shared charging device renders the corresponding elements according to the element configuration information and the business data, generates the rendering result of the elements, and instantiates and renders the virtual page class of the shared charging device according to the rendering result of the elements and the element organization relationship information, generates the virtual page of the shared charging device, and after determining the selected target power bank, displays the dynamic effect of the target power bank popping out of the storage compartment in the virtual page of the shared charging device according to the user information and / or the store information. The steps of rendering the corresponding elements according to the element configuration information and the business data to generate the rendering result of the elements, and instantiating and rendering the virtual page class of the shared charging device according to the rendering result of the elements and the element organization relationship information to generate the virtual page of the shared charging device include: traversing each node of the structure tree, calling the element implementation code corresponding to each node respectively, and passing in the corresponding element parameters and the business data, rendering the elements of each node respectively to obtain the rendering result of each element, and integrating the rendering results of each element according to the organization relationship of each node to generate the virtual page of the shared charging device.
14. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the mobile power bank rental method according to any one of claims 1 to 11.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the mobile power bank rental method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Mobile power pack rental method and system, rental terminal, and readable storage medium
CN107590714A
Exhibition hall display system
CN110333784A
Rental machine with graphical user interface for electronic product rental
CN306204676S