A distance measurement method, device, equipment and storage medium
By acquiring device identification and size data from mobile terminal devices, rendering device model diagrams, and determining start and end point positions, the problem of users being unable to carry measuring tools and cameras for distance measurement failures is solved, enabling convenient and universally applicable distance measurement.
Patent Information
- Application Number
- CN202010523504.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-10
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2040-06-10
AI Technical Summary
Users often do not carry standard measuring tools with them, making distance measurement inconvenient. Furthermore, distance measurement using a camera requires the configuration of multiple sensors and is prone to failure due to human factors.
By obtaining the device identifier of the mobile terminal device, uploading it to the server to query the device size data and model diagram, rendering it on the interface, establishing a mapping relationship, and receiving the start and end positions to determine the actual distance.
It enables simple and convenient distance measurement, has universal applicability, reduces hardware requirements, and improves measurement accuracy and efficiency.
Smart Images

Figure CN113763495B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a distance measurement method, device, equipment and storage medium. Background Art
[0002] Commonly used distance measurement methods include: using a standard measuring tool (such as a ruler) to measure the distance, or using a camera of a terminal device equipped with a distance measurement application to measure the distance between the two ends of the target.
[0003] In the process of implementing the present invention, the inventors found that there are at least the following technical problems in the prior art: users often do not carry standard measuring tools with them, which makes distance measurement inconvenient; using a camera to measure the distance between the two ends of a target requires the terminal device to be configured with a variety of relevant sensors, which is not universally applicable; and in the process of moving the terminal device to move the target point in the image captured by the camera from one end of the distance measurement to the other end, it is also very easy for the measurement to fail due to human factors (such as movement deviation), and the measurement needs to be repeated. Summary of the invention
[0004] The embodiments of the present invention provide a distance measurement method, device, equipment and storage medium, which can realize distance measurement by using an interface with a measurement function, and the measurement process is simple, convenient and has universal applicability.
[0005] In a first aspect, an embodiment of the present invention provides a distance measurement method, including:
[0006] Obtaining a device identification of a mobile terminal device, and uploading the device identification to a server, so that the server can query device size data and a device model diagram corresponding to the device identification;
[0007] Receiving the device size data and the device model diagram, rendering the device model diagram in the current interface, and establishing a mapping relationship between the rendered device model diagram and the device size data;
[0008] A starting position and an end position acting on a rendered device model diagram at least once are received, an actual distance between the starting position and the end position is determined according to the mapping relationship, and a required distance is determined according to at least one actual distance.
[0009] In a second aspect, an embodiment of the present invention provides a distance measurement device, including:
[0010] An identification uploading module, used for acquiring a device identification of a mobile terminal device, and uploading the device identification to a server, so that the server can query device size data and a device model diagram corresponding to the device identification;
[0011] An interface rendering module, used for receiving the device size data and the device model diagram, rendering the device model diagram in the current interface, and establishing a mapping relationship between the rendered device model diagram and the device size data;
[0012] The distance determination module is used to receive the starting position and the end position acting on the rendered device model diagram at least once, determine the actual distance between the starting position and the end position according to the mapping relationship, and determine the required distance according to at least one actual distance.
[0013] In a third aspect, an embodiment of the present invention provides a terminal device, including:
[0014] one or more processors;
[0015] A memory for storing one or more programs;
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the distance measurement method as described in any embodiment of the present invention.
[0017] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the distance measurement method as described in any embodiment of the present invention.
[0018] The embodiment of the present invention provides a distance measurement method, device, equipment and storage medium. The current device obtains the device identification of the mobile terminal device used for distance measurement, and uploads the device identification to the server so that the server queries the device size data and device model diagram corresponding to the device identification; the current device receives the device size data and device model diagram corresponding to the device identification queried by the server, renders the device model diagram in the current interface, and establishes a mapping relationship between the rendered device model diagram and the device size data; the current device receives the starting position and the end position acting on the rendered device model diagram at least once, determines the actual distance between the starting position and the end position according to the mapping relationship, and can determine the required distance according to the actual distance. By rendering the device model diagram of the mobile terminal device used for distance measurement on the interface, and inputting the starting / end position corresponding to the starting / end position actually measured at least once on the rendered device model diagram, based on the mapping relationship between the device model diagram and the device size data, the distance between at least one actually measured start / end position can be obtained, and the size of the required distance can be obtained according to at least one actual distance, and the measurement process is simple and convenient and has universal applicability. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 A flow chart of a distance measurement method provided by Embodiment 1 of the present invention is shown;
[0021] Figure 2 A flow chart of a distance measurement method provided by Embodiment 2 of the present invention is shown;
[0022] Figure 3 A flow chart of a distance measurement method provided by Embodiment 3 of the present invention is shown;
[0023] Figure 4 A schematic diagram of an interface in a distance measurement method provided in Embodiment 3 of the present invention is shown;
[0024] Figure 5 A schematic diagram of the structure of a distance measurement device provided by a fourth embodiment of the present invention is shown;
[0025] Figure 6 A schematic diagram of the hardware structure of a terminal device provided in Embodiment 5 of the present invention is shown. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described through implementation methods with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In the following embodiments, each embodiment provides optional features and examples at the same time. The various features recorded in the embodiments can be combined to form multiple optional solutions. Each numbered embodiment should not be regarded as only one technical solution.
[0027] Embodiment 1
[0028] Figure 1 The flowchart of a distance measurement method provided by the first embodiment of the present invention is shown. The distance measurement method provided by the embodiment of the present invention can be applied to the situation of measuring distance, for example, the situation of measuring the required distance before purchasing goods using a shopping application. The method can be executed by a distance measurement device, which is implemented in software and / or hardware, and is preferably configured in an electronic device, such as a mobile phone. Figure 1 As shown, the distance measurement method provided in the embodiment of the present invention includes the following steps:
[0029] S110: Obtain a device identification of the mobile terminal device, and upload the device identification to a server, so that the server queries device size data and a device model diagram corresponding to the device identification.
[0030] In an embodiment of the present invention, a mobile terminal device is, for example, a mobile phone, a notebook, or a tablet computer, which is a terminal device that is widely used in the user's life and work and is easy to move. When a user needs to measure a distance and it is inconvenient to find a standard measuring tool such as a ruler, a mobile terminal device such as a mobile phone or a tablet computer can be used instead of a ruler to measure the distance. Before performing a distance measurement, the device identification of the mobile terminal device used as a ruler can be uploaded to a server that supports the distance measurement service provided by this embodiment, so that the server can quickly search and query through locally cached data, or query the device information corresponding to the device identification through other means such as the Internet, and the device information includes but is not limited to device size data, device model diagram, or device default screen saver cover diagram, etc.
[0031] In this embodiment, the device identification can be, for example, the device name, device model, etc., which can be used to determine the unique device appearance; the device size data is the device's appearance dimensions, such as the device's length, width, thickness, and other real device size data; the device model diagram is the device's appearance diagram, and the device model diagram can be a two-dimensional or three-dimensional model diagram. Since the measured distance is one-dimensional data, the use of a two-dimensional model diagram can meet the measurement requirements and is more conducive to the transmission, storage, and rendering of the device model diagram. Among them, the device's default screen saver cover image can improve the rendering effect of the device model diagram when it is rendered in the current interface, which is conducive to improving the user's distance measurement experience.
[0032] Optionally, obtaining the device identification of the mobile terminal device includes: in response to a selection operation of an item in a drop-down box control in the current interface, using the selected item as the device identification of the mobile terminal device; or, obtaining the device identification of the current mobile terminal device by calling a system native program of the current mobile terminal device.
[0033] In this embodiment, the mobile terminal device may be the current mobile terminal device that is running the program code corresponding to the distance measurement method, or may be other mobile terminal devices that are not installed with or are not running the program code corresponding to the distance measurement method. For example, a user has two mobile terminal devices, a mobile phone and a tablet computer, and is currently using the tablet computer to run the program code corresponding to the distance measurement method, but can use the mobile phone to replace the ruler to measure the distance, or can use the tablet computer to replace the ruler to measure the distance.
[0034] When the user chooses to use a non-current mobile terminal device instead of a ruler to measure the distance, the user can click on an item in the drop-down box control that has been rendered in the current interface to select the item, where each item in the drop-down box control is the device identification of each mobile terminal device. The current mobile terminal device responds to the item selection operation and uses the item selected by the user as the device identification of the mobile terminal device. In addition, if the device identification that the user wants to select does not exist in the item, an "other" item can be set in the drop-down box control so that the user can click on the "other" item to pop up a text box control, and the user can manually enter the device identification of the mobile terminal device in the text box control.
[0035] In addition, before the user selects an item from the drop-down box control, the current mobile terminal device can also default to the user selecting to use the current mobile terminal device instead of the ruler to measure the distance. At this time, the current mobile terminal device can call the underlying system native program (native program) to obtain the device identification of the current mobile terminal device, and then automatically select the corresponding item in the drop-down box control for display according to the obtained device identification, so as to automatically obtain the device identification and improve the distance measurement efficiency.
[0036] S120, receiving device size data and a device model diagram, rendering the device model diagram in the current interface, and establishing a mapping relationship between the rendered device model diagram and the device size data.
[0037] In the embodiment of the present invention, after querying the device size data and device model diagram corresponding to the device identifier, the server can feed back to the current device that is running the program code corresponding to the distance measurement method through the corresponding data delivery interface. The current device can store the received device size data for subsequent distance measurement, and can render the received device model diagram in the current interface so that the user can see the simulation model diagram of the mobile terminal device that replaces the ruler.
[0038] The device model image can be rendered at a preset position of the current interface of the current device, such as the center of the interface. The image size of the rendered device model image may be different from the original size of the received device model image. A mapping relationship can be established between the image size of the rendered device model image and the device size data to lay the foundation for subsequent distance measurement.
[0039] For example, the rendered device model image is a two-dimensional model image of the front of a mobile phone. The length of the rendered mobile phone is 1700 pixels, and the length of the real mobile phone in the device size data is 15 cm. Then, a correspondence between these 1700 pixels and 15 cm can be established, that is, each pixel can correspond to an actual distance of 15 / 1700 cm.
[0040] Optionally, rendering the device model image in the current interface includes: obtaining the screen size of the current device, and determining the scaling ratio of the device model image according to the screen size and the image size of the device model image; determining the layout parameters of the image display control according to the image size and the scaling ratio; rendering the image display control in the current interface according to the layout parameters of the image display control, and importing the device model image scaled according to the scaling ratio into the image display control for display.
[0041] Among them, the device model image can be rendered in a size-adapted manner according to the screen size of the current device to avoid the device model image being rendered too large or too small, which is not conducive to the user inputting the starting point and end point positions. Among them, the current device can also call the native program to obtain the screen size; further, the optimal scaling ratio of the device model image can be determined according to the preset area ratio of the device model image to be rendered and the image size of the device model image; according to the scaling ratio, the image size of the device model image when it is rendered can be determined, and the image size when rendered can be used as the height and width size of the image display control; if it is desired to render the device model image in the center of the current interface, the center point position coordinates of the image display control can be determined, and the height, width and center point position coordinates of the image display control can be used as the layout parameters of the image display control, and the image display control can be generated in the current interface according to the layout parameters, and the scaled device model image can be imported into the generated image display control to render the device model image so that the device model image is displayed in the current interface.
[0042] S130, receiving a starting position and an ending position acting on the rendered device model diagram at least once, determining an actual distance between the starting position and the ending position according to a mapping relationship, and determining a required distance according to at least one actual distance.
[0043] In an embodiment of the present invention, after the user uses a real mobile terminal device to measure the required distance, the user can input the starting point position and the end point position in the device model diagram corresponding to the measurement starting point and the measurement end point in the actual measurement process from the device model diagram rendered by the current device, for example, click the starting point position and the end point position in the rendered device model diagram in turn. Among them, after the user inputs the starting point position and the end point position, the current device can identify the starting point position and the end point position input by the user in the current interface (for example, use a circular dot to identify the starting point position and the end point position input by the user), and can delete or move the starting point position and the end point position according to the editing instruction input by the user.
[0044] In the process of measuring the required distance using a real mobile terminal device, the required distance may be less than or equal to the device size data of the mobile terminal device, or may be greater than the device size data of the mobile terminal device. When the required distance is less than or equal to the device size data of the mobile terminal device, the required distance can be measured once using the mobile terminal device. At this time, the user can enter the starting position and the end position once on the rendered device model diagram, and the current device can use the actual distance between the starting position and the end position received this time as the required distance. When the required distance is greater than the device size data of the mobile terminal device, the required distance needs to be measured more than twice using the mobile terminal device to obtain the required distance. At this time, the user can enter the starting position and the end position multiple times on the rendered device model diagram, and the current device can determine the actual distance between the starting position and the end position input each time, and can use the sum of at least one determined actual distance as the required distance.
[0045] Among them, the current device can determine the actual distance between the starting position and the end position on the device model diagram according to the mapping relationship between the device model diagram rendered in the current interface and the device size data each time the user inputs the instructions for the starting position and the end position. The current device can also determine the required distance size according to each actual distance when the user completes inputting the starting position and the end position. In addition, the determined required distance can also be imported into the text box control rendered in the interface for displaying the required distance, so that the user can understand the value of the measured required distance.
[0046] By rendering a device model image with the same appearance as the mobile terminal device used for distance measurement on the interface of the current device, and inputting the start / end point positions corresponding to the actual measured start / end point positions on the rendered device model image, the distance between the actual measured start / end point positions can be obtained based on the mapping relationship between the device model image and the device size data, thereby realizing the measurement of the required distance using an interface with a measurement function. The measurement process is simple and convenient, has low hardware requirements for the current mobile terminal device, and is generally applicable.
[0047] Optionally, after receiving the device size data and the device model diagram, the method further includes: storing the device size data and the device model diagram, and establishing a corresponding relationship between the device identifier and the device size data and the device model diagram;
[0048] Correspondingly, after obtaining the new device identification, it also includes: determining whether there is device size data and device model diagram corresponding to the new device identification in the corresponding relationship; if so, reading the device size data and device model diagram corresponding to the new device identification; rendering the read device model diagram in the current interface, and establishing a mapping relationship between the rendered device model diagram and the read device size data; if not, uploading the new device identification to the server.
[0049] In this embodiment, after receiving the device size data and device model diagram fed back by the server, the current device can store them in a local storage space and establish a corresponding relationship between the device identification and the device size data and the device model diagram. Exemplarily, the current device can establish an identification-data model library, in which the device identification, device size data and device model diagram can be recorded, and a corresponding relationship between the device identification and the device size data and the device model diagram can be established.
[0050] If the current device is used to measure the distance again, after obtaining the device identification, it can be determined whether there are device size data and device model diagrams corresponding to the device identification in the established correspondence. If so, the corresponding device size data and device model diagram can be read from the local storage space very quickly, and the read device model diagram can be rendered in the current interface, which improves the rendering efficiency of the device model diagram and gives the user a better experience; and a mapping relationship between the rendered device model diagram and the read device size data is established for subsequent distance measurement. If not, the device identification can be sent to the server so that the server queries the device size data and device model diagram corresponding to the device identification; and after receiving the device size data and device model diagram fed back by the server, the received device size data and device model diagram can be stored again, and a correspondence relationship between the device identification and the device size data and device model diagram can be established to enrich the corresponding relationship stored locally.
[0051] Exemplarily, the received device size data, device model diagram and device identification can be added to the identification-data model library, and a correspondence between the device identification and the device size data and device model diagram can be established to update the identification-data model library, which is beneficial for the current mobile terminal device to obtain the device size data and device model diagram locally.
[0052] The embodiment of the present invention provides a distance measurement method, wherein the current device obtains a device identification of a mobile terminal device used for distance measurement, and uploads the device identification to a server, so that the server queries the device size data and device model diagram corresponding to the device identification; the current device receives the device size data and device model diagram corresponding to the device identification queried by the server, renders the device model diagram in the current interface, and establishes a mapping relationship between the rendered device model diagram and the device size data; the current device receives at least one starting position and end position acting on the rendered device model diagram, determines the actual distance between the starting position and the end position according to the mapping relationship, and can determine the required distance according to the actual distance. By rendering the device model diagram of the mobile terminal device used for distance measurement on the interface, and inputting the starting / end position corresponding to the starting / end position actually measured at least once on the rendered device model diagram, based on the mapping relationship between the device model diagram and the device size data, the distance between at least one actually measured starting / end position can be obtained, and the size of the required distance can be obtained according to at least one actual distance, and the measurement process is simple, convenient and has universal applicability.
[0053] Embodiment 2
[0054] Based on the above embodiment, this embodiment optimizes the interface rendering and distance measurement steps, which can expand the measurement distance range and improve the user experience. The distance measurement method proposed in this embodiment and the above embodiment belongs to the same inventive concept, and the technical details not described in detail in this embodiment can be referred to the above embodiment.
[0055] Figure 2 FIG. 2 shows a flow chart of a distance measurement method provided by Embodiment 2 of the present invention. Figure 2 , the distance measurement method provided in the embodiment of the present invention includes:
[0056] S210: Obtain a device identification of the mobile terminal device, and upload the device identification to a server, so that the server queries device size data and a device model diagram corresponding to the device identification.
[0057] S220, receiving device size data and a device model diagram, rendering the device model diagram in the current interface, and establishing a mapping relationship between the rendered device model diagram and the device size data.
[0058] S230. In response to the received measurement dimension, determine first dimension data corresponding to the measurement dimension in the device dimension data, and render a slider control corresponding to the measurement dimension in the rendered device model diagram in the current interface.
[0059] The edges of each dimension (such as length or width) of the device model diagram rendered in the current interface can be used for distance measurement. In this embodiment, the current device can receive the measurement dimension input by the user to determine the measurement edge used for measurement in the mobile terminal device. In addition, if the current device does not receive the measurement dimension input by the user, the default dimension in the device model diagram (such as the long side in the model diagram) can also be used as the measurement dimension.
[0060] Among them, after determining the measurement edge dimension used for measurement, the current device can extract the measurement edge dimension data corresponding to the measurement dimension in the real mobile terminal device from the device dimension data, that is, the first dimension data corresponding to the measurement dimension. Among them, rendering the slider control corresponding to the measurement dimension can specifically be to render the slider control outside the measurement edge corresponding to the measurement dimension in the device model diagram. In addition, a corresponding relationship can be established between the pixel position of each pixel point of the slide rail in the slider control and the pixel position of the pixel point of the measurement edge in the device model diagram. For example, if the length of the measurement edge in the device model diagram is 1700 pixels and the length of the slide rail is 850 pixels, then a corresponding relationship can be established between one pixel point of the slide rail and two pixel points of the measurement edge in the device model diagram. Correspondingly, when the slider slides one pixel position on the slide rail, the measurement position input on the measurement edge in the corresponding device model diagram moves two pixel positions.
[0061] S240. In response to the received first coefficient, calculate the product of the first coefficient and the first size data to obtain a first distance.
[0062] In this embodiment, when the required distance is measured using the measurement side of the real mobile terminal device, and the required distance is greater than the length of the measurement side, the value of the required distance can be determined in the form of several times the measurement side plus the starting position to the end position on the remaining measurement side, and the first coefficient can represent the positive integer multiple of the size data of the measurement side in the real mobile terminal device. By calculating the product of the first coefficient and the first size value, the multiple length of the measurement side of the real mobile terminal device in the required distance, that is, the first distance, can be obtained. In addition, when the required distance is less than or equal to the length of the measurement side, the value of the first coefficient can also be zero.
[0063] By receiving the first coefficient, the user is prevented from inputting the starting point and the end point on the rendered device model diagram for multiple times, which simplifies the measurement operation steps and improves the distance measurement efficiency and user experience.
[0064] S250: In response to a sliding operation of a slider in a slider control, determine a sliding start point and a sliding end point.
[0065] In this embodiment, the remaining distance outside the multiple length of the measurement side of the real mobile terminal device in the required distance can be represented by the range between the sliding start point and the sliding end point of the slider in the slider control. Since a corresponding relationship is established between the position of the slider and the position on the measurement dimension of the rendered device model diagram, the current device can determine the starting position and the end position acting on the rendered device model diagram according to the sliding start point and the sliding end point.
[0066] For example, the remaining distance during actual measurement is a range in the middle of the measuring edge in the actual mobile terminal device. In response to the sliding operation of the slider in the slider control, the sliding start point and the sliding end point can be determined by taking the slider position input by the user clicking the slider for the first time as the sliding start point, taking the slider position input by the user clicking the slider for the second time as the sliding end point, or taking the slider position where the user presses the slider from the sliding start point until the user stops pressing the slider as the sliding end point.
[0067] For another example, the remaining distance during actual measurement is a range measured from the corresponding end of the initial end of the slider on the measuring side in the actual mobile terminal device. In response to the sliding operation of the slider in the slider control, the sliding start point and the sliding end point are determined by taking the initial end of the slider in the slider control as the sliding start point, and taking the slider position input by the user clicking the slider track as the sliding end point, or taking the slider position where the user presses the slider from the sliding start point until the user stops pressing the slider as the sliding end point.
[0068] S260: Determine the actual distance between the sliding start point and the sliding end point according to the correspondence between the position of the slider and the position on the measurement dimension in the rendered device model diagram, as well as the mapping relationship.
[0069] Among them, the correspondence between the position of the slider and the position on the measurement dimension in the rendered device model diagram can be considered as the correspondence between the pixel position of the pixel point on the slide rail where the slider is located and the pixel position of the pixel point on the measurement edge in the device model diagram. According to this correspondence, the number of pixel points on the measurement edge in the rendered device model diagram corresponding to the sliding start point to the sliding end point can be determined. Further, according to the mapping relationship between the rendered device model diagram and the device size data, the value of the actual remaining distance corresponding to the number of pixel points on the measurement edge in the rendered device model diagram, that is, the actual distance, can be determined.
[0070] S270: Taking the sum of the first distance and the actual distance as the required distance.
[0071] In an embodiment of the present invention, by summing the first distance and the actual distance, when the required distance is greater than the length of the measuring side, the value of the required distance can be determined in the form of a value of a multiple length of the measuring side plus a value from the starting position to the end position on the remaining measuring side, thereby simplifying the measurement operation steps and improving the distance measurement efficiency and user experience.
[0072] Optionally, a slider control corresponding to the measurement dimension in the rendered device model image is rendered in the current interface, including: determining the side length parameters and position parameters corresponding to the measurement dimension in the image display control imported by the rendered device model image; translating the position parameter by a preset value in a direction perpendicular to the measurement dimension away from the rendered device model image to obtain a target position parameter; using the side length parameter and the target position parameter as layout parameters of the slider control, and rendering the slider control in the current interface according to the layout parameters of the slider control.
[0073] In this embodiment, the side length parameters and position parameters corresponding to the measurement dimension in the image display control imported by the rendered device model image can be considered as the pixel length of the measurement edge corresponding to the measurement dimension in the rendered device model image, and the pixel position coordinates of the endpoints on either side of the measurement edge.
[0074] By translating the position parameter by a preset value in a direction perpendicular to the measurement dimension and away from the rendered device model image, the pixel position coordinates of the end points on either side of the slide rail in the slider control outside the measurement edge can be obtained, that is, the target position parameter, where the preset value can be set according to the screen size of the current device, for example, it can be set to 100 pixels or 150 pixels, and no specific limitation is made here.
[0075] By using the length parameter of the measured side as the length parameter of the slide track in the slider control, and according to the pixel position coordinates of the endpoints of either side of the slide track in the slider control, it is possible to render a slider control that is equal in length to the measured side in the device model image on the outside of the measured side. By rendering a slider control that is equal in length to the device model image, the input sliding start and end points can be made to fully correspond to the start and end points of the measured side in the device model image, thereby improving the measurement accuracy to a certain extent.
[0076] In the embodiment of the present invention, based on the above-mentioned embodiment, the current device can determine the measuring edge used for measurement in the mobile terminal device according to the measurement dimension input by the user, and can input a first coefficient used to represent the multiple of the measuring edge; a corresponding slider control can also be rendered on the outside of the measuring edge, and the starting point and end point of the remaining distance other than the distance of the multiple of the length of the measuring edge can be input by sliding the slider; the actual distance finally measured is the first dimension data of the measuring edge multiplied by the first coefficient, plus the distance between the sliding start point and the sliding end point of the slider, so as to realize the measurement of the actual distance greater than the length of the measuring edge.
[0077] In one embodiment, the rendered slider control can preferably be equal in length to the measuring edge, so that the input sliding start point and sliding end point completely correspond to the start point position and end point position on the measuring edge in the device model diagram, thereby improving the measurement accuracy to a certain extent. In addition, the distance measurement method proposed in the embodiment of the present invention and the above embodiment belongs to the same inventive concept, and the technical details not described in detail in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0078] Embodiment 3
[0079] Based on the above embodiments, this embodiment optimizes the distance measurement applied to shopping scenarios, can measure the required distance before shopping, and can automatically recommend products of appropriate size based on the measured actual distance, further improving the user experience. The distance measurement method proposed in this embodiment and the above embodiments belongs to the same inventive concept, and the technical details not described in detail in this embodiment can be referred to the above embodiments.
[0080] Figure 3 FIG. 4 shows a flow chart of a distance measurement method provided by Embodiment 3 of the present invention. Figure 3 , the distance measurement method provided in the embodiment of the present invention includes:
[0081] S310. In response to a measurement instruction, switch from the shopping interface to the measurement interface, and use the measurement interface as the current interface.
[0082] When users use traditional shopping apps to buy goods online, the shopping apps can render the shopping interface based on the product details data sent by the server, so that users can understand the product's size, color, structure and other parameters. Although the interface presents the product size, users cannot understand whether the product size matches the required distance, which can easily lead to the situation where the purchased product size is not suitable and needs to be returned or exchanged after receiving the goods. The return of goods not only increases the purchase cost such as shipping or damage compensation, but also prolongs the time to receive the required goods. In addition, when the product is limited / limited time sale, it may not be possible to exchange the required size, which greatly affects the shopping experience.
[0083] In this embodiment, when a user browses a shopping interface corresponding to a certain product while shopping using a shopping application, a measurement instruction can be triggered on the shopping interface. After receiving the measurement instruction, the current device can switch from the shopping interface to the measurement interface, and achieve the measurement of the required distance by rendering controls such as a device model diagram for measurement on the measurement interface.
[0084] For example, a user can click on the introduction cover of a certain product to enter the shopping interface of the product, and the shopping interface may include at least one product introduction picture, product title introduction, shipping address, product parameters, selection, and distance measurement function list items. When the user clicks the "select" list item, a shopping interface for product selection type, product size, and quantity may pop up. Before entering the shopping interface to select the size, the user may first click on the "distance measurement function" list item to trigger the measurement instruction, so that the current device switches from the shopping interface to the measurement interface.
[0085] S320: Obtain a device identification of the mobile terminal device, and upload the device identification to a server, so that the server queries the device size data and device model diagram corresponding to the device identification.
[0086] S330, receiving device size data and a device model diagram, rendering the device model diagram in the current interface, and establishing a mapping relationship between the rendered device model diagram and the device size data.
[0087] S340, receiving a starting position and an end position acting on the rendered device model diagram at least once, determining an actual distance between the starting position and the end position according to a mapping relationship, and determining a required distance according to at least one actual distance.
[0088] Before receiving the starting position and the ending position acting on the rendered device model diagram, the method further includes: determining first dimension data corresponding to the measurement dimension in the device dimension data in response to the received measurement dimension, and rendering a slider control corresponding to the measurement dimension in the rendered device model diagram in the current interface;
[0089] Accordingly, at least one starting point position and an end point position acting on the rendered device model diagram are received, the actual distance between the starting point position and the end point position is determined according to a mapping relationship, and the required distance is determined according to at least one actual distance, including: in response to the received first coefficient, calculating the product of the first coefficient and the first dimension data to obtain a first distance; in response to the sliding operation of a slider in a slider control, determining the sliding starting point and the sliding end point; according to the correspondence between the position of the slider and the position on the measurement dimension in the rendered device model diagram, and the mapping relationship, determining the actual distance between the sliding starting point and the sliding end point; and taking the sum of the first distance and the actual distance as the required distance.
[0090] S350: Obtain matching product sizes according to the required distance and the sizes of each product in the shopping interface.
[0091] In the embodiment of the present invention, the current device can obtain the size of each product from the shopping interface, or obtain the size of each product from the product details interface after pulling down the shopping interface, or obtain the size of the product from the purchase interface jumped from the shopping interface. The method of obtaining the size of each product is not specifically limited. Among them, the size of each product is set in advance on the shopping interface by the store to which the product belongs.
[0092] Among them, for different commodities, the current mobile terminal device selects the matching commodity size in different ways. For example, when selecting commodities such as shoes and clothes, the closest commodity size can be found from various commodity sizes that are greater than or equal to the required distance (such as actual foot length, actual shoulder width, etc.) as the commodity size that matches the required distance; when selecting commodities such as ornaments and furniture placed in a certain space, the closest commodity size can be found from various commodity sizes that are less than or equal to the required distance (such as actual space size) as the commodity size that matches the required distance, which is not exhaustive here. Furthermore, the current device can import the matching commodity size into the text box control that has been rendered in the interface for displaying the recommended commodity size, so as to recommend the most suitable size of commodity to the user and improve the user's shopping experience.
[0093] In addition, when the required distance is user physical data (such as foot length data), the current device can also store the correspondence between user-user physical data, so that when the user purchases the same product again, the appropriate product size can be directly matched from the various product sizes, further improving the user's shopping experience.
[0094] Figure 4 A schematic diagram of an interface in a distance measurement method provided in Embodiment 3 of the present invention is shown.
[0095] Before using a shopping application to buy shoes, the user can trigger a foot length measurement instruction on the shopping interface. The current mobile terminal device can switch from the shopping interface to the foot length measurement interface and use the foot length measurement interface as the current interface, such as Figure 4 shown. Figure 4 In the example, the current mobile terminal device can call the underlying system native program (native program) to obtain the device identification of the current mobile terminal device, and then automatically select the corresponding item in the drop-down box control 401 for display according to the obtained device identification, so as to automatically realize the device identification acquisition.
[0096] After receiving the device size data and device model diagram corresponding to the device identifier fed back by the server, the current mobile terminal device can render the device model diagram 402 in the current interface and establish a mapping relationship between the rendered device model diagram 402 and the device size data. In addition, the current mobile terminal device can also determine the first size data corresponding to the measurement dimension in the device size data in response to the received measurement dimension (mobile phone length), and render the slider control 403 corresponding to the measurement dimension in the rendered device model diagram in the current interface.
[0097] The current mobile terminal device responds to the first coefficient input by the user in the drop-down box control 404, calculates the product of the first coefficient and the first dimension data, and obtains the first distance; responds to the sliding operation of the slider in the slider control, determines the sliding starting point and the sliding end point; determines the actual distance between the sliding starting point and the sliding end point according to the correspondence between the position of the slider and the position on the measurement dimension in the rendered device model diagram, as well as the mapping relationship, and imports the actual distance into the text box control 405 for display; takes the sum of the first distance and the actual distance as the required distance, and can import the required distance into the text box control 406 for display, so as to realize the measurement of the user's foot length.
[0098] In the embodiment of the present invention, based on the above embodiment, when a user purchases goods through a shopping application, when a measurement instruction is triggered, the shopping interface can be switched to the measurement interface, and a device model diagram of a mobile terminal device used for distance measurement can be rendered on the measurement interface, and the start / end position corresponding to the start / end position actually measured can be input on the rendered device model diagram. Based on the mapping relationship between the device model diagram and the device size data, the distance between the start / end positions actually measured can be obtained, and the required distance can be measured before shopping, and goods of appropriate size can be automatically recommended according to the actual distance measured, further improving the user experience. In addition, the distance measurement method proposed in the embodiment of the present invention and the above embodiment belongs to the same inventive concept, and the technical details not described in detail in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0099] Embodiment 4
[0100] Figure 5 The schematic diagram of the structure of a distance measurement device provided by the fourth embodiment of the present invention is shown. The embodiment of the present invention can be applied to the situation of measuring distance, for example, the situation of measuring the required distance before purchasing goods using a shopping application. The distance measurement method provided by the above embodiment can be implemented by the distance measurement device provided by the present invention.
[0101] like Figure 5 As shown, the distance measuring device in the embodiment of the present invention includes:
[0102] The identification uploading module 510 is used to obtain the device identification of the mobile terminal device and upload the device identification to the server so that the server can query the device size data and device model diagram corresponding to the device identification;
[0103] The interface rendering module 520 is used to receive the device size data and the device model diagram, render the device model diagram in the current interface, and establish a mapping relationship between the rendered device model diagram and the device size data;
[0104] The distance determination module 530 is used to receive the starting position and the ending position acting on the rendered device model diagram at least once, determine the actual distance between the starting position and the ending position according to the mapping relationship, and determine the required distance according to at least one actual distance.
[0105] Optionally, the interface rendering module is also used to:
[0106] Before receiving the starting position and the ending position acting on the rendered device model diagram, in response to the received measurement dimension, determining first dimension data corresponding to the measurement dimension in the device dimension data, and rendering a slider control corresponding to the measurement dimension in the rendered device model diagram in the current interface;
[0107] Accordingly, the distance determination module is also used for:
[0108] In response to the received first coefficient, the product of the first coefficient and the first dimension data is calculated to obtain a first distance; in response to the sliding operation of the slider in the slider control, the sliding start point and the sliding end point are determined; based on the correspondence between the position of the slider and the position on the measurement dimension in the rendered device model diagram, as well as the mapping relationship, the actual distance between the sliding start point and the sliding end point is determined; and the sum of the first distance and the actual distance is used as the required distance.
[0109] Furthermore, the interface rendering module is specifically used for:
[0110] Determine the side length parameters and position parameters corresponding to the measurement dimensions in the image display control imported by the rendered device model diagram; translate the position parameters by a preset value in a direction perpendicular to the measurement dimensions and away from the rendered device model diagram to obtain target position parameters; use the side length parameters and the target position parameters as layout parameters of a slider control, and render the slider control in the current interface according to the layout parameters of the slider control.
[0111] Optional, identifies the upload module, specifically used for:
[0112] In response to the selection operation of an item in the drop-down box control in the current interface, the selected item is used as the device identification of the mobile terminal device; or, the device identification of the current mobile terminal device is obtained by calling the system native program of the current mobile terminal device.
[0113] Optional interface rendering module, specifically used for:
[0114] Get the screen size of the current device, determine the scaling ratio of the device model image according to the screen size and the image size of the device model image; determine the layout parameters of the image display control according to the image size and the scaling ratio; render the image display control in the current interface according to the layout parameters of the image display control, and import the device model image scaled according to the scaling ratio into the image display control for display.
[0115] Optionally, the distance measuring device further comprises:
[0116] A storage module, used for storing the device size data and the device model diagram after receiving the device size data and the device model diagram, and establishing a corresponding relationship between the device identification and the device size data and the device model diagram;
[0117] Correspondingly, the identification upload module is also used for:
[0118] After obtaining the new device identification, determine whether there is device size data and device model diagram corresponding to the new device identification in the corresponding relationship; if so, read the device size data and device model diagram corresponding to the new device identification; render the read device model diagram in the current interface, and establish a mapping relationship between the rendered device model diagram and the read device size data; if not, upload the new device identification to the server.
[0119] Optionally, the distance measurement device can be integrated into shopping applications;
[0120] Correspondingly, the distance measuring device further includes:
[0121] An interface switching module, used for switching from a shopping interface to a measurement interface in response to a measurement instruction before obtaining a device identification of a mobile terminal device, and using the measurement interface as a current interface;
[0122] Correspondingly, the distance measuring device further includes:
[0123] The commodity matching module is used to obtain the matching commodity size according to the required distance and the sizes of each commodity in the shopping interface after determining the required distance according to at least one actual distance.
[0124] The distance measurement device provided in the embodiment of the present invention belongs to the same inventive concept as the distance measurement method provided in the above embodiment. The technical details not fully described in the embodiment of the present invention can be referred to the above embodiment, and the embodiment of the present invention has the same beneficial effects as the above embodiment.
[0125] Embodiment 5
[0126] Figure 6 The hardware structure diagram of a terminal device provided by Embodiment 5 of the present invention is shown. The terminal device in the embodiment of the present invention may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0127] like Figure 6 As shown, the terminal device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 to a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the terminal device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0128] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the terminal device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The terminal device 600 is shown to have various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0129] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present invention are executed.
[0130] The terminal provided in the embodiment of the present invention and the distance measurement method provided in the above embodiment belong to the same inventive concept. The technical details not fully described in the embodiment of the present invention can be referred to the above embodiment, and the embodiment of the present invention has the same beneficial effects as the above embodiment.
[0131] Embodiment 6
[0132] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the distance measurement method provided in the above embodiment is implemented.
[0133] It should be noted that the computer-readable storage medium in the embodiment of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM) or a flash memory (FLASH), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In an embodiment of the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In an embodiment of the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0134] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0135] The computer-readable storage medium may be included in the terminal device, or may exist independently without being installed in the terminal device.
[0136] The terminal device stores and carries one or more programs. When the one or more programs are executed by the terminal device, the terminal device:
[0137] Obtain a device identification of a mobile terminal device, and upload the device identification to a server so that the server can query the device size data and device model diagram corresponding to the device identification; receive the device size data and the device model diagram, render the device model diagram in the current interface, and establish a mapping relationship between the rendered device model diagram and the device size data; receive a starting position and an end position acting on the rendered device model diagram at least once, determine the actual distance between the starting position and the end position according to the mapping relationship, and determine the required distance according to at least one actual distance.
[0138] Alternatively, the computer-readable medium carries one or more programs, and when the one or more programs are executed by the terminal device, the terminal device:
[0139] Obtain a device identification of a mobile terminal device, and upload the device identification to a server so that the server can query the device size data and device model diagram corresponding to the device identification; receive the device size data and the device model diagram, render the device model diagram in the current interface, and establish a mapping relationship between the rendered device model diagram and the device size data; receive a starting position and an end position acting on the rendered device model diagram at least once, determine the actual distance between the starting position and the end position according to the mapping relationship, and determine the required distance according to at least one actual distance.
[0140] Computer program code for performing the operations of the present invention may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0141] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0142] The units involved in the embodiments of the present invention may be implemented by software or hardware, wherein the name of a unit does not limit the unit itself in some cases.
[0143] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0144] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A distance measurement method, characterized in that: include: Obtaining a device identification of a mobile terminal device, and uploading the device identification to a server, so that the server can query device size data and a device model diagram corresponding to the device identification; Receiving the device size data and the device model diagram, rendering the device model diagram in the current interface, and establishing a mapping relationship between the rendered device model diagram and the device size data; Receiving a starting position and an end position acting on the rendered device model diagram at least once, determining an actual distance between the starting position and the end position according to the mapping relationship, and determining a required distance according to at least one actual distance; Before receiving the starting position and the ending position acting on the rendered device model diagram, the method further includes: determining first dimension data of a measurement side corresponding to the measurement dimension in the device dimension data in response to the received measurement dimension; Accordingly, receiving at least one starting position and an end position acting on the rendered device model diagram, determining an actual distance between the starting position and the end position according to the mapping relationship, and determining a required distance according to at least one actual distance, includes: In response to the received first coefficient, the product of the first coefficient and the first size data is calculated to obtain a first distance; wherein the first coefficient represents a natural number multiple of the first size data of the measuring side; Receiving a starting point position and an end point position acting on the rendered device model diagram, and determining an actual distance between the starting point position and the end point position according to the mapping relationship; The sum of the first distance and the actual distance is taken as the required distance.
2. The method according to claim 1, characterized in that: Before receiving the starting position and the ending position acting on the rendered device model diagram, the method further includes: In response to the received measurement dimension, rendering a slider control corresponding to the measurement dimension in the rendered device model diagram in the current interface; Accordingly, the receiving of the starting position and the ending position acting on the rendered device model diagram at least once, determining the actual distance between the starting position and the ending position according to the mapping relationship, and determining the required distance according to at least one actual distance includes: In response to a sliding operation of a slider in the slider control, determining a sliding start point and a sliding end point; According to the corresponding relationship between the position of the slider and the position on the measurement dimension in the rendered device model diagram, and the mapping relationship, the actual distance between the sliding start point and the sliding end point is determined.
3. The method according to claim 2, characterized in that The rendering of the slider control corresponding to the measurement dimension in the rendered device model diagram in the current interface includes: Determine the side length parameters and position parameters corresponding to the measurement dimensions in the image display control imported into the rendered device model image; The position parameter is translated by a preset value in a direction perpendicular to the measurement dimension and away from the rendered device model image to obtain a target position parameter; The side length parameter and the target position parameter are used as layout parameters of a slider control, and the slider control is rendered in the current interface according to the layout parameters of the slider control.
4. The method according to claim 1, characterized in that: The obtaining of the device identification of the mobile terminal device includes: In response to a selection operation of an item in a drop-down box control in the current interface, the selected item is used as a device identification of the mobile terminal device; or, The device identification of the current mobile terminal device is obtained by calling the system native program of the current mobile terminal device.
5. The method according to claim 1, characterized in that The rendering of the device model diagram in the current interface includes: Obtaining the screen size of the current device, and determining the scaling ratio of the device model image according to the screen size and the image size of the device model image; Determining layout parameters of the picture display control according to the picture size and the scaling ratio; The image display control is rendered in the current interface according to the layout parameters of the image display control, and the device model image scaled according to the scaling ratio is imported into the image display control for display.
6. The method according to claim 1, characterized in that After receiving the device size data and the device model diagram, the method further includes: The device size data and the device model diagram are stored, and a corresponding relationship between the device identifier and the device size data and the device model diagram is established; Accordingly, after obtaining the new device identifier, it also includes: Determine whether there is device size data and device model diagram corresponding to a new device identifier in the corresponding relationship; If yes, then read the device size data and device model diagram corresponding to the new device identifier; render the read device model diagram in the current interface, and establish a mapping relationship between the rendered device model diagram and the read device size data; If not, the new device ID is uploaded to the server.
7. The method according to any one of claims 1 to 6, characterized in that Applicable to shopping apps; Accordingly, before obtaining the device identification of the mobile terminal device, the method further includes: In response to the measurement instruction, the shopping interface is switched to the measurement interface, and the measurement interface is used as the current interface; Accordingly, after determining the required distance according to at least one actual distance, the method further includes: According to the required distance and the sizes of the commodities in the shopping interface, the matching commodity sizes are obtained.
8. A distance measuring device, characterized in that: include: An identification uploading module, used for acquiring a device identification of a mobile terminal device, and uploading the device identification to a server, so that the server can query device size data and a device model diagram corresponding to the device identification; An interface rendering module, used for receiving the device size data and the device model diagram, rendering the device model diagram in the current interface, and establishing a mapping relationship between the rendered device model diagram and the device size data; a distance determination module, configured to receive a starting position and an end position acting on the rendered device model diagram at least once, determine an actual distance between the starting position and the end position according to the mapping relationship, and determine a required distance according to at least one actual distance; The interface rendering module is further used to: determine first dimension data of a measurement side corresponding to the measurement dimension in the device dimension data in response to the received measurement dimension before receiving the starting position and the end position acting on the rendered device model diagram; The distance determination module is also used to: in response to a received first coefficient, calculate the product of the first coefficient and the first dimension data to obtain a first distance; wherein the first coefficient represents a natural number multiple of the first dimension data of the measuring edge; receive a starting point position and an end point position acting on a rendered device model diagram, and determine an actual distance between the starting point position and the end point position according to the mapping relationship; and use the sum of the first distance and the actual distance as the required distance.
9. A terminal device, characterized in that: The terminal comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the distance measurement method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the distance measurement method as described in any one of claims 1 to 7 is implemented.
