Motion trajectory generation method, device, equipment and storage medium
By monitoring the running status of the target application software and performing self-start or restart processing, the problem of inability to obtain user latitude and longitude coordinates in the prior art is solved, and the accurate generation of motion trajectory is achieved.
Patent Information
- Application Number
- CN202210367554.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-08
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2042-04-08
AI Technical Summary
The prior art cannot locate the user's latitude and longitude coordinates in time after the application is temporarily closed by the background or the user's unintentional operation, resulting in the inability to accurately draw the user's motion trajectory.
By monitoring the running status of the target application software, counting the duration of its shutdown status. If the preset time exceeds the preset time, call the self-start algorithm to perform the self-start processing, and obtain the user's longitude and latitude coordinates in real time through the positioning algorithm. If the moving distance exceeds the preset distance, the restart algorithm is called to perform the restart processing and generate the user's motion trajectory.
Ensure that the target application software is in the startup state, obtains the user's longitude and latitude coordinates in real time, and improves the accuracy of the motion trajectory.
Smart Images

Figure CN114741259B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a motion trajectory generation method, device, equipment and storage medium. Background Art
[0002] At present, the user's longitude and latitude coordinates are mainly obtained by starting the positioning function of the application, and then the user's movement trajectory is drawn according to the longitude and latitude coordinates. However, the inventors have realized that after the application is temporarily closed by the background execution or the user accidentally closes it, the user's longitude and latitude coordinates cannot be located in time, resulting in the inability to accurately draw the user's movement trajectory. Summary of the invention
[0003] In view of the above, it is necessary to provide a motion trajectory generation method, device, equipment and storage medium that can accurately generate a motion trajectory.
[0004] In one aspect, the present invention provides a motion trajectory generation method, which is applied to an electronic device. The motion trajectory generation method includes:
[0005] receiving a trajectory generation request, and identifying a target application software according to the trajectory generation request;
[0006] Monitoring the running status of the target application software;
[0007] If the running state is the closed state, then counting the duration of the running state being the closed state;
[0008] If the duration of the state is greater than or equal to the preset duration, the self-starting algorithm is called to perform self-starting processing on the target application software, and the positioning algorithm of the target application software is called to obtain the longitude and latitude coordinates of the user in real time;
[0009] Calculate the moving distance of the user according to the plurality of longitude and latitude coordinates;
[0010] If the moving distance is greater than or equal to the preset distance, a restart algorithm is called to execute restart processing on the target application software, and a movement trajectory of the user is generated according to the multiple longitude and latitude coordinates.
[0011] According to a preferred embodiment of the present invention, the step of generating a request to identify a target application software according to the trajectory comprises:
[0012] Acquire all application software in the electronic device;
[0013] Selecting the application software including the positioning algorithm from all the application software as the initial application software;
[0014] Obtaining an operation log of the electronic device and obtaining a time of receiving the trajectory generation request;
[0015] Obtaining the download time of the initial application software based on the operation log, and counting the historical startup time of the initial application software;
[0016] Calculating the activation ratio of the initial application software based on the receiving time, the downloading time and the historical activation duration;
[0017] The initial application software with the largest activation ratio is determined as the target application software.
[0018] According to a preferred embodiment of the present invention, the calculation formula of the startup ratio is:
[0019]
[0020] Wherein, y refers to the startup ratio, x refers to the historical startup duration, t2 refers to the receiving time, and t1 refers to the downloading time.
[0021] According to a preferred embodiment of the present invention, monitoring the running status of the target application software includes:
[0022] Extracting log information corresponding to the receiving time from the operation log;
[0023] Acquire switch information corresponding to a software switch in the target application software from the log information;
[0024] If the switch information is start, the running state is determined as the start state; or
[0025] If the switch information is closed, or the log information does not include the switch information, the running state is determined to be a closed state.
[0026] According to a preferred embodiment of the present invention, calculating the moving distance of the user according to the plurality of longitude and latitude coordinates comprises:
[0027] For any two longitude and latitude coordinates, the any two longitude and latitude coordinates include a first longitude and latitude coordinate and a second longitude and latitude coordinate, the first longitude and latitude coordinate includes a first longitude and a first latitude, and the second longitude and latitude coordinate includes a second longitude and a second latitude;
[0028] The moving distance is calculated according to the first longitude, the first latitude, the second longitude and the second latitude. The calculation formula of the moving distance is:
[0029] s=sin h1×sin h2×cos(f1-f2)+cos h1×cos h2;
[0030] Wherein, s refers to the moving distance, h1 refers to the first latitude, h2 refers to the second latitude, f1 refers to the first longitude, and f2 refers to the second longitude.
[0031] According to a preferred embodiment of the present invention, the calling of the restart algorithm to perform restart processing on the target application software includes:
[0032] Obtaining a software identifier of the target application software;
[0033] Writing the software identifier into a position corresponding to the startup object field in the restart algorithm to obtain a restart statement;
[0034] The restart statement is executed to perform restart processing on the target application software.
[0035] According to a preferred embodiment of the present invention, generating the movement trajectory of the user according to the multiple longitude and latitude coordinates includes:
[0036] Acquire a mapping relationship between the plurality of longitude and latitude coordinates and a display screen in the electronic device;
[0037] Convert the multiple longitude and latitude coordinates based on the mapping relationship to obtain multiple screen coordinates;
[0038] The multiple screen coordinates are plotted to obtain the movement trajectory of the user.
[0039] On the other hand, the present invention further provides a motion trajectory generating device, which runs on an electronic device, and the motion trajectory generating device includes:
[0040] an identification unit, configured to receive a trajectory generation request and identify a target application software according to the trajectory generation request;
[0041] A monitoring unit, used for monitoring the running status of the target application software;
[0042] a counting unit, for counting the duration of the running state being the closed state if the running state is the closed state;
[0043] A calling unit, configured to call a self-starting algorithm to perform a self-starting process on the target application software if the duration of the state is greater than or equal to a preset duration, and call a positioning algorithm of the target application software to obtain the longitude and latitude coordinates of the user in real time;
[0044] The statistical unit is further used to calculate the moving distance of the user according to the plurality of longitude and latitude coordinates;
[0045] A generating unit is used to call a restart algorithm to execute restart processing on the target application software if the moving distance is greater than or equal to a preset distance, and to generate a movement trajectory of the user according to the multiple longitude and latitude coordinates.
[0046] On the other hand, the present invention further provides an electronic device, comprising:
[0047] a memory storing computer readable instructions; and
[0048] A processor executes the computer-readable instructions stored in the memory to implement the motion trajectory generating method.
[0049] On the other hand, the present invention further proposes a computer-readable storage medium, in which computer-readable instructions are stored. The computer-readable instructions are executed by a processor in an electronic device to implement the motion trajectory generating method.
[0050] It can be seen from the above technical solutions that the present invention monitors the running state of the target application software, and when the running state is in the closed state, by comparing the state duration with the preset duration, the self-starting processing of the target application software is performed using the self-starting algorithm, which can prevent the target application software from being in the closed state for a preset duration, and then accurately quantify the user's moving distance through the multiple longitude and latitude coordinates, and then restart the target application software when the moving distance exceeds the preset distance, which can further ensure that the target application software is in the started state, so that the longitude and latitude coordinates can be obtained in real time, thereby improving the accuracy of the motion trajectory. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 It is a flow chart of a preferred embodiment of the motion trajectory generating method of the present invention.
[0052] Figure 2 It is a functional module diagram of a preferred embodiment of the motion trajectory generating device of the present invention.
[0053] Figure 3 It is a structural schematic diagram of an electronic device of a preferred embodiment of the motion trajectory generation method of the present invention. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0055] like Figure 1 FIG. 1 is a flow chart of a preferred embodiment of the motion trajectory generation method of the present invention. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted.
[0056] The motion trajectory generation method can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0057] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0058] The motion trajectory generation method is applied to one or more electronic devices, which are devices that can automatically perform numerical calculations and / or information processing according to pre-set or stored computer-readable instructions, and whose hardware includes but is not limited to microprocessors, application specific integrated circuits (ASICs), programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0059] The electronic device may be any electronic product that can perform human-computer interaction with a user, such as a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an interactive network television (IPTV), a smart wearable device, etc.
[0060] The electronic device may include a network device and / or a user device. The network device includes, but is not limited to, a single network electronic device, an electronic device group consisting of multiple network electronic devices, or a cloud consisting of a large number of hosts or network electronic devices based on cloud computing.
[0061] The network where the electronic device is located includes, but is not limited to: the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), etc.
[0062] S10, receiving a trajectory generation request, and identifying a target application software according to the trajectory generation request.
[0063] In at least one embodiment of the present invention, the trajectory generation request may be triggered by a user carrying the electronic device.
[0064] The target application software refers to an application software having a positioning function and having the largest activation rate in the electronic device. For example, the target application software may be a sports software A.
[0065] In at least one embodiment of the present invention, the electronic device identifying the target application software according to the trajectory generation request includes:
[0066] Acquire all application software in the electronic device;
[0067] Selecting the application software including the positioning algorithm from all the application software as the initial application software;
[0068] Obtaining an operation log of the electronic device and obtaining a time of receiving the trajectory generation request;
[0069] Obtaining the download time of the initial application software based on the operation log, and counting the historical startup time of the initial application software;
[0070] Calculating the activation ratio of the initial application software based on the receiving time, the downloading time and the historical activation duration;
[0071] The initial application software with the largest activation ratio is determined as the target application software.
[0072] The operation log includes the operation information of all the application software, for example, the operation log includes the operation time point of the initial application software.
[0073] The receiving time refers to the time point at which the trajectory generation request is received.
[0074] The initial application software can be quickly screened out through the positioning algorithm, and the target application software can be accurately screened out through the analysis of the startup ratio, thereby avoiding unnecessary occupation of background threads.
[0075] Specifically, the calculation formula of the startup ratio is:
[0076]
[0077] Wherein, y refers to the startup ratio, x refers to the historical startup duration, t2 refers to the receiving time, and t1 refers to the downloading time.
[0078] Through the above implementation, the activation ratio can be accurately determined.
[0079] S11, monitoring the running status of the target application software.
[0080] In at least one embodiment of the present invention, the operating state includes a closed state and a started state.
[0081] In at least one embodiment of the present invention, the electronic device monitoring the running state of the target application software includes:
[0082] Extracting log information corresponding to the receiving time from the operation log;
[0083] Acquire switch information corresponding to a software switch in the target application software from the log information;
[0084] If the switch information is start, the running state is determined as the start state; or
[0085] If the switch information is closed, or the log information does not include the switch information, the running state is determined to be a closed state.
[0086] The software switch is used to indicate the startup status of the target application software.
[0087] By screening the log information corresponding to the receiving time, analysis of information at other times is avoided, thereby improving the accuracy of the operating status.
[0088] S12: If the running state is the closed state, counting the time duration of the running state being the closed state.
[0089] In at least one embodiment of the present invention, the state duration refers to the accumulated duration that the running state is the closed state.
[0090] S13, if the state duration is greater than or equal to the preset duration, calling the self-start algorithm to perform self-start processing on the target application software, and calling the positioning algorithm of the target application software to obtain the longitude and latitude coordinates of the user in real time.
[0091] In at least one embodiment of the present invention, the preset duration can be set according to actual needs.
[0092] The self-start algorithm refers to an algorithm that can change the application software from a closed state to a started state.
[0093] The user refers to a user carrying the electronic device, that is, the user refers to a user who triggers the trajectory generation request.
[0094] The longitude and latitude coordinates refer to the specific location of the user or the electronic device.
[0095] In at least one embodiment of the present invention, the manner in which the electronic device calls a self-start algorithm to perform self-start processing on the target application software is similar to the manner in which the electronic device calls a restart algorithm to perform restart processing on the target application software. The specific manner is described below and will not be repeated in the present invention.
[0096] In at least one embodiment of the present invention, the electronic device runs the positioning algorithm to obtain the longitude and latitude coordinates.
[0097] Through the above implementation, the longitude and latitude coordinates can be directly acquired.
[0098] S14, calculating the moving distance of the user according to the plurality of longitude and latitude coordinates.
[0099] In at least one embodiment of the present invention, the moving distance refers to the distance generated by the specific movement of the user.
[0100] In at least one embodiment of the present invention, the electronic device calculating the moving distance of the user according to the plurality of longitude and latitude coordinates comprises:
[0101] For any two longitude and latitude coordinates, the any two longitude and latitude coordinates include a first longitude and latitude coordinate and a second longitude and latitude coordinate, the first longitude and latitude coordinate includes a first longitude and a first latitude, and the second longitude and latitude coordinate includes a second longitude and a second latitude;
[0102] The moving distance is calculated according to the first longitude, the first latitude, the second longitude and the second latitude. The calculation formula of the moving distance is:
[0103] s=sin h1×sin h2×cos(f1-f2)+cos h1×cos h2;
[0104] Wherein, s refers to the moving distance, h1 refers to the first latitude, h2 refers to the second latitude, f1 refers to the first longitude, and f2 refers to the second longitude.
[0105] Through the above implementation, the distance between the first longitude and latitude coordinates and the second longitude and latitude coordinates can be quantitatively analyzed, thereby improving the readability of the moving distance.
[0106] S15, if the moving distance is greater than or equal to the preset distance, calling a restart algorithm to execute a restart process on the target application software, and generating a movement trajectory of the user according to the multiple longitude and latitude coordinates.
[0107] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned movement trajectory, the above-mentioned movement trajectory can also be stored in a node of a blockchain.
[0108] In at least one embodiment of the present invention, the preset distance can be set according to actual needs. It is understandable that the unit of the preset distance is the same as the unit of the moving distance. For example, if the unit of the moving distance is radian, the unit of the preset distance is also radian; if the unit of the moving distance is meter, the unit of the preset distance is also meter.
[0109] The motion trajectory refers to the actual movement trajectory of the user.
[0110] In at least one embodiment of the present invention, the electronic device calling the restart algorithm to perform restart processing on the target application software includes:
[0111] Obtaining a software identifier of the target application software;
[0112] Writing the software identifier into a position corresponding to the startup object field in the restart algorithm to obtain a restart statement;
[0113] The restart statement is executed to perform restart processing on the target application software.
[0114] The software identifier is used to indicate the target application software.
[0115] By using the software identifier and the position corresponding to the startup object field in the restart algorithm, the restart statement can be accurately generated, thereby accurately completing the restart process of the target application software and ensuring that the target application software is continuously in the startup state.
[0116] In at least one embodiment of the present invention, the electronic device generating the movement trajectory of the user according to the multiple longitude and latitude coordinates includes:
[0117] Acquire a mapping relationship between the plurality of longitude and latitude coordinates and a display screen in the electronic device;
[0118] Convert the multiple longitude and latitude coordinates based on the mapping relationship to obtain multiple screen coordinates;
[0119] The multiple screen coordinates are plotted to obtain the movement trajectory of the user.
[0120] The mapping relationship may be obtained from a conversion coordinate table pre-stored in the electronic device.
[0121] The screen coordinates can be accurately generated through the mapping relationship, thereby improving the accuracy of the motion trajectory.
[0122] It can be seen from the above technical solutions that the present invention monitors the running state of the target application software, and when the running state is in the closed state, by comparing the state duration with the preset duration, the self-starting processing of the target application software is performed using the self-starting algorithm, which can prevent the target application software from being in the closed state for a preset duration, and then accurately quantify the user's moving distance through the multiple longitude and latitude coordinates, and then restart the target application software when the moving distance exceeds the preset distance, which can further ensure that the target application software is in the started state, so that the longitude and latitude coordinates can be obtained in real time, thereby improving the accuracy of the motion trajectory.
[0123] like Figure 2 , which is a functional module diagram of a preferred embodiment of the motion trajectory generating device of the present invention. The motion trajectory generating device 11 includes an identification unit 110, a monitoring unit 111, a statistical unit 112, a calling unit 113 and a generating unit 114. The module / unit referred to in the present invention refers to a series of computer-readable instruction segments that can be acquired by the processor 13 and can complete fixed functions, which are stored in the memory 12. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments. The motion trajectory generating device 11 runs in an electronic device.
[0124] The identification unit 110 receives a trajectory generation request and identifies a target application software according to the trajectory generation request.
[0125] In at least one embodiment of the present invention, the trajectory generation request may be triggered by a user carrying the electronic device.
[0126] The target application software refers to an application software having a positioning function and having the largest activation rate in the electronic device. For example, the target application software may be a sports software A.
[0127] In at least one embodiment of the present invention, the identifying unit 110 identifies the target application software according to the trajectory generation request, including:
[0128] Acquire all application software in the electronic device;
[0129] Selecting the application software including the positioning algorithm from all the application software as the initial application software;
[0130] Obtaining an operation log of the electronic device and obtaining a time of receiving the trajectory generation request;
[0131] Obtaining the download time of the initial application software based on the operation log, and counting the historical startup time of the initial application software;
[0132] Calculating the activation ratio of the initial application software based on the receiving time, the downloading time and the historical activation duration;
[0133] The initial application software with the largest activation ratio is determined as the target application software.
[0134] The operation log includes the operation information of all the application software, for example, the operation log includes the operation time point of the initial application software.
[0135] The receiving time refers to the time point at which the trajectory generation request is received.
[0136] The initial application software can be quickly screened out through the positioning algorithm, and the target application software can be accurately screened out through the analysis of the startup ratio, thereby avoiding unnecessary occupation of background threads.
[0137] Specifically, the calculation formula of the startup ratio is:
[0138]
[0139] Wherein, y refers to the startup ratio, x refers to the historical startup duration, t2 refers to the receiving time, and t1 refers to the downloading time.
[0140] Through the above implementation, the activation ratio can be accurately determined.
[0141] The monitoring unit 111 monitors the running status of the target application software.
[0142] In at least one embodiment of the present invention, the operating state includes a closed state and a started state.
[0143] In at least one embodiment of the present invention, the monitoring unit 111 monitors the running state of the target application software including:
[0144] Extracting log information corresponding to the receiving time from the operation log;
[0145] Acquire switch information corresponding to a software switch in the target application software from the log information;
[0146] If the switch information is start, the running state is determined as the start state; or
[0147] If the switch information is closed, or the log information does not include the switch information, the running state is determined to be a closed state.
[0148] The software switch is used to indicate the startup status of the target application software.
[0149] By screening the log information corresponding to the receiving time, analysis of information at other times is avoided, thereby improving the accuracy of the operating status.
[0150] If the running state is the closed state, the counting unit 112 counts the state duration of the running state being the closed state.
[0151] In at least one embodiment of the present invention, the state duration refers to the accumulated duration that the running state is the closed state.
[0152] If the state duration is greater than or equal to the preset duration, the calling unit 113 calls the self-starting algorithm to perform self-starting processing on the target application software, and calls the positioning algorithm of the target application software to obtain the longitude and latitude coordinates of the user in real time.
[0153] In at least one embodiment of the present invention, the preset duration can be set according to actual needs.
[0154] The self-start algorithm refers to an algorithm that can change the application software from a closed state to a started state.
[0155] The user refers to a user carrying the electronic device, that is, the user refers to a user who triggers the trajectory generation request.
[0156] The longitude and latitude coordinates refer to the specific location of the user or the electronic device.
[0157] In at least one embodiment of the present invention, the way in which the calling unit 113 calls the self-start algorithm to perform self-start processing on the target application software is similar to the way in which the generating unit 114 calls the restart algorithm to perform restart processing on the target application software. The specific method is described below and will not be repeated in the present invention.
[0158] In at least one embodiment of the present invention, the calling unit 113 runs the positioning algorithm to obtain the longitude and latitude coordinates.
[0159] Through the above implementation, the longitude and latitude coordinates can be directly acquired.
[0160] The statistical unit 112 calculates the moving distance of the user according to the plurality of longitude and latitude coordinates.
[0161] In at least one embodiment of the present invention, the moving distance refers to the distance generated by the specific movement of the user.
[0162] In at least one embodiment of the present invention, the statistical unit 112 calculates the moving distance of the user according to the plurality of longitude and latitude coordinates, including:
[0163] For any two longitude and latitude coordinates, the any two longitude and latitude coordinates include a first longitude and latitude coordinate and a second longitude and latitude coordinate, the first longitude and latitude coordinate includes a first longitude and a first latitude, and the second longitude and latitude coordinate includes a second longitude and a second latitude;
[0164] The moving distance is calculated according to the first longitude, the first latitude, the second longitude and the second latitude. The calculation formula of the moving distance is:
[0165] s=sin h1×sin h2×cos(f1-f2)+cos h1×cos h2;
[0166] Wherein, s refers to the moving distance, h1 refers to the first latitude, h2 refers to the second latitude, f1 refers to the first longitude, and f2 refers to the second longitude.
[0167] Through the above implementation, the distance between the first longitude and latitude coordinates and the second longitude and latitude coordinates can be quantitatively analyzed, thereby improving the readability of the moving distance.
[0168] If the moving distance is greater than or equal to the preset distance, the generating unit 114 calls a restart algorithm to perform a restart process on the target application software, and generates a movement trajectory of the user according to the multiple longitude and latitude coordinates.
[0169] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned movement trajectory, the above-mentioned movement trajectory can also be stored in a node of a blockchain.
[0170] In at least one embodiment of the present invention, the preset distance can be set according to actual needs. It is understandable that the unit of the preset distance is the same as the unit of the moving distance. For example, if the unit of the moving distance is radian, the unit of the preset distance is also radian; if the unit of the moving distance is meter, the unit of the preset distance is also meter.
[0171] The motion trajectory refers to the actual movement trajectory of the user.
[0172] In at least one embodiment of the present invention, the generating unit 114 calls the restart algorithm to perform restart processing on the target application software, including:
[0173] Obtaining a software identifier of the target application software;
[0174] Writing the software identifier into a position corresponding to the startup object field in the restart algorithm to obtain a restart statement;
[0175] The restart statement is executed to perform restart processing on the target application software.
[0176] The software identifier is used to indicate the target application software.
[0177] By using the software identifier and the position corresponding to the startup object field in the restart algorithm, the restart statement can be accurately generated, thereby accurately completing the restart process of the target application software and ensuring that the target application software is continuously in the startup state.
[0178] In at least one embodiment of the present invention, the generating unit 114 generates the movement trajectory of the user according to the multiple longitude and latitude coordinates, including:
[0179] Acquire a mapping relationship between the plurality of longitude and latitude coordinates and a display screen in the electronic device;
[0180] Convert the multiple longitude and latitude coordinates based on the mapping relationship to obtain multiple screen coordinates;
[0181] The multiple screen coordinates are plotted to obtain the movement trajectory of the user.
[0182] The mapping relationship may be obtained from a conversion coordinate table pre-stored in the electronic device.
[0183] The screen coordinates can be accurately generated through the mapping relationship, thereby improving the accuracy of the motion trajectory.
[0184] It can be seen from the above technical solutions that the present invention monitors the running state of the target application software, and when the running state is in the closed state, by comparing the state duration with the preset duration, the self-starting processing of the target application software is performed using the self-starting algorithm, which can prevent the target application software from being in the closed state for a preset duration, and then accurately quantify the user's moving distance through the multiple longitude and latitude coordinates, and then restart the target application software when the moving distance exceeds the preset distance, which can further ensure that the target application software is in the started state, so that the longitude and latitude coordinates can be obtained in real time, thereby improving the accuracy of the motion trajectory.
[0185] like Figure 3 FIG. 1 is a schematic diagram of the structure of an electronic device of a preferred embodiment of the motion trajectory generation method of the present invention.
[0186] In one embodiment of the present invention, the electronic device 1 includes, but is not limited to, a memory 12, a processor 13, and computer-readable instructions stored in the memory 12 and executable on the processor 13, such as a motion trajectory generation program.
[0187] Those skilled in the art will understand that the schematic diagram is merely an example of the electronic device 1 and does not constitute a limitation on the electronic device 1. The electronic device 1 may include more or fewer components than shown in the diagram, or a combination of certain components, or different components. For example, the electronic device 1 may also include input and output devices, network access devices, buses, etc.
[0188] The processor 13 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor 13 is the computing core and control center of the electronic device 1, and uses various interfaces and lines to connect various parts of the entire electronic device 1, and executes the operating system of the electronic device 1 and various installed applications, program codes, etc.
[0189] Exemplarily, the computer-readable instructions may be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 13 to complete the present invention. The one or more modules / units may be a series of computer-readable instruction segments capable of completing specific functions, which are used to describe the execution process of the computer-readable instructions in the electronic device 1. For example, the computer-readable instructions may be divided into an identification unit 110, a monitoring unit 111, a statistics unit 112, a calling unit 113, and a generating unit 114.
[0190] The memory 12 can be used to store the computer-readable instructions and / or modules, and the processor 13 implements various functions of the electronic device 1 by running or executing the computer-readable instructions and / or modules stored in the memory 12, and calling the data stored in the memory 12. The memory 12 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the electronic device, etc. The memory 12 can include non-volatile and volatile memories, such as: a hard disk, a memory, a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other storage devices.
[0191] The memory 12 may be an external memory and / or an internal memory of the electronic device 1. Furthermore, the memory 12 may be a memory in a physical form, such as a memory stick, a TF card (Trans-flash Card), and the like.
[0192] If the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also instruct the relevant hardware to complete it through computer-readable instructions. The computer-readable instructions can be stored in a computer-readable storage medium. When the computer-readable instructions are executed by the processor, the steps of the above-mentioned various method embodiments can be implemented.
[0193] The computer-readable instructions include computer-readable instruction codes, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer-readable instruction code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM).
[0194] The blockchain referred to in the present invention is a new application mode of computer technologies such as distributed motion trajectory generation, point-to-point transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the blockchain underlying platform, platform product service layer, and application service layer.
[0195] Combination Figure 1 The memory 12 in the electronic device 1 stores computer-readable instructions to implement a motion trajectory generation method, and the processor 13 can execute the computer-readable instructions to implement:
[0196] receiving a trajectory generation request, and identifying a target application software according to the trajectory generation request;
[0197] Monitoring the running status of the target application software;
[0198] If the running state is the closed state, then counting the duration of the running state being the closed state;
[0199] If the duration of the state is greater than or equal to the preset duration, the self-starting algorithm is called to perform self-starting processing on the target application software, and the positioning algorithm of the target application software is called to obtain the longitude and latitude coordinates of the user in real time;
[0200] Calculate the moving distance of the user according to the plurality of longitude and latitude coordinates;
[0201] If the moving distance is greater than or equal to the preset distance, a restart algorithm is called to execute restart processing on the target application software, and a movement trajectory of the user is generated according to the multiple longitude and latitude coordinates.
[0202] Specifically, the specific implementation method of the processor 13 for the above-mentioned computer readable instructions can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0203] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0204] The computer-readable storage medium stores computer-readable instructions, wherein the computer-readable instructions are used to implement the following steps when executed by the processor 13:
[0205] receiving a trajectory generation request, and identifying a target application software according to the trajectory generation request;
[0206] Monitoring the running status of the target application software;
[0207] If the running state is the closed state, then counting the duration of the running state being the closed state;
[0208] If the duration of the state is greater than or equal to the preset duration, the self-starting algorithm is called to perform self-starting processing on the target application software, and the positioning algorithm of the target application software is called to obtain the longitude and latitude coordinates of the user in real time;
[0209] Calculate the moving distance of the user according to the plurality of longitude and latitude coordinates;
[0210] If the moving distance is greater than or equal to the preset distance, a restart algorithm is called to execute restart processing on the target application software, and a movement trajectory of the user is generated according to the multiple longitude and latitude coordinates.
[0211] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0212] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0213] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0214] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or devices mentioned can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
[0215] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A motion trajectory generation method, applied to electronic equipment, characterized in that: The motion trajectory generating method comprises: Receiving a trajectory generation request, and identifying a target application software according to the trajectory generation request, including: obtaining all application software in the electronic device; screening out application software including a positioning algorithm from all application software as initial application software; obtaining an operation log of the electronic device, and obtaining a reception time of the trajectory generation request; obtaining a download time of the initial application software based on the operation log, and counting a historical startup time of the initial application software; calculating a startup ratio of the initial application software based on the reception time, the download time and the historical startup time; determining the initial application software with the largest startup ratio as the target application software; Monitoring the running state of the target application software, including: extracting log information corresponding to the receiving time from the running log; obtaining switch information corresponding to the software switch in the target application software from the log information; if the switch information is started, determining the running state as the started state; or if the switch information is closed, or the log information does not contain the switch information, determining the running state as the closed state; If the running state is the closed state, then counting the duration of the running state being the closed state; If the duration of the state is greater than or equal to the preset duration, the self-starting algorithm is called to perform self-starting processing on the target application software, and the positioning algorithm of the target application software is called to obtain the longitude and latitude coordinates of the user in real time; Calculate the moving distance of the user according to the plurality of longitude and latitude coordinates; If the moving distance is greater than or equal to the preset distance, a restart algorithm is called to execute restart processing on the target application software, and a movement trajectory of the user is generated according to the multiple longitude and latitude coordinates.
2. The motion trajectory generation method according to claim 1, characterized in that: The calculation formula of the startup ratio is: in, is the starting ratio, refers to the historical startup duration, is the receiving time, It refers to the download time.
3. The motion trajectory generation method according to claim 1, characterized in that: Calculating the user's moving distance according to the plurality of longitude and latitude coordinates comprises: For any two longitude and latitude coordinates, the any two longitude and latitude coordinates include a first longitude and latitude coordinate and a second longitude and latitude coordinate, the first longitude and latitude coordinate includes a first longitude and a first latitude, and the second longitude and latitude coordinate includes a second longitude and a second latitude; The moving distance is calculated according to the first longitude, the first latitude, the second longitude and the second latitude. The calculation formula of the moving distance is: in, is the moving distance, refers to the first latitude, refers to the second latitude, refers to the first longitude, refers to the second longitude.
4. The motion trajectory generation method according to claim 1, characterized in that: The calling of the restart algorithm to perform restart processing on the target application software comprises: Obtaining a software identifier of the target application software; Writing the software identifier into a position corresponding to the startup object field in the restart algorithm to obtain a restart statement; The restart statement is executed to perform restart processing on the target application software.
5. The motion trajectory generation method according to claim 1, characterized in that: Generating the movement trajectory of the user according to the multiple longitude and latitude coordinates includes: Acquire a mapping relationship between the plurality of longitude and latitude coordinates and a display screen in the electronic device; Convert the multiple longitude and latitude coordinates based on the mapping relationship to obtain multiple screen coordinates; The multiple screen coordinates are plotted to obtain the movement trajectory of the user.
6. A motion trajectory generating device, running on an electronic device, characterized in that: The motion trajectory generating device comprises: The identification unit is used to receive a trajectory generation request and identify a target application software according to the trajectory generation request, including: obtaining all application software in the electronic device; screening out application software including a positioning algorithm from all application software as the initial application software; obtaining an operation log of the electronic device and obtaining a reception time of the trajectory generation request; obtaining a download time of the initial application software based on the operation log, and counting a historical startup time of the initial application software; calculating a startup ratio of the initial application software based on the reception time, the download time and the historical startup time; determining the initial application software with the largest startup ratio as the target application software; A monitoring unit, configured to monitor the running state of the target application software, comprising: extracting log information corresponding to the receiving time from the running log; acquiring switch information corresponding to the software switch in the target application software from the log information; if the switch information is started, determining the running state as the started state; or if the switch information is closed, or the log information does not contain the switch information, determining the running state as the closed state; a counting unit, for counting the duration of the running state being the closed state if the running state is the closed state; A calling unit, configured to call a self-starting algorithm to perform a self-starting process on the target application software if the duration of the state is greater than or equal to a preset duration, and call a positioning algorithm of the target application software to obtain the longitude and latitude coordinates of the user in real time; The statistical unit is further used to calculate the moving distance of the user according to the plurality of longitude and latitude coordinates; A generating unit is used to call a restart algorithm to execute restart processing on the target application software if the moving distance is greater than or equal to a preset distance, and to generate a movement trajectory of the user according to the multiple longitude and latitude coordinates.
7. An electronic device, characterized in that: The electronic device comprises: a memory storing computer-readable instructions; and A processor executes the computer-readable instructions stored in the memory to implement the motion trajectory generation method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions are executed by a processor in an electronic device to implement the motion trajectory generation method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Trajectory data processing method and device, storage medium and computer equipment
CN110579219A
Safety positioning method and device based on outdoor sports and server
CN112344921A