A method and device for initialization
By determining whether it is the first arousal or updated when the client is aroused, creating an SDK object and obtaining data from the client management server to perform initialization, the problem of high initialization resource consumption in the prior art is solved, and efficiency and user experience are improved.
Patent Information
- Application Number
- CN202111222481.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-20
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2041-10-20
AI Technical Summary
In the prior art, the client initialization process requires a lot of configuration content, high resource consumption and low efficiency, resulting in poor user experience.
When the client is called up, determine whether it is the first call or updated, create an SDK object and obtain the specified data from the client management server to perform initialization, reducing the resource consumption of the client.
It effectively reduces the main program resource consumption of the client, improves the initialization efficiency, and improves the user experience, especially in smart home scenarios, which can better allocate resources to other services.
Smart Images

Figure CN113961254B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to an initialization method and device. Background Art
[0002] With the development of the Internet, people are becoming more and more dependent on the Internet, and their daily lives are often inseparable from the client. In order to better serve users, various application programs (also known as "clients") technologies have emerged.
[0003] Due to the inevitable phenomenon of adjusting the client version and users changing devices, the parameters of certain subroutines (which can be represented in the form of codes) in the client may need to be initialized accordingly.
[0004] Under normal circumstances, the initialization process needs to be executed by the client, and the process of calling the initialization interface and obtaining the parameters required for the initialization process all need to be executed by the client, which will result in a lot of content to be configured for initialization, large resources, and low efficiency, which will lead to poor user experience. Summary of the invention
[0005] The present application provides an initialization method and device to solve the problems in the prior art that initialization requires a lot of configuration content, large resources, and low efficiency.
[0006] In the first aspect, the present application provides an initialization method, which includes: when a client is awakened, determining whether this awakening is the first awakening under the condition that the client is updated or the terminal to which the client belongs is replaced; if so, creating an SDK object; initializing the parameters of the SDK object to obtain a specified SDK object; running the specified SDK object to obtain specified data from the client management server; and performing initialization according to the specified data.
[0007] In an optional embodiment of the present specification, creating an SDK object includes: calling an initialization interface init to create the SDK object.
[0008] In an optional embodiment of the present specification, initialization is performed according to specified data, including: calling an initialization startup event template method putInit; and recording an initialization startup event according to the initialization startup event template method putInit.
[0009] In an optional embodiment of the present specification, when the client is awakened, it is determined whether this awakening is the first awakening under the condition that the client is updated or the terminal to which the client belongs is replaced. The method also includes: if not, running the specified SDK object obtained in history, obtaining specified data from the client management server; and performing initialization according to the specified data.
[0010] In an optional embodiment of the present specification, the specified SDK object obtained in the operation history is used to obtain specified data from the client management server to perform initialization, including: calling the initialization startup event template method putInit; using the specified SDK object obtained in the operation history to obtain specified data from the client management server, and recording the initialization startup event according to the initialization startup event template method putInit.
[0011] In an optional embodiment of the present specification, determining whether this wakeup is the first wakeup under the condition that the client is updated or the terminal to which the client belongs is replaced includes: determining whether the env field in the database has changed; if not, this wakeup is the first wakeup; if so, this wakeup is not the first wakeup.
[0012] In an optional embodiment of the present specification, running the specified SDK object includes: running the specified SDK object to use the current time detected from the data provided by the client when calling the putinit interface as the first initialization time; obtaining initialization start event information, wherein the initialization information is the information of the initialization start event triggered when the specified SDK object is run; using the current time detected from the data provided by the client management server as the second initialization time; generating a timestamp and adding it to the information of the initialization start event, wherein the timestamp indicates the first initialization time and the second initialization time; and sending the information of the initialization start event with the timestamp to the client management server.
[0013] In the second aspect, the present application provides an initialization device, including: a wake-up detection module, configured to: when the client is awakened, determine whether this wake-up is the first wake-up under the condition that the client is updated or the terminal to which the client belongs is replaced; an SDK object creation module, configured to: if so, create an SDK object; a specified SDK object generation module, configured to: initialize the parameters of the SDK object to obtain the specified SDK object; a specified data acquisition module, configured to: run the specified SDK object to obtain specified data from the client management server; an initialization module, configured to: perform initialization according to the specified data.
[0014] In an optional embodiment of the present specification, the SDK object creation module is specifically configured to: call the initialization interface init to create the SDK object.
[0015] In an optional embodiment of the present specification, the initialization module is specifically configured as follows: calling the initialization startup event template method putInit; and recording the initialization startup event according to the initialization startup event template method putInit.
[0016] In an optional embodiment of the present specification, the device also includes a historically specified SDK object acquisition module, which is configured as follows: if the current call-up is not the first call-up under the condition that the client is updated or the terminal to which the client belongs is replaced, the specified SDK object obtained in history is run to obtain specified data from the client management server; and initialization is performed according to the specified data.
[0017] In an optional embodiment of the present specification, the initialization module is specifically configured as follows: calling the initialization startup event template method putInit; and recording the initialization startup event according to the initialization startup event template method putInit.
[0018] In an optional embodiment of the present specification, the wake-up detection module is specifically configured to: determine whether the env field in the database has changed; if not, this wake-up is the first wake-up; if so, this wake-up is not the first wake-up.
[0019] In an optional embodiment of the present specification, a data acquisition module is specified, and is specifically configured as follows: running a specified SDK object to use the current time detected from the data provided by the client when calling the putinit interface as the first initialization time; obtaining initialization start event information, wherein the initialization information is the information of the initialization start event triggered when the specified SDK object is run; using the current time detected from the data provided by the client management server as the second initialization time; generating a timestamp and adding it to the information of the initialization start event, wherein the timestamp indicates the first initialization time and the second initialization time; and sending the information of the initialization start event with the timestamp to the client management server.
[0020] In a third aspect, the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0021] Memory, used to store computer programs;
[0022] A processor is used to implement the steps of any initialization method in the first aspect when executing a program stored in a memory.
[0023] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, the steps of any initialization method in the first aspect are implemented.
[0024] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art:
[0025] The initialization method and device in this specification obtain the specified SDK object from the client management server when a client update is detected, and the specified SDK object is used for initialization. After that, the client only needs to run the specified SDK object to achieve initialization, which can effectively reduce the resource consumption of the client's main program. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0028] Figure 1 A schematic diagram of a scenario involved in an initialization process provided in an embodiment of the present application;
[0029] Figure 2 A schematic diagram of a process of initialization provided in an embodiment of the present application;
[0030] Figure 3 A schematic diagram of the structure of an initialization device provided in an embodiment of the present application;
[0031] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0033] The initialization process in this manual is used to solve the problem that the initialization requires a lot of configuration, large resources, and low efficiency in related technologies. Figure 1 As shown. Figure 1In the scenario shown, the client management server is connected to the client 1 to the client n in communication, and the process in this specification is described by taking the interaction between any one of the clients 1 to the client n and the client management server as an example. The execution subject of the initialization process in this specification is the client.
[0034] like Figure 2 As shown, the initialization method in this specification includes the following steps:
[0035] S200: When the client is awakened, it is determined whether this awakening is the first awakening under the condition that the client is updated or the terminal to which the client belongs is replaced. If yes, step S202 is executed; if no, step S210 is executed:
[0036] The client in this specification may refer to an application client on the software, which is used to generate instructions through interaction with the user, and the client is, for example, an APP for controlling a smart home.
[0037] The client management server in this specification is used to manage and maintain the client and provide support for the operation of the client. The client management server can be a single server or a computing platform composed of multiple servers. The multiple server clusters can be centralized or distributed, dedicated or provided by other devices or systems at the same time. In some embodiments, the client management server can be implemented on a cloud platform. As an example only, the cloud platform can include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an internal cloud, a multi-layer cloud, etc. or any combination thereof.
[0038] S202: Create an SDK object.
[0039] In an optional embodiment of the present specification, the client update file package includes an initialization interface init, which is used to obtain a specified SDK object. The update process for the client can implement the update of the initialization interface init for the main program. After that, if the client update is detected, the main program calls the initialization interface init to create the SDK object.
[0040] S204: Initialize the parameters of the SDK object to obtain the specified SDK object.
[0041] In this specification, the process of initializing the parameters of the SDK object is the process of configuring the parameters of the SDK object.
[0042] S206: Run the specified SDK object to obtain specified data from the client management server.
[0043] In this specification, the client includes the main program. Before obtaining the specified SDK object, the main program of the client can be regarded as the client. After obtaining the specified SDK object, the main program and the specified SDK object can be regarded as the client together. The specified SDK object in this specification is provided with a main program interface, and the specified SDK object can establish a connection with the main program through the main program interface.
[0044] After the main program establishes a connection with the specified SDK object, the main program can run the specified SDK object so that the specified SDK object can obtain the specified data. The specified SDK object can obtain the specified data from the client management server. The specified data in this manual is the field parameter to be used later in the initialization process.
[0045] Further, in an optional embodiment of the present specification, the initialization process in the present specification may be directed to a data collection process of various events in the initialization process. Exemplarily, the event in the initialization process may be an initialization start event.
[0046] S208: Perform initialization according to the specified data.
[0047] In an optional embodiment of the present specification, the data processing performed may be initialization of parameters of a field in a certain code segment (hereinafter referred to as a designated field). The acquired designated data is added to the designated field, and the initialization is completed.
[0048] S210: Run the designated SDK object obtained in history, obtain designated data from the client management server, and perform initialization according to the designated data.
[0049] It can be seen that the initialization process in this specification, when the client update is detected, obtains the specified SDK object from the client management server, and the specified SDK object is used to initialize . After that, the client only needs to run the specified SDK object to realize the initialization of , which can effectively solve the problems of the existing technology that the initialization requires more configuration content, large resources, and low efficiency. When it is necessary to initialize , the developer can adjust the specified data to achieve the corresponding initialization purpose, which is also more convenient.
[0050] In this specification, "detecting a client update" means that after the main program of the client is updated, the client is called up by the user for the first time. The client update process and how to detect the client update are now described.
[0051] In an optional embodiment of the present specification, the client obtains a client update file, wherein the client update file includes an initial value for adjusting the env field in the database, and executes the client update file to change the env field in the database of the client to the initial value.
[0052] The client receives a wake-up instruction, wherein the wake-up instruction is sent to the client by the operating system of the terminal to which the client belongs (for example, Android, iOS, Symbian, Windows Phone, and BlackBerryOS, etc.). Specifically, the operating system can detect the user's operation. If a click operation on the control of the application is detected, the operating system generates a wake-up instruction and sends it to the client. The client reads the data stored locally on the client to determine the env field in the client's database. It is determined whether the env field in the database is the initial value. If so, it is determined that an update of the client is detected or the terminal to which the client belongs is replaced. If not, it is determined that no update of the client is detected and no replacement of the terminal to which the client belongs is detected.
[0053] In order to enable the designated SDK object to obtain the designated data, in an optional embodiment of the present specification, the designated SDK object includes a putinit interface, and the putinit interface is used to obtain the designated data. The designated SDK object is run to call the putinit interface to obtain the designated data from the client management server.
[0054] It can be seen that the process in this manual is designed differently for the initialization process of the user's first wake-up after the client is updated (when the client update is detected or the terminal to which the client belongs is replaced) and non-first wake-up (when the client update is not detected and the terminal to which the client belongs is not detected to be replaced). After initialization, there is no need to obtain the specified SDK object again, which can solve the problem of large amount of content to be configured, large resources and low efficiency during initialization, while reducing the consumption of communication resources. Especially in the scenario of smart home, it can help to allocate resources to other services being processed by the client, which is conducive to ensuring user experience.
[0055] Certain events (such as initialization startup events) generated by the initialization process of the first wake-up experience after the client is updated may affect the subsequent use of the client, and these events can be characterized by the information of the initialization startup event. This information is more important for the subsequent detection of errors that occurred in the initialization process. The actual situation is that the client runs mostly based on the time of the terminal to which it belongs (that is, the system time of the terminal), and the event information generated for these events is also based on the terminal time. The processing and storage of these events in subsequent steps are often performed by the client management server, and the runtime of the client management server is based on the server time. If the time between the client and the server does not match, it may cause a large error in searching for event information according to time, resulting in the use effect of the event information being affected.
[0056] In view of this, in an optional embodiment of the present specification, a specified SDK object is run to use the current time detected from the data provided by the client when calling the putinit interface as the first initialization time. Initialization startup event information is obtained, wherein the initialization information is the information of the initialization startup event triggered when the specified SDK object is run. The current time detected from the data provided by the client management server is used as the second initialization time. A timestamp is generated and added to the information of the initialization startup event, wherein the timestamp indicates the first initialization time and the second initialization time. The information of the initialization startup event with the timestamp is sent to the client management server.
[0057] Thereafter, the client management server can determine the first initialization time and the second initialization time from the timestamp of the information of the initialization startup event according to actual needs, calculate the difference between the two, mark the difference with the unique identifier of the terminal to which the client that sends the information of the initialization startup event belongs (the unique identifier can be added to the information of the initialization startup event and sent by the client to the client management server. The unique identifier may be, for example, the MAC address of the terminal), and then store the difference.
[0058] After the initialization is completed, if other events (e.g., operation events representing user operations) other than the initialization start event are detected to be triggered, a timestamp is generated based on the detection time of the triggering event detected from the data provided by the client, and added to the data collected for the other events. The data is sent to the client management server.
[0059] Then, when the client management server receives the data of the other event sent by the client (which carries the unique identifier of the terminal to which the client belongs), the unique identifier of the terminal is parsed from the data as a reference identifier. From the stored differences, the difference whose mark matches the reference identifier (for example, the same means matching) is found as a reference difference. Then, the reference difference is used to calibrate the time indicated by the timestamp carried in the data to obtain the management time that matches the client management server. Then, the detection time, management time and data are stored for subsequent search.
[0060] In this embodiment, a distinctive design is made for the timestamp of the initialization start event, which can effectively obtain the difference between the client time and the client management server time. In the process of obtaining data, the client does not need to obtain the client management server time again, which can reduce the consumption of data processing resources on the client side while ensuring that the data generation time is accurately recorded.
[0061] Optionally, the initialization process in this specification can be applied to initialization of buried points.
[0062] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0063] Based on the same idea, this specification further provides an initialization device, such as Figure 3 As shown, the initialization device includes one or more of the following modules:
[0064] The wake-up detection module 300 is configured to: when the client is woken up, determine whether this wake-up is the first wake-up under the condition that the client is updated or the terminal to which the client belongs is replaced;
[0065] SDK object creation module 302 is configured to: if yes, create SDK object;
[0066] The designated SDK object generation module 304 is configured to: initialize the parameters of the SDK object to obtain the designated SDK object;
[0067] The designated data acquisition module 306 is configured to: run the designated SDK object to acquire designated data from the client management server;
[0068] The initialization module 308 is configured to perform initialization according to the specified data.
[0069] In an optional embodiment of the present specification, the SDK object creation module 302 is specifically configured to: call the initialization interface init to create the SDK object.
[0070] In an optional embodiment of the present specification, the initialization module 308 is specifically configured as follows: calling the initialization startup event template method putInit; using the specified SDK object obtained in the operation history to obtain the specified data from the client management server, and recording the initialization startup event according to the initialization startup event template method putInit.
[0071] In an optional embodiment of the present specification, the device also includes a historically specified SDK object acquisition module, which is configured as follows: if the current call-up is not the first call-up under the condition that the client is updated or the terminal to which the client belongs is replaced, the specified SDK object obtained in history is run to obtain specified data from the client management server; and initialization is performed according to the specified data.
[0072] In an optional embodiment of the present specification, the initialization module 308 is specifically configured as follows: using the specified SDK object obtained in the operation history to obtain specified data from the client management server, calling the initialization startup event template method putInit; and recording the initialization startup event according to the initialization startup event template method putInit.
[0073] In an optional embodiment of the present specification, the wake-up detection module 300 is specifically configured to: determine whether the env field in the database has changed; if not, this wake-up is the first wake-up; if so, this wake-up is not the first wake-up.
[0074] In an optional embodiment of the present specification, the data acquisition module 306 is specifically configured as follows: running the specified SDK object to use the current time detected from the data provided by the client when calling the putinit interface as the first initialization time; obtaining initialization start event information, wherein the initialization information is the information of the initialization start event triggered when the specified SDK object is run; using the current time detected from the data provided by the client management server as the second initialization time; generating a timestamp and adding it to the information of the initialization start event, wherein the timestamp indicates the first initialization time and the second initialization time; and sending the information of the initialization start event with the timestamp to the client management server.
[0075] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art may understand and implement it without creative work.
[0076] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0077] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0078] Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Figure 4 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.
[0079] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0080] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.
[0081] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming an initialized device at the logical level. The processor executes the program stored in the memory, and is specifically used to execute any of the aforementioned holographic display processes. The various embodiments in this application are described in a progressive manner, and the same and similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the electronic device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0082] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the initialization steps provided in any of the aforementioned method embodiments are implemented.
[0083] Computer-readable storage media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0084] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including a..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0085] The above is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features applied herein.
Claims
1. A method of initialization, characterized in that: The method comprises: When the client is awakened, it is determined whether this awakening is the first awakening under the condition that the client is updated or the terminal to which the client belongs is replaced; If yes, create SDK object; Initialize the parameters of the SDK object and obtain the specified SDK object; Run the specified SDK object to obtain specified data from the client management server; According to the specified data, perform initialization; Running the specified SDK object includes: Running the specified SDK object to use the current time detected from the data provided by the client when calling the putinit interface as the first initialization time; Acquire initialization information, wherein the initialization information is information of an initialization start event triggered when the specified SDK object is run; Using the current time detected from the data provided by the client management server as the second initialization time; Generate a timestamp and add it to the information of the initialization start event, wherein the timestamp indicates the first initialization time and the second initialization time; The information of the initialization start event with the timestamp added is sent to the client management server, wherein the client management server is used to parse the unique identifier of the terminal from the data when receiving the data of the event sent by the client, as a reference identifier; find out the difference matching the reference identifier from the stored differences, as a reference difference; use the reference difference to calibrate the time indicated by the timestamp carried in the data, and obtain the management time matching the client management server.
2. The method according to claim 1, characterized in that Create an SDK object, including: Call the initialization interface init to create the SDK object.
3. The method according to claim 1, characterized in that: According to the specified data, initialization is performed, including: Call the initialization startup event template method putInit; The initialization start event is recorded according to the initialization start event template method putInit.
4. The method according to claim 1, characterized in that: When the client is awakened, after determining whether this awakening is the first awakening under the condition that the client is updated or the terminal to which the client belongs is replaced, the method further includes: If not, the specified SDK object obtained in the operation history is used to obtain the specified data from the client management server and perform initialization.
5. The method according to claim 4, characterized in that Use the specified SDK object obtained in the running history to obtain the specified data from the client management server and perform initialization, including: Call the initialization startup event template method putInit; The designated SDK object obtained in the operation history is used to obtain designated data from the client management server, and the initialization startup event is recorded according to the initialization startup event template method putInit.
6. The method according to claim 1, characterized in that Determining whether this wakeup is the first wakeup under the condition that the client is updated or the terminal to which the client belongs is replaced includes: Determine whether the env field in the database has changed; If not, this call-up is the first call-up; If so, this call is not the first call.
7. An initialization device, characterized in that: The device comprises: The wake-up detection module is configured to: when the client is woken up, determine whether this wake-up is the first wake-up under the condition that the client is updated or the terminal to which the client belongs is replaced; The SDK object creation module is configured as follows: if yes, then create the SDK object; Specify the SDK object generation module, which is configured to: initialize the parameters of the SDK object and obtain the specified SDK object; The designated data acquisition module is configured to: run the designated SDK object to acquire designated data from the client management server; An initialization module is configured to: perform initialization according to the specified data; Wherein, running the specified SDK object includes: Running the specified SDK object to use the current time detected from the data provided by the client when calling the putinit interface as the first initialization time; Acquire initialization information, wherein the initialization information is information of an initialization start event triggered when the specified SDK object is run; Using the current time detected from the data provided by the client management server as the second initialization time; Generate a timestamp and add it to the information of the initialization start event, wherein the timestamp indicates the first initialization time and the second initialization time; The information of the initialization start event with the timestamp added is sent to the client management server, wherein the client management server is used to parse the unique identifier of the terminal from the data when receiving the data of the event sent by the client, as a reference identifier; find out the difference matching the reference identifier from the stored differences, as a reference difference; use the reference difference to calibrate the time indicated by the timestamp carried in the data, and obtain the management time matching the client management server.
8. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, used to implement the steps of the initialization method described in any one of claims 1 to 6 when executing a program stored in a memory.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the initialization method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method for obtaining push information and method and device for sending push information
CN110839073A
