CN115495716A - Local authentication method and electronic equipment - Google Patents

Local authentication method and electronic equipment Download PDF

Info

Publication number
CN115495716A
CN115495716A CN202210976626.0A CN202210976626A CN115495716A CN 115495716 A CN115495716 A CN 115495716A CN 202210976626 A CN202210976626 A CN 202210976626A CN 115495716 A CN115495716 A CN 115495716A
Authority
CN
China
Prior art keywords
authentication
installation package
electronic device
local authentication
authentication result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210976626.0A
Other languages
Chinese (zh)
Other versions
CN115495716B (en
Inventor
王�锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202311251077.1A priority Critical patent/CN117390604A/en
Priority to CN202210976626.0A priority patent/CN115495716B/en
Publication of CN115495716A publication Critical patent/CN115495716A/en
Application granted granted Critical
Publication of CN115495716B publication Critical patent/CN115495716B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/305Authentication, i.e. establishing the identity or authorisation of security principals by remotely controlling device operation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/51Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the invention provides a local authentication method and electronic equipment. In the technical scheme provided by the embodiment of the invention, the method comprises the following steps: when the electronic equipment is in a first state, acquiring pre-authentication data of a downloaded installation package; obtaining a local authentication result according to the pre-authentication data; when the local authentication result includes invalidity, connecting a server to perform a pre-authentication operation when a network connection is available. The embodiment of the invention can not delete the installation package when the local authentication is invalid, thereby saving the re-downloading expense and enhancing the user experience.

Description

Local authentication method and electronic equipment
[ technical field ] A method for producing a semiconductor device
The invention relates to the technical field of computers, in particular to a local authentication method and electronic equipment.
[ background ] A method for producing a semiconductor device
In order to solve the problem that no network exists during night time fixed-time installation, after the installation package (such as an OTA package) is downloaded, the electronic device firstly inquires whether the currently downloaded installation package can be used for installation from a server, and if the currently downloaded installation package can be used for installation, pre-authentication data is written into a cache file, and the process is called pre-authentication. When the timing installation is triggered at night, if the network is available, the electronic equipment initiates installation authentication to the server; if the network is not available, the electronic equipment performs installation authentication according to the pre-authentication data, and the process is called local authentication.
At present, when the electronic device locally authenticates the installation package, the installation package is deleted as long as the authentication is unsuccessful, so that the re-downloading expense is increased, and the user experience is not high.
[ summary of the invention ]
In view of this, embodiments of the present invention provide a local authentication method and an electronic device, so that an installation package is not deleted when local authentication is invalid, re-downloading cost is saved, and user experience is enhanced.
In a first aspect, an embodiment of the present invention provides a local authentication method, where the method includes:
when the electronic equipment is in a first state, acquiring pre-authentication data of a downloaded installation package;
obtaining a local authentication result according to the pre-authentication data;
when the local authentication result includes invalidity, connecting a server to perform a pre-authentication operation when a network connection is available.
With reference to the first aspect, in certain implementations of the first aspect, when the local authentication result includes invalidity, the method further includes:
and setting a next night installation timer of the installation package.
With reference to the first aspect, in certain implementations of the first aspect, when the local authentication result includes success, the method further includes:
and executing the installation operation of the installation package.
With reference to the first aspect, in certain implementations of the first aspect, when the local authentication result includes a failure, the method further includes:
and deleting the installation package and the version information thereof.
With reference to the first aspect, in certain implementations of the first aspect, the method further includes:
and generating a prompt message, wherein the prompt message is used for reminding the user that the installation package is to be deleted and reminding the user to download the latest installation package again.
With reference to the first aspect, in certain implementations of the first aspect, the first status includes a night installation timer trigger of the installation package, an installation condition of the installation package is satisfied, and a network connection of the electronic device is unavailable.
With reference to the first aspect, in certain implementation manners of the first aspect, the pre-authentication data includes an authentication Token, a version code list for which authentication is successful, and an authentication result returned by the server.
With reference to the first aspect, in some implementation manners of the first aspect, when the pre-authentication data is not obtained, or the authentication Token is not equal to the local authentication Token, or the version coding list in the installation package is not equal to the version coding list that is successfully authenticated, the local authentication result includes invalid.
With reference to the first aspect, in some implementation manners of the first aspect, the pre-authentication data is obtained, the authentication Token is equal to a local authentication Token, the version code list in the installation package is equal to the version code list that is successfully authenticated, and when the authentication result returned by the server is successfully stored in the specified file, the local authentication result includes a success.
With reference to the first aspect, in some implementation manners of the first aspect, the pre-authentication data is obtained, the authentication Token is equal to the local authentication Token, the version code list in the installation package is equal to the version code list that is successfully authenticated, and the local authentication result includes a failure when the authentication result returned by the server is not successfully stored in the designated file.
With reference to the first aspect, in certain implementations of the first aspect, the specified file includes an update _ auth _ sa file.
With reference to the first aspect, in certain implementations of the first aspect, the installation package includes an OTA package.
In a second aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, where the memory is used for storing a computer program, and the computer program includes program instructions, which when executed by the processor, cause the electronic device to execute the method described above.
In a third aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored, the computer program including program instructions, which, when the program is requested to be executed by a computer, make the computer execute the method as described above.
In the technical solutions of the local authentication method and the electronic device provided in the embodiments of the present invention, the method includes: when the electronic equipment is in a first state, acquiring pre-authentication data of a downloaded installation package; obtaining a local authentication result according to the pre-authentication data; when the local authentication result includes invalidity, connecting a server to perform a pre-authentication operation when a network connection is available. The embodiment of the invention can not delete the installation package when the local authentication is invalid, thereby saving the re-downloading expense and enhancing the user experience.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
FIG. 2 is a block diagram of a software architecture of the electronic device 100 according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a local authentication result according to an embodiment of the present invention;
fig. 4 is a flowchart of a local authentication method according to an embodiment of the present invention;
fig. 5 is a flowchart of another local authentication method according to an embodiment of the present invention;
fig. 6 is a specific flowchart of fig. 5 for obtaining a local authentication result according to the pre-authentication data;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
[ detailed description ] embodiments
For better understanding of the technical solutions of the present invention, the following detailed descriptions of the embodiments of the present invention are provided with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of associative relationship that describes an associated object, meaning that three types of relationships may exist, e.g., A and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Fig. 1 shows a schematic structural diagram of an electronic device 100.
The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose-input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
The I2C interface is a bidirectional synchronous serial bus comprising a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, a charger, a flash, a camera 193, etc. through different I2C bus interfaces, respectively. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through an I2C bus interface to implement a touch function of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 through an I2S bus, enabling communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through the I2S interface, so as to implement a function of answering a call through a bluetooth headset.
The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled by a PCM bus interface. In some embodiments, the audio module 170 may also transmit the audio signal to the wireless communication module 160 through the PCM interface, so as to implement the function of answering a call through the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through a UART interface, so as to implement the function of playing music through a bluetooth headset.
MIPI interfaces may be used to connect processor 110 with peripheral devices such as display screen 194, camera 193, and the like. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the capture functionality of electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, and the like.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The interface may also be used to connect other electronic devices, such as AR devices and the like.
It should be understood that the connection relationship between the modules according to the embodiment of the present invention is only illustrative and is not limited to the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive a charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may also be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), global Navigation Satellite System (GNSS), frequency Modulation (FM), near Field Communication (NFC), infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that electronic device 100 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), general Packet Radio Service (GPRS), code Division Multiple Access (CDMA), wideband Code Division Multiple Access (WCDMA), time division code division multiple access (time-division multiple access, TD-SCDMA), long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may be a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a user takes a picture, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, an optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and converting into an image visible to the naked eye. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to be converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent recognition of the electronic device 100 can be realized through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in the external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (such as audio data, phone book, etc.) created during use of the electronic device 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into analog audio signals for output, and also used to convert analog audio inputs into digital audio signals. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The electronic apparatus 100 can listen to music through the speaker 170A or listen to a hands-free call.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the electronic apparatus 100 receives a call or voice information, it can receive voice by placing the receiver 170B close to the ear of the person.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or sending voice information, the user can input a voice signal to the microphone 170C by uttering a voice signal close to the microphone 170C through the mouth of the user. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, perform directional recording, and so on.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be the USB interface 130, or may be a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used for sensing a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a variety of types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., x, y, and z axes) may be determined by gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. Illustratively, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the electronic device 100, calculates a distance to be compensated for the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude, aiding in positioning and navigation, from barometric pressure values measured by barometric pressure sensor 180C.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the detected opening and closing state of the leather sheath or the opening and closing state of the flip, the characteristics of automatic unlocking of the flip and the like are set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the electronic device 100 is stationary. The method can also be used for recognizing the posture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, taking a picture of a scene, the electronic device 100 may utilize the distance sensor 180F to range to achieve fast focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light to the outside through the light emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there are no objects near the electronic device 100. The electronic device 100 can utilize the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear for talking, so as to automatically turn off the screen to achieve the purpose of saving power. The proximity light sensor 180G can also be used in a holster mode, a pocket mode automatically unlocks and locks the screen.
The ambient light sensor 180L is used to sense the ambient light level. Electronic device 100 may adaptively adjust the brightness of display screen 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 may utilize the collected fingerprint characteristics to unlock a fingerprint, access an application lock, photograph a fingerprint, answer an incoming call with a fingerprint, and so on.
The temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 implements a temperature processing strategy using the temperature detected by temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 performs a reduction in performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, the electronic device 100 heats the battery 142 when the temperature is below another threshold to avoid the low temperature causing the electronic device 100 to shut down abnormally. In other embodiments, when the temperature is lower than a further threshold, the electronic device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
The touch sensor 180K is also called a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation acting thereon or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device 100, different from the position of the display screen 194.
The bone conduction sensor 180M can acquire a vibration signal. In some embodiments, the bone conduction sensor 180M may acquire a vibration signal of the human voice vibrating a bone mass. The bone conduction sensor 180M may also contact the human pulse to receive the blood pressure pulsation signal. In some embodiments, bone conduction sensor 180M may also be provided in a headset, integrated into a bone conduction headset. The audio module 170 may analyze a voice signal based on the vibration signal of the bone mass vibrated by the sound part acquired by the bone conduction sensor 180M, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic apparatus 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration prompts as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be brought into and out of contact with the electronic apparatus 100 by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
The software system of the electronic device 100 may employ a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention uses an Android system with a layered architecture as an example to exemplarily illustrate a software structure of the electronic device 100.
Fig. 2 is a block diagram of a software configuration of the electronic apparatus 100 according to the embodiment of the present invention.
The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, an application layer, an application framework layer, an Android runtime (Android runtime) and system library, and a kernel layer from top to bottom.
The application layer may include a series of application packages.
As shown in fig. 2, the application package may include applications such as camera, gallery, calendar, phone call, map, navigation, WLAN, bluetooth, music, video, short message, etc.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 2, the application framework layers may include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
Content providers are used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
The phone manager is used to provide communication functions for the electronic device 100. Such as management of call status (including on, off, etc.).
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a short dwell, and does not require user interaction. Such as a notification manager used to notify download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.
The Android Runtime comprises a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application layer and the application framework layer as binary files. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The following describes exemplary workflow of the software and hardware of the electronic device 100 in connection with capturing a photo scene.
When the touch sensor 180K receives a touch operation, a corresponding hardware interrupt is issued to the kernel layer. The kernel layer processes the touch operation into an original input event (including touch coordinates, timestamp of the touch operation, and the like). The raw input events are stored at the kernel layer. And the application program framework layer acquires the original input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and taking a control corresponding to the click operation as a control of a camera application icon as an example, the camera application calls an interface of the application framework layer, starts the camera application, further starts the camera drive by calling the kernel layer, and captures a still image or a video through the camera 193.
Currently, installation packages may be released after being released to a server due to the existence of a vulnerability. When the installation package is disabled, the electronic device that downloaded the installation package of this version will not install the installation package.
Before the electronic equipment is installed with the installation package, installation authentication is required, namely, the electronic equipment inquires whether the current downloaded installation package can be used for installation from a server; when the server returns that the installation is possible, the electronic equipment performs subsequent installation logic; when the server returns that the installation is impossible, the electronic equipment reminds the user that the downloaded installation package is invalid, and deletes the locally downloaded installation package.
The installation authentication requires that the electronic equipment meets installation conditions (such as no call, locked screen, sufficient electric quantity, sufficient storage space, no agreement permission and the like), the network is available, and a result of whether the electronic equipment can be used for installation can be successfully acquired from the server; otherwise, the installation authentication and installation cannot be completed, the electronic equipment needs to try again when the electronic equipment is idle at night, if the situation that the network is unavailable still exists during night time installation, the user needs to be reminded to perform installation authentication and installation by networking when the next night time installation is triggered, and the user cannot experience the new version in time.
The electronic equipment is relatively stable in network within a period of time after the installation package (such as an OTA package) is downloaded, in order to solve the problem that no network exists during night time installation, after the installation package is downloaded, whether the currently downloaded installation package can be used for installation is inquired from a server, if yes, pre-authentication data is written in a cache file, and the process is called pre-authentication. When the timing installation is triggered at night, if the network is available, the electronic equipment initiates installation authentication to the server; if the network is not available, the electronic equipment performs installation authentication according to the pre-authentication data, and the process is called local authentication.
At present, when the electronic equipment performs local authentication on the installation package, the installation package is deleted as long as the authentication is unsuccessful, so that the re-downloading expense is increased, and the user experience is not high.
Based on the foregoing technical problem, embodiments of the present invention provide a local authentication method and an electronic device, where an installation package is not deleted when local authentication is invalid, thus saving re-downloading cost, enhancing user experience, and having low reliability of an electronic device system.
Fig. 3 is a schematic diagram of a local authentication result according to an embodiment of the present invention. As shown in fig. 3, the local authentication result includes success, failure or invalidity.
And when the local authentication result comprises success, the electronic equipment executes the installation operation of the installation package. The installation package includes an OTA package.
And when the local authentication result comprises failure, the electronic equipment generates a prompt message, wherein the prompt message is used for reminding the user that the installation package is deleted, reminding the user that the latest installation package is downloaded again, and deleting the installation package and the version information thereof.
When the local authentication result includes invalidity, the electronic device monitors the network, connects to the server to perform a pre-authentication operation when network connection is available, and sets a next night installation timer of the installation package. The registration system network change broadcast, when the electronic equipment receives the network change broadcast and judges that the network connection is available, the connection server performs pre-authentication, pre-authentication data is stored locally after the pre-authentication is successful, and the electronic equipment is used under the condition that no network exists when a timer is installed at night for the next time.
Illustratively, a next night installation timer is set, and night installation is fixed to be performed 2 times between 2 a.m. and 4 a.m., each time at an interval of 1 hour. If the current night installation trigger is between 2 and 3 in the morning, the next night installation timer is set to be 1 hour later, otherwise, the next night installation timer is set to be between 2 and 3 in the morning.
In the embodiment of the invention, when the electronic equipment is in the first state, the pre-authentication data of the downloaded installation package is acquired, and the local authentication result is obtained according to the pre-authentication data. The first state comprises night installation timer triggering of the installation package, the installation condition of the installation package is met, and network connection of the electronic equipment is unavailable. The pre-authentication data comprises an authentication Token, a version coding list which is successfully authenticated and an authentication result returned by the server.
Illustratively, the installation conditions of the installation package include sufficient power, sufficient storage space, and the like of the electronic device.
In the embodiment of the present invention, when the pre-authentication data is not acquired, or the authentication Token is not equal to the local authentication Token, or the version coding list in the installation package is not equal to the successfully authenticated version coding list, the local authentication result includes invalidity.
Wherein the pre-authentication data is not acquired, that is, the pre-authentication data is null. In this case, there are two possibilities, one is that the electronic device does not perform a pre-authentication operation; another possibility is that the connection server authentication has no result when the electronic device is pre-authenticated.
When the authentication Token is not equal to the local authentication Token, the data may be tampered, or the local data is the authentication data of the last authentication.
When the version code list in the installation package is not equal to the successfully authenticated version code list, the data may be tampered, or the local data is the last authenticated authentication data.
In the embodiment of the invention, the pre-authentication data is acquired, the authentication Token is equal to the local authentication Token, the version code list in the installation package is equal to the version code list successfully authenticated, and the local authentication result comprises success when the authentication result returned by the server is successfully stored in the specified file. The specified file includes an update _ auth _ sa file.
In the embodiment of the invention, the pre-authentication data is acquired, the authentication Token is equal to the local authentication Token, the version code list in the installation package is equal to the version code list successfully authenticated, and the local authentication result comprises failure when the authentication result returned by the server is not successfully stored in the specified file.
The embodiment of the invention divides the unsuccessful local authentication result into failure and invalidity, does not delete the installation package when the local authentication result is invalid, simultaneously monitors the network change and sets the next night installation timer, and connects the server to execute the pre-authentication operation again when the network connection is available, thereby saving the re-downloading expenditure, enhancing the user experience and improving the system reliability of the electronic equipment.
Fig. 4 is a flowchart of a local authentication method according to an embodiment of the present invention. As shown in fig. 4, the method includes:
step 202, when the electronic device is in the first state, obtaining the pre-authentication data of the downloaded installation package.
And step 204, obtaining a local authentication result according to the pre-authentication data.
And step 206, when the local authentication result comprises invalidity, connecting the server to execute pre-authentication operation when network connection is available.
In the technical solution of the local authentication method provided in the embodiment of the present invention, the method includes: when the electronic equipment is in a first state, acquiring pre-authentication data of a downloaded installation package; obtaining a local authentication result according to the pre-authentication data; when the local authentication result includes invalidity, the server is connected to perform a pre-authentication operation when a network connection is available. The embodiment of the invention can not delete the installation package when the local authentication is invalid, thereby saving the re-downloading expense and enhancing the user experience.
Fig. 5 is a flowchart of another local authentication method according to an embodiment of the present invention. As shown in fig. 5, the method includes:
step 302, when the electronic device is in the first state, obtaining the pre-authentication data of the downloaded installation package.
The hardware structure and the software structure of the electronic device provided by the embodiment of the present invention can be referred to in fig. 1 and fig. 2 for the related description of the electronic device 100.
The pre-authentication data comprises an authentication Token, a version coding list which is successfully authenticated and an authentication result returned by the server.
Step 304, obtaining a local authentication result according to the pre-authentication data, and executing step 306 when the local authentication result includes invalidity; if the local authentication result includes success, go to step 312; when the local authentication result includes a failure, step 316 and steps 318, 320 are performed.
In the embodiment of the present invention, as shown in fig. 6, step 304 specifically includes:
step 304a, judging whether pre-authentication data is acquired; if yes, go to step 304b; if not, go to step 306.
Step 304b, judging whether the authentication Token in the pre-authentication data is equal to the local authentication Token, if so, executing step 304c; if not, go to step 306.
Step 304c, judging whether the version code list in the installation package and the successfully authenticated version code list in the pre-authentication data are equal, if so, executing step 304d; if not, go to step 306.
And step 304d, storing the authentication result returned by the server in the pre-authentication data to a specified file.
The specified file includes an update _ auth _ sa file.
Step 304e, judging whether the authentication result returned by the server is successfully stored to the specified file, if so, executing step 312; if not, go to step 316.
Step 306, returning that the local authentication result is invalid, and continuing to execute step 308 and step 310.
Step 308, connect the server to execute the pre-authentication operation when the network connection is available, and the process ends.
And 310, setting a next night installation timer of the installation package, and ending the process.
Step 312, returning the local authentication result is successful.
And step 314, executing the installation operation of the installation package, and ending the process.
And step 316, if the local authentication result fails to be returned, continuing to execute step 318 and step 320.
And step 318, generating a prompt message, wherein the prompt message is used for reminding the user that the installation package is to be deleted and reminding the user to download the latest installation package again, and the process is ended.
And step 320, deleting the installation package and the version information thereof.
In the technical solution of the local authentication method provided in the embodiment of the present invention, the method includes: when the electronic equipment is in a first state, acquiring pre-authentication data of a downloaded installation package; obtaining a local authentication result according to the pre-authentication data; when the local authentication result includes invalidity, connecting a server to perform a pre-authentication operation when a network connection is available. The embodiment of the invention can not delete the installation package when the local authentication is invalid, thereby saving the re-downloading expense and enhancing the user experience.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and it should be understood that the electronic device 400 can perform the steps in the local authentication method described above, and details are not described here to avoid repetition. The electronic device 400 includes: a processing unit 401.
The processing unit 401 is configured to, when the electronic device is in the first state, obtain pre-authentication data of the downloaded installation package; obtaining a local authentication result according to the pre-authentication data; when the local authentication result includes invalidity, connecting a server to perform a pre-authentication operation when a network connection is available.
Optionally, when the local authentication result includes invalidity, the processing unit 401 is further configured to set a next night installation timer of the installation package.
Optionally, when the local authentication result includes success, the processing unit 401 is further configured to execute an installation operation of the installation package.
Optionally, when the local authentication result includes a failure, the processing unit 401 is further configured to delete the installation package and the version information thereof.
Optionally, the processing unit 401 is further configured to generate a prompt message, where the prompt message is used to remind the user that the installation package is to be deleted and remind the user to download the latest installation package again.
Optionally, the first status includes a night installation timer trigger of the installation package, the installation condition of the installation package is met and the network connection of the electronic device is unavailable.
Optionally, the pre-authentication data includes an authentication Token, a version code list successfully authenticated, and an authentication result returned by the server.
Optionally, when the pre-authentication data is not acquired, or the authentication Token is not equal to the local authentication Token, or the version code list in the installation package is not equal to the version code list that is successfully authenticated, the local authentication result includes invalid.
Optionally, the pre-authentication data is acquired, the authentication Token is equal to the local authentication Token, the version code list in the installation package is equal to the version code list with successful authentication, and the local authentication result includes success when the authentication result returned by the server is successfully stored in the designated file.
Optionally, the pre-authentication data is acquired, the authentication Token is equal to the local authentication Token, the version code list in the installation package is equal to the version code list with successful authentication, and the local authentication result includes failure when the authentication result returned by the server is not successfully stored in the specified file.
Optionally, the specified file comprises an update _ auth _ sa file.
Optionally, the installation package comprises an OTA package.
It should be appreciated that the electronic device 400 herein is embodied in the form of a functional unit. The term "unit" herein may be implemented in software and/or hardware, and is not particularly limited thereto. For example, a "unit" may be a software program, a hardware circuit, or a combination of both that implement the above-described functions. The hardware circuitry may include an Application Specific Integrated Circuit (ASIC), an electronic circuit, a processor (e.g., a shared processor, a dedicated processor, or a group of processors) and memory that execute one or more software or firmware programs, a combinational logic circuit, and/or other suitable components that support the described functionality.
Thus, the units of each example described in the embodiments of the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The embodiment of the application provides an electronic device, which can be a terminal device or a circuit device built in the terminal device. The electronic device may be adapted to perform the functions/steps of the above-described method embodiments.
Embodiments of the present application provide a computer-readable storage medium, which stores instructions that, when executed on a terminal device, cause the terminal device to perform the functions/steps in the above method embodiments.
Embodiments of the present application also provide a computer program product comprising instructions for causing a computer to perform the functions/steps of the above-described method embodiments when the computer program product runs on a computer or any at least one processor.
In the embodiments of the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, and means that there may be three relationships, for example, a and/or B, and may mean that a exists alone, a and B exist simultaneously, and B exists alone. Wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or multiple.
Those of ordinary skill in the art will appreciate that the various elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of electronic hardware and computer software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, any function, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing an electronic device (which may be a personal computer, a server, or a network device) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a portable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
The above description is only for the specific embodiments of the present application, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present disclosure, and all the changes or substitutions should be covered by the protection scope of the present application. The protection scope of the present application shall be subject to the protection scope of the claims.

