CN107911248A - Upgrade method and device - Google Patents

Upgrade method and device Download PDF

Info

Publication number
CN107911248A
CN107911248A CN201711205376.6A CN201711205376A CN107911248A CN 107911248 A CN107911248 A CN 107911248A CN 201711205376 A CN201711205376 A CN 201711205376A CN 107911248 A CN107911248 A CN 107911248A
Authority
CN
China
Prior art keywords
message forwarding
memory field
upgrade
forwarding application
application
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
CN201711205376.6A
Other languages
Chinese (zh)
Other versions
CN107911248B (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201711205376.6A priority Critical patent/CN107911248B/en
Publication of CN107911248A publication Critical patent/CN107911248A/en
Application granted granted Critical
Publication of CN107911248B publication Critical patent/CN107911248B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the present application discloses upgrade method and device.One embodiment of this method includes:The upgrade command of object message forwarding application message is included in response to receiving, object message forwarding application message is verified, wherein, which is used to indicate that by original message forwarding application upgrade be object message forwarding application;In response to determining that verification passes through, object message forwarding application is obtained;When in the second memory field, the quantity of established connection is default value, the original message forwarding application upgrade which is run is object message forwarding application;When in the first memory field, the quantity of established connection is the default value, the original message forwarding application upgrade which is run is object message forwarding application.This embodiment improves the adaptability of the heat upgrading under big flow high concurrent scene.

Description

Upgrade method and device
Technical field
The invention relates to field of computer technology, and in particular to Internet technical field, more particularly to upgrading side Method and device.
Background technology
With the development of computer technology, for the continuation consideration and the processing of abnormal conditions of product iteration, message The heat upgrading of forwarding application is a unavoidable process.Message forwarding in the industry is applied under different application scenarios at present The upgrade method of use mainly includes replacing kernel module, the former process of new process substitution etc..
In general, in the case where message forwarding capability is completed by kernel module, existing way is by unloading in legacy version Core module simultaneously loads the mode of the kernel module of new version and is upgraded, thus can not accomplish online service nondestructive upgrading;Reporting When literary forwarding capability is performed by User space, by creating new process while original carries out offer service, new process is inherited The mode that service is provided after the filec descriptor of former process is upgraded, but this mode is limited by forwarding performance, can not flowed greatly Used under amount, the scene of high concurrent.
The content of the invention
The embodiment of the present application proposes upgrade method and device.
In a first aspect, the embodiment of the present application provides a kind of upgrade method of server, the Installed System Memory of server is divided into First memory field and the second memory field, the first memory field and the operation of the second memory field have original message forwarding to apply, this method bag Include:The upgrade command of object message forwarding application message is included in response to receiving, object message forwarding application message is carried out Verification, wherein, upgrade command is used to indicate that by original message forwarding application upgrade be object message forwarding application;In response to determining Verification passes through, and obtains object message forwarding application;When in the second memory field, the quantity of established connection is default value, by The original message forwarding application upgrade that two memory fields are run is object message forwarding application;In the established company in the first memory field When the quantity connect is default value, the original message forwarding application upgrade that the first memory field is run should for object message forwarding With.
In certain embodiments, when the quantity of the established connection in the second memory field is default value, by the second memory The original message forwarding application upgrade that area is run is object message forwarding application, including:Please in response to receiving message forwarding Ask, whether the quantity for determining the established connection in the second memory field is default value, if so, the original that the second memory field is run The forwarding application upgrade of beginning message is object message forwarding application, is created in the second memory field that operation has object message forwarding application Connection, and update the quantity of the established connection in the second memory field.
In certain embodiments, after whether the quantity for determining the established connection in the second memory field is default value, When in the second memory field, the quantity of established connection is default value, the original message forwarding that the second memory field is run should With object message forwarding application is upgraded to, further include:Quantity in response to determining the established connection in the second memory field is not pre- If numerical value, create and connect in the first memory field, and update the quantity of the established connection in the first memory field.
In certain embodiments, when the quantity of the established connection in the first memory field is default value, by the first memory The original message forwarding application upgrade that area is run is object message forwarding application, including:Please in response to receiving message forwarding Ask, whether the quantity for determining the established connection in the first memory field is default value, if so, the original that the first memory field is run The forwarding application upgrade of beginning message is object message forwarding application, and random selection operation has the first memory of object message forwarding application Either memory area in area and the second memory field, creates connection in selected memory field, and updates selected memory field The quantity of established connection.
In certain embodiments, after whether the quantity for determining the established connection in the first memory field is default value, When in the first memory field, the quantity of established connection is default value, the original message forwarding that the first memory field is run should With object message forwarding application is upgraded to, further include:Quantity in response to determining the established connection in the first memory field is not pre- If numerical value, create and connect in the second memory field, and update the quantity of the established connection in the second memory field.
In certain embodiments, in response to before receiving comprising object message forwarding application message upgrade command, being somebody's turn to do Method further includes:In response to receiving message forwarding request, randomly choose any interior in the first memory field and the second memory field Area is deposited, using selected memory field as target memory area, creates and connects in target memory area, and it is built to update target memory area The quantity of vertical connection.
In certain embodiments, object message forwarding application message includes at least one of following:Object message forwarding application Path, object message forwarding application title, object message forwarding application version number, perform updating operation user letter Breath, performs the operating time of updating operation, the check information of object message forwarding application.
Second aspect, the embodiment of the present application provide a kind of update device of server, and the Installed System Memory of server is divided into First memory field and the second memory field, the first memory field and the operation of the second memory field have original message forwarding to apply, the device bag Include:Verification unit, is configured to the upgrade command for including object message forwarding application message in response to receiving, to object message Forwarding application message is verified, wherein, upgrade command is used to indicate to forward application upgrade for object message to turn original message Hair application;Acquiring unit, is configured to, in response to determining that verification passes through, obtain object message forwarding application;First upgrade unit, It is configured to the original report that when the quantity of the established connection in the second memory field is default value, the second memory field is run Text forwarding application upgrade is object message forwarding application;Second upgrade unit, is configured in the established company in the first memory field When the quantity connect is default value, the original message forwarding application upgrade that the first memory field is run should for object message forwarding With.
In certain embodiments, the first upgrade unit is further configured to:In response to receiving message forwarding request, really Whether the quantity of the fixed established connection in second memory field is default value, if so, the original report that the second memory field is run Text forwarding application upgrade is object message forwarding application, creates and connects in the second memory field that operation has object message forwarding application Connect, and update the quantity of the established connection in the second memory field.
In certain embodiments, the first upgrade unit is further configured to:In response to determining that the second memory field has been established The quantity of connection be not default value, create and connect in the first memory field, and update the established connection in the first memory field Quantity.
In certain embodiments, the second upgrade unit is further configured to:In response to receiving message forwarding request, really Whether the quantity of the fixed established connection in first memory field is default value, if so, the original report that the first memory field is run Text forwarding application upgrade for object message forwarding application, random selection operation have object message forwarding application the first memory field and Either memory area in second memory field, creates connection in selected memory field, and it is built to update selected memory field The quantity of vertical connection.
In certain embodiments, the second upgrade unit is further configured to:In response to determining that the first memory field has been established The quantity of connection be not default value, create and connect in the second memory field, and update the established connection in the second memory field Quantity.
In certain embodiments, which further includes:Creating unit, being configured to please in response to receiving message forwarding Ask, the either memory area in the first memory field and the second memory field is randomly choosed, using selected memory field as target memory Area, creates in target memory area and connects, and updates the quantity of the established connection in target memory area.
In certain embodiments, object message forwarding application message includes at least one of following:Object message forwarding application Path, object message forwarding application title, object message forwarding application version number, perform updating operation user letter Breath, performs the operating time of updating operation, the check information of object message forwarding application.
The third aspect, the embodiment of the present application provide a kind of server, including:One or more processors;Storage device, For storing one or more programs, when one or more programs are executed by one or more processors so that one or more Processor is realized such as the method for any embodiment in upgrade method.
Fourth aspect, the embodiment of the present application provide a kind of computer-readable recording medium, are stored thereon with computer journey Sequence, is realized such as the method for any embodiment in upgrade method when which is executed by processor.
Upgrade method provided by the embodiments of the present application and device, are turned by docking the object message in received upgrade command Hair application message is verified, and object message forwarding application is then obtained after verification passes through, built in the second memory field afterwards It is the target report by the original message forwarding application upgrade that the second memory field is run when the quantity of vertical connection is default value Text forwarding application, finally when the quantity of the established connection in the first memory field is the default value, by the first memory field institute Operation original message forwarding application upgrade for the object message forwarding application so that avoid replace kernel module so that business by Damage, it can be achieved that the upgrading of online service nondestructive, meanwhile, different from substituting former proceeding method to be limited by forwarding performance using new process, Upgrade method provided in this embodiment and device can use under big flow high concurrent scene, realize big flow high concurrent scene Under message forwarding application heat upgrading so that improve under big flow high concurrent scene heat upgrading adaptability.
Brief description of the drawings
By reading the detailed description made to non-limiting example made with reference to the following drawings, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that this application can be applied to exemplary system architecture figure therein;
Fig. 2 is the flow chart according to one embodiment of the upgrade method of the application;
Fig. 3 is the schematic diagram according to an application scenarios of the upgrade method of the application;
Fig. 4 is the flow chart according to another embodiment of the upgrade method of the application;
Fig. 5 is the structure diagram according to one embodiment of the update device of the application;
Fig. 6 is adapted for the structure diagram of the computer system of the server for realizing the embodiment of the present application.
Embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to It illustrate only easy to describe, in attached drawing and invent relevant part with related.
It should be noted that in the case where there is no conflict, the feature in embodiment and embodiment in the application can phase Mutually combination.Describe the application in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1, which is shown, can apply the upgrade method of the application or the exemplary system architecture 100 of update device.
As shown in Figure 1, system architecture 100 can include terminal device 101,102,103, network 104,106, message forwarding Server 105 and background server 107,108,109.Network 104 is in terminal device 101,102,103 and message forwarding clothes The medium of communication link is provided between business device 105;Network 106 to message forwarding server 105 and background server 107, The 108th, the medium of communication link is provided between 109.Network 104,106 can include various connection types, such as wired, channel radio Believe link or fiber optic cables etc..
User can be interacted with using terminal equipment 101,102,103 by network 104 with message forwarding server 105, with Receive or send message (such as message forwarding request) etc..Various communication visitors can be installed on terminal device 101,102,103 Family end is applied, such as web browser applications, the application of shopping class, searching class application, instant messaging tools, mailbox client, society Hand over platform software etc..
Terminal device 101,102,103 can have a display screen and a various electronic equipments that supported web page browses, bag Include but be not limited to smart mobile phone, tablet computer, E-book reader, MP3 player (Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio aspect 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert's compression standard audio aspect 4) it is player, on knee portable Computer and desktop computer etc..
Message forwarding server 105 can run message forwarding application (such as, it is possible to achieve the journey of message forwarding capability Sequence, software, binary file etc.).The Installed System Memory of message forwarding server 105 can be divided into the first memory field and the second memory Area, the first memory field and the second memory field can run original message forwarding application.Message forwarding server 105 can receive Upgrade command, and the object message forwarding application message in upgrade command is verified, can also be successively to the second memory field Upgraded with the original message forwarding application run in the first memory field, upgrade to object message forwarding application.In addition, report Literary forwarding server 105 can also be interacted by network 106 and background server 107,108,109, and be turned based on message The connection of terminal device 101,102,103 and background server 107,108,109 is established in hair request, and generates link information etc..
It should be noted that the upgrade method that the embodiment of the present application is provided generally is performed by message forwarding server 105, Correspondingly, update device is generally positioned in message forwarding server 105.
It should be understood that the number of the terminal device, network and server in Fig. 1 is only schematical.According to realizing need Will, can have any number of terminal device, network, message forwarding server and background server.
With continued reference to Fig. 2, the flow of one embodiment of the upgrade method for server according to the application is shown 200.The Installed System Memory of the server is divided into the first memory field and the second memory field, first memory field and second memory Area's operation has original message forwarding application, and the flow 200 of the upgrade method, comprises the following steps:
Step 201, the upgrade command of object message forwarding application message is included in response to receiving, object message is forwarded Application message is verified.
In the present embodiment, electronic equipment (such as the message forwarding server shown in Fig. 1 of upgrade method operation thereon 105) upgrade command of object message forwarding application message is included in response to receiving, application message can be forwarded to object message Verified.Wherein, above-mentioned upgrade command, which can serve to indicate that, answers original message forwarding application upgrade for object message forwarding With.Herein, above-mentioned object message forwarding application message can include forwarding with above-mentioned object message applying relevant various information, Such as above-mentioned object message forwards the path applied, title, creation time, founder's information etc..It should be noted that to above-mentioned Object message forwarding application message verified, can by by above-mentioned object message forward application message in each information with Preset corresponding information carries out matched mode and is verified.Each in application message is forwarded for above-mentioned object message Information, if the information and default corresponding information match, can determine that the information passes through verification;If it is not, then can be true The fixed information is not validated.Each information in response to determining to be included can then determine above-mentioned target report by verification Text forwarding application message passes through verification;, then can be true in response to determining in included information there are not validated information Fixed above-mentioned object message forwarding application message is not validated.
Step 202, in response to determining that verification passes through, object message forwarding application is obtained.
In the present embodiment, in response to determining that verification passes through, above-mentioned electronic equipment can obtain above-mentioned object message forwarding Using.Specifically, due to above-mentioned object message forwarding application message can include above-mentioned object message forwarding application path and The information such as title, above-mentioned electronic equipment can obtain the above-mentioned object message consistent with above-mentioned title directly from above-mentioned path and turn Hair application.
Step 203, when the quantity of the established connection in the second memory field is default value, the second memory field is run Original message forwarding application upgrade for object message forwarding application.
In the present embodiment, above-mentioned electronic equipment can be default value in the quantity of the established connection in the second memory field When (such as 0), the original message forwarding application upgrade that the second memory field is run is object message forwarding application.
In practice, client (such as terminal device 101,102,103 shown in Fig. 1) sends message to above-mentioned electronic equipment After forwarding request, above-mentioned electronic equipment can establish the client and background server (such as background server 107 shown in Fig. 1, 108th, connection 109), and generate link information.Wherein, above-mentioned link information can include:The port numbers of the client, the visitor The IP address (Internet Protocol Address, Internet protocol address) at family end, the IP address of background server, after The port numbers of platform server, TCP (Transmission Control Protocol, transmission control protocol) sequence number, ACK (Acknowledgement, confirm character) number, statistical information (such as message number) etc..Receiving renewal request and target After message forwarding application message verification passes through, above-mentioned electronics often receives the message forwarding request that a client is sent, , can be the if not above-mentioned default value to determine whether the established connection number in the second memory field is above-mentioned default value Connection is established in one memory field.After the connection number of the second memory field falls to above-mentioned default value, by above-mentioned second memory field institute The original message forwarding application upgrade of operation is object message forwarding application.
In the present embodiment, the original message that above-mentioned electronic equipment can be run the second memory field by following steps Application upgrade is forwarded as object message forwarding application:The first step, above-mentioned electronic equipment can load above-mentioned object message forwarding should With.Second step, reads dynamic link library (Dynamic Link Library, DLL) file.In practice, dynamic link library file It is a kind of not executable binary program file, code and other moneys necessary to it allows procedure sharing execution special duty Source.It should be noted that above-mentioned upgrade command can also include path and the file name of above-mentioned dynamic link library.Above-mentioned electronics Equipment can extract the binary program file consistent with this document title, i.e. dynamic link library file directly from the path. 3rd step, can read the function name in above-mentioned dynamic link library file.4th step, renewal function pointer.Herein, updating After function pointer, follow-up message is that the function after renewal can be used to be handled.5th step, updates version information.Herein, on State electronic equipment can by a data structure recording version information, including upgrade every time version number, the operating time, user The information such as information.
Step 204, when the quantity of the established connection in the first memory field is default value, the first memory field is run Original message forwarding application upgrade for object message forwarding application.
In the present embodiment, above-mentioned electronic equipment can be default value in the quantity of the established connection in the first memory field When, the original message forwarding application upgrade that the first memory field is run is object message forwarding application.In above-mentioned second memory After the original message forwarding application upgrade that area is run is object message forwarding application, the above-mentioned above-mentioned electronics of electronic equipment often connects The message forwarding request that a client is sent is received, can determine whether the established connection number in the first memory field is above-mentioned Default value, if not above-mentioned default value, can establish in the second memory field and connect.When the connection number of the first memory field declines After above-mentioned default value, the original message forwarding application upgrade that above-mentioned first memory field is run should for object message forwarding With.
In the present embodiment, above-mentioned electronic equipment can be transported the first memory field by the mode identical with step 203 Capable original message forwarding application upgrade is object message forwarding application, and details are not described herein.
With continued reference to Fig. 3, Fig. 3 is a schematic diagram according to the application scenarios of the upgrade method of the present embodiment.Fig. 3's In application scenarios, the Installed System Memory of message forwarding server is divided into the first memory field 301 and the second memory field 302, the first memory The operation of 301 and second memory field 302 of area has the message forwarding application of original version (as shown in label 303).Message forwarding service Device carries out school after the upgrade command comprising object message forwarding application message is received, to object message forwarding application message Test, obtain the message forwarding application of target version.Then, will when the quantity of 302 established connection of the second memory field is 0 The message forwarding application upgrade for the original version that second memory field is run applies (such as label for the message forwarding of target version 304 show).Afterwards, when the quantity of 301 established connection of the first memory field is 0, original that the first memory field 301 is run The message forwarding application upgrade of beginning version forwards application (as shown in label 305) for the message of target version.
The method that above-described embodiment of the application provides, should by docking the forwarding of the object message in received upgrade command Verified with information, object message forwarding application is then obtained after verification passes through, it is established in the second memory field afterwards When the quantity of connection is default value, the original message forwarding application upgrade that the second memory field is run turns for the object message Hair application, finally when the quantity of the established connection in the first memory field is the default value, which is run Original message forwarding application upgrade be object message forwarding application, so as to avoid replacing kernel module so that business is damaged, Line service lossless upgrade is may be implemented in, meanwhile, different from substituting former proceeding method to be limited by forwarding performance using new process, this reality The upgrade method and device for applying example offer can use under big flow high concurrent scene, realize under big flow high concurrent scene The heat upgrading of message forwarding application, so as to improve the adaptability of the heat upgrading under big flow high concurrent scene.
With further reference to Fig. 4, it illustrates the flow 400 of another embodiment of the upgrade method for server.Should The Installed System Memory of server is divided into the first memory field and the second memory field, and first memory field is run with second memory field There is original message forwarding application, the flow 400 of the upgrade method, comprises the following steps:
Step 401, in response to receiving message forwarding request, appointing in the first memory field and the second memory field is randomly choosed One memory field, using selected memory field as target memory area, creates in target memory area and connects, and update target memory area The quantity of established connection.
In the present embodiment, electronic equipment (such as the message forwarding server shown in Fig. 1 of upgrade method operation thereon 105) in response to receiving message forwarding request, appointing in above-mentioned first memory field and above-mentioned second memory field can be randomly choosed One memory field, using selected memory field as target memory area, creates in above-mentioned target memory area and connects, and update above-mentioned mesh Mark the quantity of the established connection in memory field.Herein, above-mentioned message forwarding request can be client (such as end shown in Fig. 1 End equipment 101,102,103) send.It should be noted that above-mentioned client can pass through wired connection mode or wireless Connection mode sends above-mentioned message forwarding request to above-mentioned electronic equipment.It is pointed out that above-mentioned radio connection can be with Including but not limited to 3G/4G connections, WiFi connections, bluetooth connection, WiMAX connections, Zigbee connections, UWB (ultra Wideband) connection and other currently known or exploitation in the future radio connections.
Step 402, the upgrade command of object message forwarding application message is included in response to receiving, object message is forwarded Application message is verified.
In the present embodiment, the upgrade command of object message forwarding application message is included in response to receiving, can be to mesh Mark message forwarding application message is verified.Wherein, above-mentioned upgrade command, which can serve to indicate that, forwards application to rise original message Level is object message forwarding application.Herein, above-mentioned object message forwarding application message can include at least one of following:Above-mentioned mesh The path of mark message forwarding application, the title of above-mentioned object message forwarding application, above-mentioned object message forward the version number of application, The user information of updating operation is performed, performs the operating time of updating operation, the check information of above-mentioned object message forwarding application. Wherein, above-mentioned check information can be MD5 (the Message Digest of the binary file of above-mentioned object message forwarding application Algorithm 5, Message Digest Algorithm 5) value.
Can be to above-mentioned object message it should be noted that being verified to above-mentioned object message forwarding application message Each information that forwarding application message is included is verified.Verify and pass through in response to each information for determining to be included, then It can determine that above-mentioned object message forwarding application message passes through verification;Do not pass through school in response to determining to exist in included information The information tested, then can determine that above-mentioned object message forwarding application message is not validated.As an example, to above-mentioned object message The path of forwarding application is verified, and can be whether there is by the definite path to determine check results, should if being not present Path is not validated;If in the presence of path verification passes through.The title of above-mentioned object message forwarding application is verified, Can by determining whether the binary file that matches with the title determines check results in above-mentioned path, if there are this two Binary file, then the title pass through verification;If the binary file is not present, the title is not validated.To above-mentioned target Whether the version number of message forwarding application is verified, can be by determining the version indicated by the version number newly in above-mentioned original Message forwards the version applied to determine whether by verification, if newly in the version of above-mentioned original message forwarding application, the version This number passes through verification;If the not new version with the forwarding application of above-mentioned original message, the version number is not validated.To performing liter The user information of level operation is verified, can be by determining whether the user indicated by the user's information possesses hot upgrading authority To determine whether that, if possessing, the user's information passes through verification by verification;If not possessing, the user's information does not pass through school Test.The operating time for performing updating operation is verified, can be by determining whether the operating time is more than last perform The operating time of updating operation determine whether by verification, if more than, then the operating time pass through verification;, should if being not more than Operating time is not validated.The check information of above-mentioned object message forwarding application is verified, can be by will be above-mentioned MD5 values carry out matched mode with preset value and whether determine above-mentioned check information by verification, if matching, above-mentioned check information Pass through verification;If mismatching, above-mentioned check information is not validated.
Step 403, in response to determining that verification passes through, object message forwarding application is obtained.
In the present embodiment, in response to determining that verification passes through, electronic equipment can obtain object message forwarding application.Specifically Ground, sets since object message forwarding application message can include information, the electronics such as path and the title of object message forwarding application It is standby that the object message forwarding application consistent with title can be obtained directly from path.
Step 404, in response to receive message forwarding request, determine the established connection in the second memory field quantity whether For above-mentioned default value, answered if so, the original message that the second memory field is run forwards application upgrade to be forwarded for object message With, there is object message to forward the second memory field establishment applied to connect running, and the renewal established connection in the second memory field Quantity.
In the present embodiment, request is forwarded in response to receiving the message of client transmission, above-mentioned electronic equipment can be true Whether the quantity of the fixed above-mentioned established connection in second memory field is default value (such as 0).If so, can be by the second memory field The original message forwarding application upgrade run is object message forwarding application, then, has object message forwarding application in operation The second memory field create connection, and update the established connection in the second memory field quantity.
Step 405, in response to determining that the quantity of the established connection in the second memory field is not default value, in the first memory Area creates connection, and updates the quantity of the established connection in the first memory field.
In the present embodiment, above-mentioned electronic equipment is in response to determining the quantity of the above-mentioned established connection in second memory field not For above-mentioned default value, it can create and connect in above-mentioned first memory field, and update the number of the established connection in the first memory field Amount.Then, step 404 can be re-executed.
Step 406, the original message forwarding application upgrade run in the second memory field applies it for object message forwarding Afterwards, in response to receiving message forwarding request, whether the quantity for determining the established connection in the first memory field is default value, if It is that the original message forwarding application upgrade for being run the first memory field has for object message forwarding application, random selection operation Either memory area in the first memory field and the second memory field of object message forwarding application, creates in selected memory field Connection, and update the quantity of the established connection in selected memory field.
In the present embodiment, the original message forwarding application upgrade run in the second memory field should for object message forwarding With afterwards, above-mentioned electronic equipment is in response to receiving message forwarding request, it may be determined that the established connection in the first memory field Whether quantity is above-mentioned default value.If so, the original message that above-mentioned first memory field is run can be forwarded application upgrade Forward and apply for object message, and randomly choose operation to have above-mentioned first memory field of above-mentioned object message forwarding application and above-mentioned Either memory area in second memory field, creates connection in selected memory field, and it is built to update selected memory field The quantity of vertical connection.
It should be noted that operation has above-mentioned object message forwarding should in above-mentioned first memory field and the second memory field With rear, message forwarding request is received in response to above-mentioned electronic equipment, step 401 can be re-executed.
Step 407, in response to determining that the quantity of the established connection in the first memory field is not default value, in the second memory Area creates connection, and updates the quantity of the established connection in the second memory field.
In the present embodiment, above-mentioned electronic equipment is in response to determining the quantity of the above-mentioned established connection in first memory field not For above-mentioned default value, it can create and connect in above-mentioned second memory field, and update the above-mentioned established connection in second memory field Quantity.Then, step 406 can be re-executed.
Figure 4, it is seen that compared with the corresponding embodiments of Fig. 2, the flow 400 of the upgrade method in the present embodiment is prominent Performed step after message forwarding is asked is gone out under three kinds of states to receive.Thus, the scheme of the present embodiment description can be real Present line service lossless upgrade, in the adaptability for improving the heat upgrading under big flow high concurrent scene, improves message and turns The flexibility of hair application heat upgrading.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, this application provides a kind of update device One embodiment, the device embodiment is corresponding with the embodiment of the method shown in Fig. 2, which specifically can be applied to server In, the Installed System Memory of the server is divided into the first memory field and the second memory field, first memory field and second memory Area's operation has original message forwarding application.
As shown in figure 5, the update device 500 described in the present embodiment includes:Verification unit 501, is configured in response to connecing The upgrade command for including object message forwarding application message is received, above-mentioned object message forwarding application message is verified, its In, above-mentioned upgrade command is used to indicate that by original message forwarding application upgrade be object message forwarding application;Acquiring unit 502, It is configured to, in response to determining that verification passes through, obtain above-mentioned object message forwarding application;First upgrade unit 503, is configured to When the quantity of the above-mentioned established connection in second memory field is default value, original report that above-mentioned second memory field is run Text forwarding application upgrade is the forwarding application of above-mentioned object message;Second upgrade unit 504, is configured in above-mentioned first memory field When the quantity of established connection is above-mentioned default value, the original message forwarding application that above-mentioned first memory field is run rises Level is the forwarding application of above-mentioned object message.
In the present embodiment, verification unit 501 is ordered in response to receiving the upgrading for including object message forwarding application message Order, verifies object message forwarding application message.
In the present embodiment, acquiring unit 502 obtains object message forwarding application in response to determining that verification passes through.
In the present embodiment, the first upgrade unit 503 is default value in the quantity of the established connection in the second memory field When, the original message forwarding application upgrade that the second memory field is run is object message forwarding application.
In the present embodiment, the second upgrade unit 504 is default value in the quantity of the established connection in the first memory field When, the original message forwarding application upgrade that the first memory field is run is object message forwarding application.
In some optional implementations of the present embodiment, above-mentioned first upgrade unit 503 can further configure use In in response to receiving message forwarding request, whether the quantity for determining the above-mentioned established connection in second memory field is present count Value, if so, the original message forwarding application upgrade that above-mentioned second memory field is run is the forwarding application of above-mentioned object message, Above-mentioned second memory field that operation has above-mentioned object message forwarding application creates connection, and updates above-mentioned second memory field and established Connection quantity.
In some optional implementations of the present embodiment, above-mentioned first upgrade unit 503 can further configure use In in response to determine the above-mentioned established connection in second memory field quantity be not above-mentioned default value, in above-mentioned first memory field Connection is created, and updates the quantity of the above-mentioned established connection in first memory field.
In some optional implementations of the present embodiment, above-mentioned second upgrade unit 504 can further configure use In in response to receiving message forwarding request, whether the quantity for determining the above-mentioned established connection in first memory field is above-mentioned default Numerical value, if so, the original message forwarding application upgrade that above-mentioned first memory field is run is the forwarding application of above-mentioned object message, Connection is created in above-mentioned first memory field that operation has above-mentioned object message forwarding application, and it is built to update above-mentioned first memory field The quantity of vertical connection.
In some optional implementations of the present embodiment, above-mentioned second upgrade unit 504 can further configure use In in response to determine the above-mentioned established connection in first memory field quantity be not above-mentioned default value, in above-mentioned second memory field Connection is created, and updates the quantity of the above-mentioned established connection in second memory field.
In some optional implementations of the present embodiment, which (can also not show including creating unit in figure Go out).Wherein, above-mentioned creating unit may be configured to, in response to receiving message forwarding request, randomly choose in above-mentioned first The either memory area in area and above-mentioned second memory field is deposited, using selected memory field as target memory area, in above-mentioned target Memory field creates connection, and updates the quantity of the above-mentioned established connection in target memory area.
In some optional implementations of the present embodiment, above-mentioned object message forwarding application message can include following The path of at least one above-mentioned object message forwarding application, the title of above-mentioned object message forwarding application, above-mentioned object message turn The version number of application is sent out, performs the user information of updating operation, performs the operating time of updating operation, above-mentioned object message forwarding The check information of application.
The device that above-described embodiment of the application provides, the mesh in received upgrade command is docked by verification unit 501 Mark message forwarding application message is verified, and then acquiring unit 502 obtains object message forwarding application after verification passes through, it The first upgrade unit 503 is transported the second memory field when the quantity of the established connection in the second memory field is default value afterwards Capable original message forwarding application upgrade is object message forwarding application, and the second last upgrade unit 504 is in the first memory field When the quantity of established connection is the default value, it is by the original message forwarding application upgrade that first memory field is run Object message forwarding application, so as to avoid replacing kernel module so that business is damaged, it can be achieved that online service nondestructive upgrades, together When, different from substituting former proceeding method to be limited by forwarding performance using new process, upgrade method provided in this embodiment and device It can be used under big flow high concurrent scene, realize the heat upgrading of the message forwarding application under big flow high concurrent scene, from And improve the adaptability of the heat upgrading under big flow high concurrent scene.
Below with reference to Fig. 6, it illustrates suitable for for realizing the computer system 600 of the server of the embodiment of the present application Structure diagram.Server shown in Fig. 6 is only an example, should not be to the function and use scope band of the embodiment of the present application Carry out any restrictions.
As shown in fig. 6, computer system 600 includes central processing unit (CPU) 601, it can be read-only according to being stored in Program in memory (ROM) 602 or be loaded into program in random access storage device (RAM) 603 from storage part 608 and Perform various appropriate actions and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data. CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to always Line 604.
I/O interfaces 605 are connected to lower component:Importation 606 including keyboard, mouse etc.;Penetrated including such as cathode The output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage part 608 including hard disk etc.; And the communications portion 609 of the network interface card including LAN card, modem etc..Communications portion 609 via such as because The network of spy's net performs communication process.Driver 610 is also according to needing to be connected to I/O interfaces 605.Detachable media 611, such as Disk, CD, magneto-optic disk, semiconductor memory etc., are installed on driver 610, in order to read from it as needed Computer program be mounted into as needed storage part 608.
Especially, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product, it includes being carried on computer-readable medium On computer program, the computer program include be used for execution flow chart shown in method program code.In such reality Apply in example, which can be downloaded and installed by communications portion 609 from network, and/or from detachable media 611 are mounted.When the computer program is performed by central processing unit (CPU) 601, perform what is limited in the present processes Above-mentioned function.It should be noted that computer-readable medium described herein can be computer-readable signal media or Computer-readable recording medium either the two any combination.Computer-readable recording medium for example can be --- but Be not limited to --- electricity, magnetic, optical, electromagnetic, system, device or the device of infrared ray or semiconductor, or it is any more than combination. The more specifically example of computer-readable recording medium can include but is not limited to:Electrical connection with one or more conducting wires, Portable computer diskette, hard disk, random access storage device (RAM), read-only storage (ROM), erasable type may be programmed read-only deposit Reservoir (EPROM or flash memory), optical fiber, portable compact disc read-only storage (CD-ROM), light storage device, magnetic memory Part or above-mentioned any appropriate combination.In this application, computer-readable recording medium can any be included or store The tangible medium of program, the program can be commanded the either device use or in connection of execution system, device.And In the application, computer-readable signal media can include believing in a base band or as the data that a carrier wave part is propagated Number, wherein carrying computer-readable program code.The data-signal of this propagation can take various forms, including but not It is limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer Any computer-readable medium beyond readable storage medium storing program for executing, the computer-readable medium can send, propagate or transmit use In by instruction execution system, device either device use or program in connection.Included on computer-readable medium Program code any appropriate medium can be used to transmit, include but not limited to:Wirelessly, electric wire, optical cable, RF etc., Huo Zheshang Any appropriate combination stated.
Flow chart and block diagram in attached drawing, it is illustrated that according to the system of the various embodiments of the application, method and computer journey Architectural framework in the cards, function and the operation of sequence product.At this point, each square frame in flow chart or block diagram can generation The part of one module of table, program segment or code, the part of the module, program segment or code include one or more use In the executable instruction of logic function as defined in realization.It should also be noted that marked at some as in the realization replaced in square frame The function of note can also be with different from the order marked in attached drawing generation.For example, two square frames succeedingly represented are actually It can perform substantially in parallel, they can also be performed in the opposite order sometimes, this is depending on involved function.Also to note Meaning, the combination of each square frame and block diagram in block diagram and/or flow chart and/or the square frame in flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard The mode of part is realized.Described unit can also be set within a processor, for example, can be described as:A kind of processor bag Include verification unit, acquiring unit, the first upgrade unit and the second upgrade unit.Wherein, the title of these units is in certain situation Under do not form restriction to the unit in itself, for example, verification unit is also described as " forwarding object message in application letter Cease the unit verified ".
As on the other hand, present invention also provides a kind of computer-readable medium, which can be Included in device described in above-described embodiment;Can also be individualism, and without be incorporated the device in.Above-mentioned calculating Machine computer-readable recording medium carries one or more program, when said one or multiple programs are performed by the device so that should Device:The upgrade command of object message forwarding application message is included in response to receiving, application message is forwarded to the object message Verified, wherein, which is used to indicate that by original message forwarding application upgrade be object message forwarding application;Response Pass through in definite verification, obtain object message forwarding application;In the second memory field, the quantity of established connection is present count During value, the original message forwarding application upgrade which is run is object message forwarding application;In first When the quantity for depositing the established connection in area is the default value, the original message forwarding application which is run rises Level is object message forwarding application.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.People in the art Member should be appreciated that invention scope involved in the application, however it is not limited to the technology that the particular combination of above-mentioned technical characteristic forms Scheme, while should also cover in the case where not departing from foregoing invention design, carried out by above-mentioned technical characteristic or its equivalent feature The other technical solutions for being combined and being formed.Such as features described above has similar work(with (but not limited to) disclosed herein The technical solution that the technical characteristic of energy is replaced mutually and formed.

Claims (16)

1. a kind of upgrade method for server, the Installed System Memory of the server is divided into the first memory field and the second memory Area, first memory field have original message forwarding to apply with second memory field operation, the described method includes:
The upgrade command of object message forwarding application message is included in response to receiving, application message is forwarded to the object message Verified, wherein, the upgrade command is used to indicate that by original message forwarding application upgrade be object message forwarding application;
In response to determining that verification passes through, the object message forwarding application is obtained;
When the quantity of the established connection in the second memory field is default value, original that second memory field is run The forwarding application upgrade of beginning message is object message forwarding application;
When the quantity of the established connection in the first memory field is the default value, first memory field is run Original message forwarding application upgrade for the object message forwarding application.
2. upgrade method according to claim 1, wherein, the quantity in the established connection in the second memory field For default value when, the original message forwarding application upgrade that second memory field is run should for object message forwarding With, including:
In response to receiving message forwarding request, whether the quantity for determining the established connection in the second memory field is present count Value, if so, the original message forwarding application upgrade that second memory field is run is object message forwarding application, Second memory field that operation has the object message forwarding application creates connection, and updates second memory field and established Connection quantity.
3. upgrade method according to claim 2, wherein, in the definite established connection in second memory field , will when the quantity in the established connection in the second memory field is default value after whether quantity is default value The original message forwarding application upgrade that second memory field is run is object message forwarding application, is further included:
Quantity in response to determining the established connection in the second memory field is not the default value, in first memory Area creates connection, and updates the quantity of the established connection in the first memory field.
4. according to the upgrade method described in one of claim 1-3, wherein, it is described in the established connection in the first memory field Quantity when being the default value, be the target by the original message forwarding application upgrade that first memory field is run Message forwarding application, including:
In response to receiving message forwarding request, whether the quantity for determining the established connection in the first memory field is described pre- If numerical value, if so, the original message forwarding application upgrade that first memory field is run should for object message forwarding With random selection operation has any in first memory field and second memory field of the object message forwarding application Memory field, creates connection in selected memory field, and updates the quantity of the established connection in selected memory field.
5. upgrade method according to claim 4, wherein, in the definite established connection in first memory field After whether quantity is the default value, the quantity in the established connection in the first memory field is the present count During value, the original message forwarding application upgrade that first memory field is run is object message forwarding application, is also wrapped Include:
Quantity in response to determining the established connection in the first memory field is not the default value, in second memory Area creates connection, and updates the quantity of the established connection in the second memory field.
6. upgrade method according to claim 1, wherein, described object message forwarding application is included in response to receiving Before upgrade command described in information, the method further includes:
In response to receiving message forwarding request, randomly choose any interior in first memory field and second memory field Area is deposited, using selected memory field as target memory area, creates and connects in the target memory area, and update in the target Deposit the quantity of the established connection in area.
7. upgrade method according to claim 1, wherein, the object message forwarding application message includes following at least one :The path of the object message forwarding application, the title of the object message forwarding application, the object message forwarding application Version number, perform the user information of updating operation, perform the operating time of updating operation, the object message forwarding application Check information.
8. a kind of update device for server, the Installed System Memory of the server is divided into the first memory field and the second memory Area, first memory field have original message forwarding to apply with second memory field operation, and described device includes:
Verification unit, is configured to the upgrade command for including object message forwarding application message in response to receiving, to the mesh Mark message forwarding application message is verified, wherein, the upgrade command is used for instruction and is by original message forwarding application upgrade Object message forwarding application;
Acquiring unit, is configured to, in response to determining that verification passes through, obtain the object message forwarding application;
First upgrade unit, is configured to when the quantity of the established connection in the second memory field is default value, by institute It is object message forwarding application to state the original message forwarding application upgrade run the second memory field;
Second upgrade unit, is configured to when the quantity of the established connection in the first memory field is the default value, The original message forwarding application upgrade that first memory field is run is object message forwarding application.
9. update device according to claim 8, wherein, first upgrade unit is further configured to:
In response to receiving message forwarding request, whether the quantity for determining the established connection in the second memory field is present count Value, if so, the original message forwarding application upgrade that second memory field is run is object message forwarding application, Second memory field that operation has the object message forwarding application creates connection, and updates second memory field and established Connection quantity.
10. update device according to claim 9, wherein, first upgrade unit is further configured to:
Quantity in response to determining the established connection in the second memory field is not the default value, in first memory Area creates connection, and updates the quantity of the established connection in the first memory field.
11. according to the update device described in one of claim 8-10, wherein, second upgrade unit further configures use In:
In response to receiving message forwarding request, whether the quantity for determining the established connection in the first memory field is described pre- If numerical value, if so, the original message forwarding application upgrade that first memory field is run should for object message forwarding With random selection operation has any in first memory field and second memory field of the object message forwarding application Memory field, creates connection in selected memory field, and updates the quantity of the established connection in selected memory field.
12. update device according to claim 11, wherein, second upgrade unit is further configured to:
Quantity in response to determining the established connection in the first memory field is not the default value, in second memory Area creates connection, and updates the quantity of the established connection in the second memory field.
13. update device according to claim 8, wherein, described device further includes:
Creating unit, is configured in response to receiving message forwarding request, randomly chooses first memory field and described the Either memory area in two memory fields, using selected memory field as target memory area, creates in the target memory area and connects Connect, and update the quantity of the established connection in target memory area.
14. update device according to claim 8, wherein, the object message forwarding application message include it is following at least One:The path of the object message forwarding application, the title of the object message forwarding application, the object message forwarding should Version number, performs the user information of updating operation, performs the operating time of updating operation, the object message forwarding application Check information.
15. a kind of server, including:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are performed by one or more of processors so that one or more of processors are real The now method as described in any in claim 1-7.
16. a kind of computer-readable recording medium, is stored thereon with computer program, wherein, when which is executed by processor Realize the method as described in any in claim 1-7.
CN201711205376.6A 2017-11-27 2017-11-27 Upgrading method and device Active CN107911248B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711205376.6A CN107911248B (en) 2017-11-27 2017-11-27 Upgrading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711205376.6A CN107911248B (en) 2017-11-27 2017-11-27 Upgrading method and device

Publications (2)

Publication Number Publication Date
CN107911248A true CN107911248A (en) 2018-04-13
CN107911248B CN107911248B (en) 2020-11-10

Family

ID=61847796

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711205376.6A Active CN107911248B (en) 2017-11-27 2017-11-27 Upgrading method and device

Country Status (1)

Country Link
CN (1) CN107911248B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1271322A3 (en) * 2001-06-27 2006-04-12 Nokia Corporation Crash recovery system
US7636740B2 (en) * 2004-12-17 2009-12-22 Electronic And Telecommunications Research Institute Database cache system
WO2014166265A1 (en) * 2013-04-12 2014-10-16 Tencent Technology (Shenzhen) Company Limited Method, terminal, cache server and system for updating webpage data
CN105511928A (en) * 2015-12-28 2016-04-20 努比亚技术有限公司 System upgrading device and method
TW201617903A (en) * 2014-11-14 2016-05-16 凱為公司 Managing buffered communication between sockets
CN106202271A (en) * 2016-06-30 2016-12-07 携程计算机技术(上海)有限公司 The read method of the product database of OTA
WO2017067448A1 (en) * 2015-10-22 2017-04-27 深圳市中兴微电子技术有限公司 Firmware-over-the-air upgrade method, system and computer storage medium
CN107346308A (en) * 2016-05-04 2017-11-14 阿里巴巴集团控股有限公司 The call method and device of data in a kind of group system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1271322A3 (en) * 2001-06-27 2006-04-12 Nokia Corporation Crash recovery system
US7636740B2 (en) * 2004-12-17 2009-12-22 Electronic And Telecommunications Research Institute Database cache system
WO2014166265A1 (en) * 2013-04-12 2014-10-16 Tencent Technology (Shenzhen) Company Limited Method, terminal, cache server and system for updating webpage data
TW201617903A (en) * 2014-11-14 2016-05-16 凱為公司 Managing buffered communication between sockets
WO2017067448A1 (en) * 2015-10-22 2017-04-27 深圳市中兴微电子技术有限公司 Firmware-over-the-air upgrade method, system and computer storage medium
CN105511928A (en) * 2015-12-28 2016-04-20 努比亚技术有限公司 System upgrading device and method
CN107346308A (en) * 2016-05-04 2017-11-14 阿里巴巴集团控股有限公司 The call method and device of data in a kind of group system
CN106202271A (en) * 2016-06-30 2016-12-07 携程计算机技术(上海)有限公司 The read method of the product database of OTA

Also Published As

Publication number Publication date
CN107911248B (en) 2020-11-10

Similar Documents

Publication Publication Date Title
CN106598667B (en) Method and apparatus for repairing kernel loophole
CN106843976B (en) Method and apparatus for generating image file
CN107357914B (en) Information processing method and device
US20120173962A1 (en) Online application providing apparatus
CN108932194A (en) Automated testing method, device, system, medium and electronic equipment
CN105893085A (en) Method and device for loading kernel module
CN106874471A (en) Information-pushing method and device
CN107896244A (en) A kind of distribution method of version file, client and server
CN110009362A (en) Block chain intelligence contract amending method, device and computer readable storage medium
CN105739968A (en) Method and device for reviewing update content based on distributed version control system Git
CN110209416A (en) Application software update method, device, terminal and storage medium
CN109766127A (en) Method for updating application version information
CN108073429A (en) A kind of means of payment collocation method, device, equipment and storage medium
CN109359281A (en) Dynamic list generation method and device
CN108011949A (en) Method and apparatus for obtaining data
CN109582317A (en) Method and apparatus for debugging boarding application
CN108089870A (en) For repairing the method and apparatus of application
CN107347093A (en) Collocation method and device for distributed server system
CN106201010B (en) Method for adding word bank and device
US20140019515A1 (en) Adaptive business logic configurator
CN109542864A (en) A kind of resource storage method, resource downloading method, system, equipment and medium
CN111459506A (en) Deployment method, device, medium and electronic equipment of deep learning platform cluster
CN110309462A (en) Method for exhibiting data and system
CN107911248A (en) Upgrade method and device
CN109145591A (en) The plug-in loading method of application program

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