CN114217829A - Software upgrading method, device, server and storage medium - Google Patents

Software upgrading method, device, server and storage medium Download PDF

Info

Publication number
CN114217829A
CN114217829A CN202111282418.2A CN202111282418A CN114217829A CN 114217829 A CN114217829 A CN 114217829A CN 202111282418 A CN202111282418 A CN 202111282418A CN 114217829 A CN114217829 A CN 114217829A
Authority
CN
China
Prior art keywords
upgrading
upgrade
earphone
target
software
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.)
Pending
Application number
CN202111282418.2A
Other languages
Chinese (zh)
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.)
Shenzhen Feikedi System Development Co Ltd
Original Assignee
Shenzhen Feikedi System Development 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 Shenzhen Feikedi System Development Co Ltd filed Critical Shenzhen Feikedi System Development Co Ltd
Priority to CN202111282418.2A priority Critical patent/CN114217829A/en
Publication of CN114217829A publication Critical patent/CN114217829A/en
Priority to PCT/CN2022/084593 priority patent/WO2023071052A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The application is applicable to the technical field of computers, and provides a software upgrading method, a device, a server and a storage medium, wherein the method comprises the following steps: in response to the detection of the earphone access operation, distributing an upgrading process to the accessed target earphone, wherein the upgrading process is used for carrying out software upgrading on the target earphone; controlling an upgrading process to upgrade software of the target earphone and detecting upgrading progress information of the target earphone; and responding to the upgrade progress information meeting the preset emergency stop condition, generating an emergency stop instruction according to the progress identification of the upgrade progress to control the upgrade progress to stop software upgrade on the target earphone, wherein the emergency stop instruction is used for controlling the upgrade progress to stop software upgrade on the target earphone. In the method and the device, in the earphone upgrading process, the scram instruction can be generated in time aiming at the target earphone which is abnormally upgraded, and the target earphone which is abnormally upgraded is stopped to be upgraded in time, so that program blocking caused by process blockage can be prevented, and the upgrading efficiency of earphone software is improved.

Description

Software upgrading method, device, server and storage medium
Technical Field
The present application belongs to the field of computer technologies, and in particular, to a software upgrading method, apparatus, server, and storage medium.
Background
With the development of electronic devices, the application of earphones is more and more common. When the earphone is produced in large scale, the software of the earphone is generally required to be upgraded before the software version of the earphone is determined. In the related art, it is common to perform an upgrade operation on the headset software using an upgrade script instruction, such as a Python-based upgrade script instruction or an upgrade script instruction based on other computer programming languages.
In the related art, the mode of upgrading the earphone is mostly process-blocking, that is, when the earphone software is upgraded by using the upgrade script instruction, an operator can only wait for the operation of the upgrade script instruction after starting the upgrade script instruction, and if the upgrade is abnormal in the upgrade process, the upgrade process cannot be interfered, and the software is timely called and stopped, so that the software upgrade efficiency is low.
Disclosure of Invention
The embodiment of the application provides a software upgrading method, a device, a server and a medium, and can solve the problems that in the related technology, the mode of upgrading operation of earphones is mostly process-blocked, when the earphone software is upgraded by adopting an upgrading script instruction, an operator can only wait for the operation of the upgrading script instruction after the upgrading script instruction is started, and if the upgrading process is abnormal, the upgrading process cannot be interfered and timely called for stopping, so that the software upgrading efficiency is low.
A first aspect of an embodiment of the present application provides a software upgrading method, including:
in response to the detection of the earphone access operation, distributing an upgrading process to the accessed target earphone, wherein the upgrading process is used for carrying out software upgrading on the target earphone;
controlling an upgrading process to upgrade software of the target earphone and detecting upgrading progress information of the target earphone;
and responding to the upgrade progress information meeting the preset emergency stop condition, generating an emergency stop instruction according to the progress identification of the upgrade progress to control the upgrade progress to stop software upgrade on the target earphone, wherein the emergency stop instruction is used for controlling the upgrade progress to stop software upgrade on the target earphone.
Further, the method further comprises:
determining the number of upgrading processes according to the number of target earphones accessed by earphone access operation, wherein the upgrading processes are obtained by calling target scripts for distribution;
and acquiring the process identification of each upgrading process from the operating system according to the number of the upgrading processes.
Further, acquiring a process identifier of each upgrade process from the operating system according to the number of the upgrade processes, including:
if one target earphone is accessed by the earphone access operation, an identification query instruction is sent to the operating system to obtain a process identification of the upgrading process aiming at the target earphone, and the identification query instruction is used for querying the process identification of the upgrading process corresponding to the target script.
And acquiring the process identification of each upgrading process from the operating system according to the number of the upgrading processes.
Further, acquiring a process identifier of each upgrade process from the operating system according to the number of the upgrade processes, including:
if a plurality of target earphones are accessed by earphone access operation, sending an identification query instruction to an operating system to obtain a first process identification set aiming at a target script aiming at each target earphone when an upgrading process corresponding to the target earphone is started;
after the upgrading process corresponding to the target earphone is started for a preset time, an identification query instruction is sent to an operating system to obtain a second process identification set aiming at the target script;
and determining the process identifier of the upgrading process corresponding to the target earphone according to the first process identifier set and the second process identifier set.
Further, the preset emergency stop condition comprises at least one of the following:
the maintaining time length of the upgrading progress indicated by the upgrading progress information is greater than a preset time length threshold value;
detecting an emergency stop request operation input by a user;
and detecting error information output by the upgrading process.
Further, the method further comprises:
monitoring the upgrade state information of the target earphone in the upgrade process, wherein the upgrade state indicated by the upgrade state information comprises an upgrade success state and an upgrade failure state;
and generating state prompt information for prompting the upgrading state according to the upgrading state information, and outputting the state prompt information.
Further, the method further comprises:
generating a visual image for presenting the upgrading process of the target earphone according to the preset information presentation template and the upgrading process information of the target earphone, and presenting the visual image;
wherein the visual map presents at least one of the following information:
the method comprises the steps of upgrading progress information, earphone identification of a target earphone, upgrading consumed time and upgrading result information.
A second aspect of an embodiment of the present application provides a software upgrading apparatus, including:
the process distribution unit is used for responding to the detected earphone access operation and distributing an upgrading process to the accessed target earphone, wherein the upgrading process is used for carrying out software upgrading on the target earphone;
the process control unit is used for controlling an upgrading process to upgrade software of the target earphone and detecting upgrading progress information of the target earphone;
and the upgrading emergency stop unit is used for responding to the upgrading progress information and meeting the preset emergency stop condition, generating an emergency stop instruction according to the progress identification of the upgrading progress so as to control the upgrading progress to stop software upgrading of the target earphone, wherein the emergency stop instruction is used for controlling the upgrading progress to stop software upgrading of the target earphone.
A third aspect of embodiments of the present application provides a server, including a memory, a processor, and a computer program stored in the memory and executable on the server, where the processor implements the steps of the software upgrading method provided in the first aspect when executing the computer program.
A fourth aspect of the embodiments of the present application provides a storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps of the software upgrading method provided in the first aspect are implemented.
The software upgrading method, the device, the server and the storage medium provided by the embodiment of the application have the following beneficial effects: in the earphone upgrading process, an emergency stop instruction can be generated in time aiming at the target earphone which is abnormally upgraded, and the target earphone which is abnormally upgraded is stopped being upgraded, so that program jamming caused by process blockage can be prevented, and the earphone software upgrading efficiency can be improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the embodiments or the related technical descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flowchart illustrating an implementation of a software upgrading method according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating an implementation of a software upgrade method according to another embodiment of the present application;
FIG. 3 is a flowchart illustrating an implementation of a scheme for obtaining a process identifier according to an embodiment of the present application;
FIG. 4 is a schematic illustration of a visual representation provided by an embodiment of the present application;
fig. 5 is a block diagram illustrating a software upgrading apparatus according to an embodiment of the present application;
fig. 6 is a block diagram of a server according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
In order to explain the technical means of the present application, the following examples are given below.
Referring to fig. 1, fig. 1 shows a flowchart of an implementation of a software upgrading method provided in an embodiment of the present application, including:
step 101, responding to the detected earphone access operation, allocating an upgrade process to an accessed target earphone, wherein the upgrade process is used for carrying out software upgrade on the target earphone.
The above-mentioned headset accessing operation is generally an operation for accessing a headset. The headset access operation may include, but is not limited to, at least one of: wired access operation, wireless network access operation.
In this embodiment, the execution subject of the software upgrading method is usually a server, such as a test server. In practice, a plurality of processes may be simultaneously run in the server, specifically, an upgrade process and a main process for managing the upgrade process may be run in the server, and an execution subject of the software upgrade method may be the main process in the server. The server may be hardware or software. When the server is hardware, it may be implemented as a distributed server cluster formed by multiple servers, or may be implemented as a single server. When the server is software, it may be implemented as a plurality of software or software modules, or may be implemented as a single software or software module. And is not particularly limited herein.
In this embodiment, the execution main body may detect the headset accessing operation by detecting a level change at the headset accessing interface, or may detect the headset accessing operation by a communication protocol specification in the wireless network connection. If the earphone access operation is detected, the execution main body can allocate an upgrade process to the target earphone and perform software upgrade on the target earphone. As an example, the executing agent may assign an upgrade process to the target headset as follows: the execution main body can send a process distribution request for requesting distribution of the upgrade process to the operating system, so that the operating system can distribute the upgrade process according to the process distribution request.
And 102, controlling an upgrading process to upgrade software of the target earphone, and detecting upgrading progress information of the target earphone.
The upgrade progress information is generally information for indicating an upgrade progress. In practice, the upgrade progress information may reflect a completion condition of upgrading the target earphone.
In practice, a progress parameter for recording the progress of the upgrade may be preset in the upgrade process. The execution main body may detect the upgrade progress information of the target earphone in various ways. As an example, the upgrade process may actively send the value of the progress parameter to the execution main body once every time an upgrade instruction is executed, so that the execution main body may detect the upgrade progress information of the target earphone. As another example, the execution main body may also send an instruction to the upgrade process at intervals of a preset time interval to query a value of the progress parameter, so as to detect upgrade progress information of the target earphone.
In this embodiment, the execution main body may control the upgrade process to perform software upgrade on the target earphone by sending an instruction for controlling the upgrade process to start the upgrade to the upgrade process.
And 103, responding to the situation that the upgrading progress information meets the preset emergency stop condition, generating an emergency stop instruction according to the progress identification of the upgrading progress so as to control the upgrading progress to stop software upgrading of the target earphone.
The emergency stop condition may be any of various preset conditions. As an example, the preset emergency stop condition may be that the upgrade progress indicated by the upgrade progress information does not belong to a preset progress range, or that disconnection of the earphone is detected.
The process id is generally information used to indicate a process. In practice, the Process IDentifier may be a Process IDentifier (PID) of the Process. It should be noted that the process identifier of the upgrade process is usually identification information randomly assigned by the operating system. In this way, the execution subject can query the process identifier of the upgrade process by sending an instruction to the operating system.
The scram instruction is generally used for controlling an upgrade process to stop software upgrade on the target earphone.
The emergency stop instruction generated according to the process identifier of the upgrade process may be generated by directly using the process identifier, or may be generated by combining the process identifier of the process and the name of the process.
In this embodiment, the execution main body sends the scram instruction to the upgrade process corresponding to the process identifier through the process identifier in the scram instruction, and the upgrade process executes the scram instruction to stop software upgrade of the target earphone. In practice, after the earphone software is successfully upgraded, the earphone can be disconnected and quit the upgrade, and the earphone with the failed software upgrade can be accessed again to upgrade the earphone software.
According to the software upgrading method provided by the embodiment, in the earphone upgrading process, the scram instruction can be generated in time aiming at the target earphone which is abnormally upgraded, and the target earphone which is abnormally upgraded is stopped being upgraded, so that program blocking caused by process blockage can be prevented, and the efficiency of earphone software upgrading is improved.
Referring to fig. 2, fig. 2 is a flowchart illustrating an implementation of another software upgrading method according to an embodiment of the present application, including:
step 201, in response to detecting the earphone access operation, allocating an upgrade process to the accessed target earphone, where the upgrade process is used to perform software upgrade on the target earphone.
In this embodiment, the specific operation of step 201 is substantially the same as the operation of step 101 in the embodiment shown in fig. 1, and is not described herein again.
Step 202, determining the number of upgrading processes according to the number of target earphones accessed by the earphone access operation, wherein the upgrading processes are obtained by calling target scripts for distribution.
The upgrading process is usually obtained by calling a target script. The target script described above is generally software code for implementing the function of the upgrade process. The target script may be a Python-based upgrade script or an upgrade script based on other computer programming languages.
Here, the execution agent may assign an upgrade procedure to each target headset accessed. In practice, the number of target headsets is typically equal to the number of upgrade processes. If there are 4 target earphones, the number of upgrade processes is 4, and if there are 8 target earphones, the number of upgrade processes is 8. It should be noted that, when the number of the upgrade processes is 4, the target script needs to be called 4 times to obtain 4 upgrade processes.
Step 203, acquiring the process identifier of each upgrading process from the operating system according to the number of the upgrading processes.
Here, after determining the number of upgrade processes, the execution main body may acquire the process identifier of each upgrade process from the operating system by using the specific number of upgrade processes. If the number of the upgrade processes is 1, an instruction for querying the process identifier of the upgrade process may be directly sent to the operating system, so as to obtain the process identifier of the upgrade process.
And 204, controlling an upgrading process to upgrade software of the target earphone, and detecting upgrading progress information of the target earphone.
And step 205, in response to that the upgrade progress information meets the preset emergency stop condition, generating an emergency stop instruction according to the progress identifier of the upgrade progress to control the upgrade progress to stop software upgrade on the target earphone.
In the present embodiment, the specific operation of step 204-.
In this embodiment, a plurality of upgrade processes are obtained by calling a plurality of target scripts, and the upgrade processes with the number equal to the number of the target earphones can be allocated according to the number of the accessed target earphones, so that the software of the target earphones can be flexibly upgraded.
In some optional implementation manners of this embodiment, the obtaining the process identifier of each upgrade process from the operating system according to the number of upgrade processes may include the following steps:
and if one target earphone is accessed by the earphone access operation, sending an identification query instruction to the operating system to obtain a process identification of the upgrading process of the target earphone.
And the identification query instruction is used for querying the process identification of the upgrading process corresponding to the target script.
Here, if there is one target headset accessed by the headset accessing operation, the executing agent may assign an upgrade procedure. At this time, the target script needs to be started once. The operating system can allocate a process identifier to the upgrading process, and the execution main body sends an identifier query instruction to the operating system to obtain the process identifier of the upgrading process for the target earphone.
Referring to fig. 3, fig. 3 is a flowchart illustrating an implementation of a scheme for obtaining a process identifier according to an embodiment of the present application. As shown in fig. 3, the above scheme for obtaining the process identifier may include steps 301 to 303.
Step 301, if there are a plurality of target earphones accessed by the earphone access operation, for each target earphone, when the upgrade process corresponding to the target earphone is started, an identification query instruction is sent to the operating system to obtain a first process identification set for the target script.
Wherein the identification query instruction is typically an instruction for querying the process identification. In practice, the identification query instruction is generally used to query the process identification of each upgrade process corresponding to the target script. The first process identifier set is generally a set of process identifiers of each upgrade process corresponding to the target script at a certain time.
Here, the number of process identifiers included in the first process identifier set sent by the operating system is the same as the number of upgrade scripts run by the upgrade process. When there are multiple target earphones, and for each target earphone, when the upgrade process corresponding to the target earphone is started, the execution main body may send an identifier query instruction to the operating system, so as to obtain a first process identifier set.
It should be noted that, for each target earphone, when the upgrade process of the target earphone is just triggered and started, if the execution main body sends an identifier query instruction to the operating system, at this time, the first process identifier set returned by the operating system usually does not include the process identifier of the target earphone.
Step 302, after the upgrade process corresponding to the target earphone is started for a preset time, an identifier query instruction is sent to the operating system to obtain a second process identifier set for the target script.
The preset time length is generally a preset value for indicating the time length. As an example, the preset time period may be 2 seconds.
Here, for each target earphone, after the upgrade process corresponding to the target earphone is started for a preset time period, the execution main body may send a query instruction to the operating system, so as to obtain a second process identifier set.
It should be noted that, for each target earphone, after the upgrade process corresponding to the target earphone is started for a preset time period, if the execution main body sends an identifier query instruction to the operating system, at this time, the second process identifier set returned by the operating system usually includes the process identifier of the target earphone.
Step 303, determining a process identifier of the upgrade process corresponding to the target earphone according to the first process identifier set and the second process identifier set.
Here, the executing body may subtract the first process identifier set from the second process identifier set, and finally obtain the process identifier corresponding to the target earphone that is accessed most recently. For example, if there are two target headsets, before the second target headset starts the upgrade script, an identification query instruction is sent to the operating system to obtain the first process identification set { PID1}, where the first process identification set { PID1} does not include the process identification of the second target headset. And after the second target earphone starts the upgrade script, sending an identification query instruction to the operating system to obtain a second process identification set { PID1, PID2}, wherein the second process identification set { PID1, PID2} comprises the process identification of the second target earphone. And subtracting the first process identification set { PID1} from the second process identification set { PID1, PID2} to finally obtain a process identification { PID2} corresponding to the second target earphone. By analogy, when the number of the target earphones is other numbers, the process identifier corresponding to each target earphone is obtained by the same logic method.
In the implementation mode, when the upgrading process aiming at the target script is multiple, the process identification aiming at the target script is also multiple, and the process identification aiming at the upgrading process of each target earphone can be accurately obtained by adopting a secondary query mode.
In an alternative implementation of various embodiments of the present application, the preset emergency stop condition may include at least one of:
in the first item, the maintaining time length of the upgrading progress indicated by the upgrading progress information is greater than a preset time length threshold value.
Here, the preset time period threshold value is generally a numerical value set in advance for indicating the time period. E.g., 8 minutes. For example, if the preset time threshold is 8 minutes, in the earphone upgrading process, if the duration of the upgrading process at a certain progress exceeds 8 minutes, the preset emergency stop condition is met, and at this time, the execution main body may send an emergency stop instruction to the upgrading process, and stop performing software upgrading operation on the target earphone corresponding to the upgrading process.
And a second item, detecting the emergency stop request operation input by the user.
The scram operation request is, in general, an operation for requesting scram. Here, the execution main body may detect the scram request operation input by the user through the user terminal.
And thirdly, detecting error information output by the upgrading process.
The error reporting information is usually used to prompt the software upgrading exception. As an example, the error information output by the upgrade process may be that the headset is disconnected from the execution subject during the software upgrade process. As another example, the error message output by the upgrade process may be a detection that the accessed target headset has completed the software upgrade. After the execution main body detects the error reporting information output by the upgrading process, an emergency stop instruction is produced, and the software upgrading operation of the earphone of the corresponding upgrading process is ended.
In an optional implementation manner of each embodiment of the present application, the software upgrading method may further include:
firstly, the upgrading state information of the target earphone in the upgrading process is monitored.
The upgrade status information is generally information indicating the upgrade status. The upgrade status indicated by the upgrade status information may include an upgrade successful status and an upgrade failed status. The upgrade successful status typically indicates that the upgrade was successful. The upgrade failed status typically indicates an upgrade failure.
Here, a status parameter indicating an upgrade status may be preset in the upgrade process. The execution main body can monitor the upgrading state information of the upgrading process by inquiring the value of the state parameter in the upgrading process.
Then, according to the upgrade status information, status prompt information for prompting the upgrade status is generated, and the status prompt information is output.
The status prompt message may generally include a message for prompting success of the upgrade and a message for prompting failure of the upgrade.
In practice, if the upgrade state indicated by the upgrade state information is the upgrade success state, the upgrade success information is generated; and if the upgrading state indicated by the upgrading state information is the upgrading failure state, generating upgrading failure information.
The output of the state prompt information may be that the host process directly outputs the state prompt information to the outside, for example, the host process directly sends the state prompt information to the terminal device of the user.
In an optional implementation manner of each embodiment of the present application, the software upgrading method may further include:
and generating a visual image for presenting the upgrading process of the target earphone according to the preset information presentation template and the upgrading process information of the target earphone, and presenting the visual image.
Wherein the visual map presents at least one of the following information: the method comprises the steps of upgrading progress information, earphone identification of a target earphone, upgrading consumed time and upgrading result information.
The preset information presenting template is generally a preset template for presenting information.
The above-mentioned upgrade process information of the target earphone is usually information of the target earphone in the software upgrade process.
Here, the execution subject may write the upgrade process information into a preset information presentation template to obtain a viewable view.
In practice, the display area background of the upgrade result can be changed into green to display the upgrade success, or the information of the upgrade success can be broadcasted through voice. The display of the upgrade failure information of the target earphone can be that the background of a display area of the upgrade result is changed into red to display the upgrade failure, or the information of the upgrade success is broadcasted through voice.
Fig. 4 is a schematic view of a visual representation provided by an embodiment of the present application. As shown in fig. 4, 8 target earphones can be tested simultaneously, and the content presented by the visual chart includes the total number of the target earphones subjected to software upgrade, the number of good target earphones subjected to software upgrade, that is, the number of target earphones subjected to successful upgrade, and the yield of the target earphones subjected to software upgrade, that is, the proportion of the target earphones subjected to successful upgrade to the total number of the target earphones subjected to software upgrade. In fig. 4, a visual view of the software upgrade for 8 target headsets is shown simultaneously in long lines. The first sub-diagram in the visual diagram is briefly described here. The product 1 serial port is used for indicating the serial port of the currently accessed first target earphone. The 'emergency stop' is an interactive software key, and a user can realize the emergency stop of the upgrading process corresponding to the first target earphone by clicking the 'emergency stop' key. "SN 1" is the product serial number of the target headset number one. An "upgrade progress bar" may be used to indicate the real-time upgrade progress for upgrading the target headset number one. "Result" is used to indicate the upgrade Result, for example, if the background color here changes to green, the word "PASS" or "upgrade success" is displayed, which may indicate the upgrade success, and if the background color here changes to red, the word "FAIL" or "upgrade failure" is displayed, which may indicate the upgrade failure. The "elapsed time" may indicate a real-time timing scenario for upgrading the target headset number one.
According to the software upgrading method provided by the embodiment, the software upgrading process of the earphone is visualized in a mode of presenting the visual image, so that a user can obtain various upgrading information of the earphone by looking up the visual image, the use by the user is facilitated, and the improvement of the earphone upgrading efficiency is facilitated.
Referring to fig. 5, fig. 5 is a block diagram of a software upgrading apparatus according to an embodiment of the present application, including:
a process allocation unit 501, configured to allocate an upgrade process to an accessed target earphone in response to detecting an earphone access operation, where the upgrade process is used to perform software upgrade on the target earphone;
a process control unit 502, configured to control an upgrade process to perform software upgrade on a target earphone, and detect upgrade progress information of the target earphone;
and an upgrade scram unit 503, configured to generate a scram instruction according to the process identifier of the upgrade process in response to that the upgrade progress information meets a preset scram condition, so as to control the upgrade process to stop software upgrade on the target earphone, where the scram instruction is used to control the upgrade process to stop software upgrade on the target earphone.
As an embodiment of the present application, the apparatus further includes an identifier obtaining unit (not shown in the figure). Wherein, the identification obtaining unit is used for:
determining the number of upgrading processes according to the number of target earphones accessed by earphone access operation, wherein the upgrading processes are obtained by calling target scripts for distribution;
and acquiring the process identification of each upgrading process from the operating system according to the number of the upgrading processes.
As an embodiment of the present application, if there is one target headset accessed by a headset access operation, acquiring a process identifier of each upgrade process from an operating system includes:
and sending an identification query instruction to an operating system to obtain a process identification of the upgrading process aiming at the target earphone, wherein the identification query instruction is used for querying the process identification of the upgrading process corresponding to the target script.
As an embodiment of the present application, if there are a plurality of target headsets accessed by the headset access operation, acquiring the process identifier of each upgrade process from the operating system includes:
when an upgrading process corresponding to a target earphone is started, an identification query instruction is sent to an operating system to obtain a first process identification set aiming at a target script;
after the upgrading process corresponding to the target earphone is started for a preset time, an identification query instruction is sent to an operating system to obtain a second process identification set aiming at the target script;
and determining the process identifier of the upgrading process corresponding to the target earphone according to the first process identifier set and the second process identifier set.
As an embodiment of the present application, the preset emergency stop condition includes at least one of the following:
the maintaining time length of the upgrading progress indicated by the upgrading progress information is greater than a preset time length threshold value;
detecting an emergency stop request operation input by a user;
and detecting error information output by the upgrading process.
As an embodiment of the present application, the apparatus further includes a process monitoring unit (not shown in the figure). Wherein, the process monitoring unit is used for:
monitoring the upgrade state information of the target earphone in the upgrade process, wherein the upgrade state indicated by the upgrade state information comprises an upgrade success state and an upgrade failure state;
and generating state prompt information for prompting the upgrading state according to the upgrading state information, and outputting the state prompt information.
As an embodiment of the present application, the apparatus further includes an upgrade presenting unit (not shown in the figure). Wherein, the upgrade presenting unit is used for:
generating a visual image for presenting the upgrading process of the target earphone according to the preset information presentation template and the upgrading process information of the target earphone, and presenting the visual image;
wherein the visual map presents at least one of the following information:
the method comprises the steps of upgrading progress information, earphone identification of a target earphone, upgrading consumed time and upgrading result information.
The device provided by the embodiment can generate the emergency stop instruction aiming at the target earphone with abnormal upgrading in time in the earphone upgrading process, and stop upgrading the target earphone with abnormal upgrading in time, so that program blocking caused by process blockage can be prevented, and the efficiency of earphone software upgrading is improved.
It should be understood that, in the structural block diagram of the software upgrading apparatus shown in fig. 5, each unit is used to execute each step in the embodiment corresponding to fig. 1 to 3, and each step in the embodiment corresponding to fig. 1 to 3 has been explained in detail in the above embodiment, and specific reference is made to the relevant description in the embodiment corresponding to fig. 1 to 3 and fig. 1 to 3, which is not repeated herein.
Referring to fig. 6, fig. 6 is a block diagram of a server according to an embodiment of the present application, where the server 600 of the embodiment includes: a processor 601, a memory 602, and a computer program 603, such as a program of a software upgrade method, stored in the memory 602 and executable on the processor 601. The processor 601 executes the computer program 603 to implement the steps in the embodiments of the software upgrading methods, such as the steps 101 to 103 shown in fig. 1, or 201 to 205 shown in fig. 2, and the steps 301 to 303 shown in fig. 3. Alternatively, when the processor 601 executes the computer program 603, the functions of the units in the embodiment corresponding to fig. 5, for example, the functions of the units 501 to 503 shown in fig. 5, are implemented, and please refer to the related description in the embodiment corresponding to fig. 5, which is not described herein again.
Illustratively, the computer program 603 may be partitioned into one or more units, which are stored in the memory 602 and executed by the processor 601 to complete the present application. One or more elements may be a sequence of computer program instruction segments for describing the execution of the computer program 603 in the server 600, which can perform certain functions. For example, the computer program 603 may be divided into a process distribution unit, a process control unit, and an upgrade scram unit, each of which has the above-described specific functions.
The server may include, but is not limited to, a processor 601, a memory 602. Those skilled in the art will appreciate that fig. 6 is merely an example of a server 600, and does not constitute a limitation on server 600, and may include more or fewer components than shown, or some components in combination, or different components, e.g., a turntable device may also include input output devices, network access devices, buses, etc.
The Processor 601 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 602 may be an internal storage unit of the server 600, such as a hard disk or a memory of the server 600. The memory 602 may also be an external storage device of the server 600, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the server 600. Further, the memory 602 may also include both internal storage units of the server 600 and external storage devices. The memory 602 is used to store computer programs and other programs and data required by the turntable device. The memory 602 may also be used to temporarily store data that has been output or is to be output.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated module, 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, all or part of the processes in the methods of the embodiments described above can be implemented by the present application, and a computer program that can be executed by related hardware through a computer program can be stored in a computer readable storage medium, and when the computer program is executed by a processor, the steps of the embodiments of the methods described above can be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, in accordance with legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunications signals.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A method of upgrading software, comprising:
in response to the detection of the earphone access operation, distributing an upgrading process to an accessed target earphone, wherein the upgrading process is used for carrying out software upgrading on the target earphone;
controlling the upgrading process to upgrade the software of the target earphone, and detecting the upgrading process information of the target earphone;
and in response to that the upgrade progress information meets a preset emergency stop condition, generating an emergency stop instruction according to the progress identification of the upgrade progress to control the upgrade progress to stop software upgrade on the target earphone, wherein the emergency stop instruction is used for controlling the upgrade progress to stop software upgrade on the target earphone.
2. The software upgrading method according to claim 1, characterized in that the method further comprises:
determining the number of the upgrading processes according to the number of target earphones accessed by the earphone access operation, wherein the upgrading processes are obtained by calling target scripts for distribution;
and acquiring the process identification of each upgrading process from an operating system according to the number of the upgrading processes.
3. The software upgrading method according to claim 2, wherein the obtaining the process identifier of each upgrading process from the operating system according to the number of upgrading processes includes:
if one target earphone is accessed by the earphone access operation, sending an identification query instruction to an operating system to obtain a process identification of the upgrading process aiming at the target earphone, wherein the identification query instruction is used for querying the process identification of the upgrading process corresponding to the target script.
4. The software upgrading method according to claim 2, wherein the obtaining the process identifier of each upgrading process from the operating system according to the number of upgrading processes includes:
if a plurality of target earphones are accessed by the earphone access operation, sending an identification query instruction to the operating system to obtain a first process identification set aiming at the target script aiming at each target earphone when the upgrading process corresponding to the target earphone is started;
after the upgrading process corresponding to the target earphone is started for a preset time, sending the identification query instruction to the operating system to obtain a second process identification set aiming at the target script;
and determining the process identifier of the upgrading process corresponding to the target earphone according to the first process identifier set and the second process identifier set.
5. The software upgrading method according to any one of claims 1 to 4, characterized in that the preset emergency stop conditions comprise at least one of:
the maintaining time length of the upgrading progress indicated by the upgrading progress information is greater than a preset time length threshold value;
detecting an emergency stop request operation input by a user;
and detecting error information output by the upgrading process.
6. The software upgrading method according to claim 1, characterized in that the method further comprises:
monitoring the upgrade state information of the target earphone in the upgrade process, wherein the upgrade state indicated by the upgrade state information comprises an upgrade success state and an upgrade failure state;
and generating state prompt information for prompting the upgrading state according to the upgrading state information, and outputting the state prompt information.
7. The software upgrading method according to claim 1, characterized in that the method further comprises:
generating a visual image for presenting the upgrading process of the target earphone according to a preset information presentation template and the upgrading process information of the target earphone, and presenting the visual image;
wherein the visual presentation of at least one of the following information:
the updating progress information, the earphone identification of the target earphone, the updating time consumption and the updating result information.
8. An apparatus for upgrading software, comprising:
the process distribution unit is used for responding to the detection of the earphone access operation and distributing an upgrading process to the accessed target earphone, wherein the upgrading process is used for carrying out software upgrading on the target earphone;
the process control unit is used for controlling the upgrading process to carry out software upgrading on the target earphone and detecting upgrading progress information of the target earphone;
and the upgrading emergency stop unit is used for responding to the upgrading progress information and meeting a preset emergency stop condition, generating an emergency stop instruction according to the progress identification of the upgrading progress so as to control the upgrading progress to stop software upgrading of the target earphone, wherein the emergency stop instruction is used for controlling the upgrading progress to stop software upgrading of the target earphone.
9. A server comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the software upgrade method as claimed in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out a software upgrading method as claimed in any one of claims 1 to 7.
CN202111282418.2A 2021-11-01 2021-11-01 Software upgrading method, device, server and storage medium Pending CN114217829A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111282418.2A CN114217829A (en) 2021-11-01 2021-11-01 Software upgrading method, device, server and storage medium
PCT/CN2022/084593 WO2023071052A1 (en) 2021-11-01 2022-03-31 Software upgrade method and apparatus, and server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111282418.2A CN114217829A (en) 2021-11-01 2021-11-01 Software upgrading method, device, server and storage medium

Publications (1)

Publication Number Publication Date
CN114217829A true CN114217829A (en) 2022-03-22

Family

ID=80696397

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111282418.2A Pending CN114217829A (en) 2021-11-01 2021-11-01 Software upgrading method, device, server and storage medium

Country Status (2)

Country Link
CN (1) CN114217829A (en)
WO (1) WO2023071052A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023071052A1 (en) * 2021-11-01 2023-05-04 深圳市飞科笛系统开发有限公司 Software upgrade method and apparatus, and server and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10433075B2 (en) * 2017-09-12 2019-10-01 Whisper.Ai, Inc. Low latency audio enhancement
CN108874421B (en) * 2018-06-15 2020-08-28 歌尔科技有限公司 TWS earphone, upgrading method and device thereof, and storage medium
CN108804123B (en) * 2018-06-15 2020-08-28 歌尔科技有限公司 TWS earphone, upgrading method and device thereof, and storage medium
CN114217829A (en) * 2021-11-01 2022-03-22 深圳市飞科笛系统开发有限公司 Software upgrading method, device, server and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023071052A1 (en) * 2021-11-01 2023-05-04 深圳市飞科笛系统开发有限公司 Software upgrade method and apparatus, and server and storage medium

Also Published As

Publication number Publication date
WO2023071052A1 (en) 2023-05-04

Similar Documents

Publication Publication Date Title
WO2021180025A1 (en) Message processing method and apparatus, electronic device and medium
CN109710425B (en) Message monitoring method and device
CN107729213B (en) Background task monitoring method and device
CN110309661A (en) A kind of sensitive data access right management method and device based on control stream
CN114201197A (en) Firmware upgrading method and device, electronic equipment and readable storage medium
CN114217829A (en) Software upgrading method, device, server and storage medium
CN113489653A (en) Message sending method and device and computer equipment
CN105635200B (en) Information processing method, electronic equipment, server and system
CN110399264B (en) FRU information management method, device and equipment
CN110881224B (en) Network long connection method, device, equipment and storage medium
CN105824622B (en) Data processing method and electronic equipment
CN108196999A (en) Server B MC obtains the method and device of GPU temperature
CN112214437B (en) Storage device, communication method and device and computer readable storage medium
CN114238021A (en) SDK interface positioning method, device, equipment and computer storage medium
CN114218142A (en) USB self-adaptive communication method, system and medium for self-service terminal
CN110113187B (en) Configuration updating method and device, configuration server and configuration system
CN113791887A (en) Audio task priority management method, device and system
CN113220342A (en) Centralized configuration method and device, electronic equipment and storage medium
CN113867831A (en) Intelligent device control method, intelligent device, storage medium and electronic device
CN111352529A (en) Method, device, terminal and storage medium for reporting touch event
CN113127001B (en) Method, device, equipment and medium for monitoring code compiling process
CN111639089B (en) Transaction processing method, transaction processing device, electronic equipment and computer readable storage medium
CN112988180B (en) Control method and device of embedded equipment
CN111257683B (en) Prompting method and device for electrostatic discharge test
CN111540133B (en) Method and device for detecting state of external equipment and related 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