Claims (14)

1. A local authentication method, the method comprising:
when the electronic equipment is in a first state, acquiring pre-authentication data of a downloaded installation package;
obtaining a local authentication result according to the pre-authentication data;
when the local authentication result includes invalidity, connecting a server to perform a pre-authentication operation when a network connection is available.
2. The method of claim 1, wherein when the local authentication result comprises invalid, the method further comprises:
and setting a next night installation timer of the installation package.
3. The method of claim 1, wherein when the local authentication result comprises success, the method further comprises:
and executing the installation operation of the installation package.
4. The method of claim 1, wherein when the local authentication result comprises a failure, the method further comprises:
and deleting the installation package and the version information thereof.
5. The method of claim 4, further comprising:
and generating a prompt message, wherein the prompt message is used for reminding the user that the installation package is to be deleted and reminding the user to download the latest installation package again.
6. The method of claim 1, wherein the first status comprises a night install timer trigger of the installation package, wherein an installation condition of the installation package is satisfied and a network connection of the electronic device is unavailable.
7. The method of claim 1, wherein the pre-authentication data comprises authentication Token, a version code list with successful authentication, and an authentication result returned by the server.
8. The method according to claim 7, wherein when the pre-authentication data is not obtained, or the authentication Token and the local authentication Token are not equal, or the version code list in the installation package and the version code list that is successfully authenticated are not equal, the local authentication result includes invalidity.
9. The method according to claim 7, wherein the pre-authentication data is obtained, the authentication Token is equal to the local authentication Token, the version code list in the installation package is equal to the version code list that is successfully authenticated, and the local authentication result includes success when the authentication result returned by the server is successfully stored in the designated file.
10. The method according to claim 7, wherein the pre-authentication data is obtained, the authentication Token is equal to the local authentication Token, the version code list in the installation package is equal to the version code list that the authentication succeeds, and the local authentication result includes failure when the authentication result returned by the server is not successfully stored in the designated file.
11. The method of claim 10, wherein the specified file comprises an update _ auth _ sa file.
12. The method of any of claims 1-11, wherein the installation package comprises an OTA package.
13. An electronic device, comprising a processor and a memory, wherein the memory is configured to store a computer program comprising program instructions that, when executed by the processor, cause the electronic device to perform the steps of the method according to any of claims 1-12.
14. A computer-readable storage medium, characterized in that it stores a computer program comprising program instructions which, when executed by a computer, cause the computer to carry out the method according to any one of claims 1-12.
CN202210976626.0A 2022-08-15 2022-08-15 Local authentication method and electronic equipment Active CN115495716B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202311251077.1A CN117390604A (en) 2022-08-15 2022-08-15 Local authentication method and electronic equipment
CN202210976626.0A CN115495716B (en) 2022-08-15 2022-08-15 Local authentication method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210976626.0A CN115495716B (en) 2022-08-15 2022-08-15 Local authentication method and electronic equipment

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202311251077.1A Division CN117390604A (en) 2022-08-15 2022-08-15 Local authentication method and electronic equipment

Publications (2)

Publication Number Publication Date
CN115495716A true CN115495716A (en) 2022-12-20
CN115495716B CN115495716B (en) 2023-10-10

Family

ID=84467208

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202311251077.1A Pending CN117390604A (en) 2022-08-15 2022-08-15 Local authentication method and electronic equipment
CN202210976626.0A Active CN115495716B (en) 2022-08-15 2022-08-15 Local authentication method and electronic equipment

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202311251077.1A Pending CN117390604A (en) 2022-08-15 2022-08-15 Local authentication method and electronic equipment

Country Status (1)

Country Link
CN (2) CN117390604A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016019790A1 (en) * 2014-08-04 2016-02-11 优视科技有限公司 Verification method, client, server and system for installation package
WO2016101649A1 (en) * 2014-12-22 2016-06-30 中兴通讯股份有限公司 License pre-authentication method, device and system
CN107506221A (en) * 2017-09-28 2017-12-22 阿里巴巴集团控股有限公司 Application program updating method, apparatus and equipment
CN107743115A (en) * 2016-12-22 2018-02-27 腾讯科技(深圳)有限公司 A kind of identity identifying method of terminal applies, device and system
CN107786937A (en) * 2016-08-26 2018-03-09 展讯通信(上海)有限公司 Implementation method, mobile terminal and the roam server of mobile terminal localized roaming
CN108337677A (en) * 2017-01-19 2018-07-27 阿里巴巴集团控股有限公司 Network authentication method and device
CN112187709A (en) * 2019-07-05 2021-01-05 华为技术有限公司 Authentication method, device and server
US20210157922A1 (en) * 2017-12-27 2021-05-27 China Unionpay Co., Ltd. Application management method for terminal, application server, and terminal
CN112925535A (en) * 2021-02-25 2021-06-08 广东电网有限责任公司电力调度控制中心 Method and device for installing embedded application of password chip

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7546595B1 (en) * 2004-10-14 2009-06-09 Microsoft Corporation System and method of installing software updates in a computer networking environment
CN101159896B (en) * 2007-09-19 2011-04-13 Ut斯达康通讯有限公司 Individual mobile terminal data packet downloading method
CN105979313A (en) * 2015-09-16 2016-09-28 乐视致新电子科技(天津)有限公司 Remote control upgrading method and device
CN111159657A (en) * 2019-11-22 2020-05-15 深圳智链物联科技有限公司 Application program authentication method and system
CN113885914A (en) * 2021-09-30 2022-01-04 北京达佳互联信息技术有限公司 Application program processing method and device, electronic equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016019790A1 (en) * 2014-08-04 2016-02-11 优视科技有限公司 Verification method, client, server and system for installation package
WO2016101649A1 (en) * 2014-12-22 2016-06-30 中兴通讯股份有限公司 License pre-authentication method, device and system
CN107786937A (en) * 2016-08-26 2018-03-09 展讯通信(上海)有限公司 Implementation method, mobile terminal and the roam server of mobile terminal localized roaming
CN107743115A (en) * 2016-12-22 2018-02-27 腾讯科技(深圳)有限公司 A kind of identity identifying method of terminal applies, device and system
CN108337677A (en) * 2017-01-19 2018-07-27 阿里巴巴集团控股有限公司 Network authentication method and device
CN107506221A (en) * 2017-09-28 2017-12-22 阿里巴巴集团控股有限公司 Application program updating method, apparatus and equipment
US20210157922A1 (en) * 2017-12-27 2021-05-27 China Unionpay Co., Ltd. Application management method for terminal, application server, and terminal
CN112187709A (en) * 2019-07-05 2021-01-05 华为技术有限公司 Authentication method, device and server
WO2021004392A1 (en) * 2019-07-05 2021-01-14 华为技术有限公司 Authentication method, device, and server
CN112925535A (en) * 2021-02-25 2021-06-08 广东电网有限责任公司电力调度控制中心 Method and device for installing embedded application of password chip

Also Published As

Publication number Publication date
CN115495716B (en) 2023-10-10
CN117390604A (en) 2024-01-12

Similar Documents

Publication Publication Date Title
CN110058777B (en) Method for starting shortcut function and electronic equipment
CN112399390B (en) Bluetooth connection method and related device
CN113722058B (en) Resource calling method and electronic equipment
CN112492193B (en) Method and equipment for processing callback stream
CN113168461A (en) Method for deleting security service and electronic equipment
CN114125130B (en) Method for controlling communication service state, terminal device and readable storage medium
CN114095599B (en) Message display method and electronic equipment
CN112181616B (en) Task processing method and related device
CN113254409A (en) File sharing method, system and related equipment
CN113821767A (en) Application program authority management method and device and electronic equipment
CN115129196A (en) Application icon display method and terminal
CN113452945A (en) Method and device for sharing application interface, electronic equipment and readable storage medium
CN112527093A (en) Gesture input method and electronic equipment
CN110286975B (en) Display method of foreground elements and electronic equipment
CN111372329B (en) Connection establishing method and terminal equipment
CN113438366B (en) Information notification interaction method, electronic device and storage medium
CN114915721A (en) Method for establishing connection and electronic equipment
CN112532508A (en) Video communication method and video communication device
CN114691248B (en) Method, device, equipment and readable storage medium for displaying virtual reality interface
CN114254334A (en) Data processing method, device, equipment and storage medium
CN115706916A (en) Wi-Fi connection method and device based on position information
CN114765768A (en) Network selection method and equipment
CN114828098A (en) Data transmission method and electronic equipment
CN115495716B (en) Local authentication method and electronic equipment
CN113918003A (en) Method and device for detecting time length of skin contacting screen and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant