WO2023226887A1 - 业务容灾方法、终端设备、软件开发包服务器和通信系统 - Google Patents

业务容灾方法、终端设备、软件开发包服务器和通信系统 Download PDF

Info

Publication number
WO2023226887A1
WO2023226887A1 PCT/CN2023/095241 CN2023095241W WO2023226887A1 WO 2023226887 A1 WO2023226887 A1 WO 2023226887A1 CN 2023095241 W CN2023095241 W CN 2023095241W WO 2023226887 A1 WO2023226887 A1 WO 2023226887A1
Authority
WO
WIPO (PCT)
Prior art keywords
sdk
server
request message
resource address
business
Prior art date
Application number
PCT/CN2023/095241
Other languages
English (en)
French (fr)
Inventor
唐泽平
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023226887A1 publication Critical patent/WO2023226887A1/zh

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/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Definitions

  • This application relates to the field of communication technology, and in particular to a business disaster recovery method, terminal equipment, software development package server and communication system.
  • the business server can integrate some product functions through software development kit (SDK) technology. Since SDK static resources provided through the source server will have greatly different access speeds for users in different regions, static resources are usually stored in content delivery network (content delivery network, CDN) servers to improve user access speeds.
  • SDK software development kit
  • the terminal device initiates a request to the service server, the service server returns the address of the static resource located on the CDN server to the terminal device, and the terminal device requests the static resource from the CDN server based on the address.
  • the CDN server is maintained by an external service provider. When the CDN server fails, user functions will be unavailable.
  • the embodiment of this application discloses a business disaster recovery method, which is used for SDK static resource disaster recovery.
  • the first aspect of the present application provides a business disaster recovery method, including: a terminal device sends a first request message to a business server, the first request message is used to request resources required to display a business page, and the resources include software Development kit SDK static resources, the SDK static resources are used to implement the SDK functions associated with the business page; the terminal device obtains the response message of the first request message returned by the business server, the first request
  • the response message of the message includes a first resource address and a second resource address.
  • the first resource address points to the SDK static resource located on the content distribution network CDN server.
  • the second resource address points to the SDK static resource located on the source server. resource.
  • the terminal device requests SDK static resource information from the business server and can obtain two resource addresses from the business server, including the address of the SDK static resource located on the CDN server and the SDK static resource located on the source server. The address of the resource.
  • the terminal device can ensure that the terminal device can obtain the SDK static resources normally and realize the SDK functions associated with the business page. Even if some servers fail, such as CDN server failure, normal business can be guaranteed and the disaster recovery capability of the business can be improved.
  • the second resource address is a backup address.
  • the business disaster recovery method provided by the embodiment of this application can use the second resource address as a backup address.
  • the CDN server can be an edge server deployed in various places, users can obtain the required content nearby, reduce network congestion, and improve For high user access response speed, priority is usually given to requesting the SDK resources located on the CDN server pointed to by the first resource address.
  • CDN servers are usually maintained by external service providers. If a failure occurs, the SDK service will be unavailable and uncontrollable. Therefore, a second resource address is provided to the terminal device, pointing to the SDK resource located on the source server. When the CDN server fails, the source server can provide service guarantee.
  • the method further includes: the terminal device sending a second request message to the CDN server according to the first resource address, the second request message being used to request The SDK static resources located in the CDN server; the terminal device receives the response message of the second request message sent by the CDN server; if the response message of the second request message includes information of request failure, then The terminal device sends a third request message to the source server according to the second resource address.
  • the third request message is used to request the SDK static resources located in the source server; the terminal device receives the The origin server returns a response message to the third request message, where the response message to the third request message includes the SDK static resource.
  • the terminal can obtain the SDK static resources located in the source server based on the second resource address.
  • the business disaster recovery capability is strong and the business is reliable. sexual enhancement.
  • the method further includes: the terminal device implementing the SDK function according to the SDK static resource, where the SDK function includes: a login verification function or a registration function.
  • the second aspect of the present application provides a business disaster recovery method, including: the SDK server receives a fourth request message sent by the business server, the fourth request message is used to obtain SDK static resources, and the SDK static resources are used to implement SDK function associated with the business page; the SDK server returns a response message of the fourth request message to the business server, and the response message of the fourth request message includes a first resource address and a second resource address, and the The first resource address points to the SDK static resources located on the CDN server, and the second resource address points to the SDK static resources located on the origin server.
  • the SDK server can provide the addresses of at least two SDK static resources located on different servers.
  • the SDK static resources can be provided through another server, thereby improving the Business disaster recovery capabilities.
  • the second resource address is a backup address.
  • the business disaster recovery method provided by the embodiment of this application can use the second resource address as a backup address.
  • the CDN server can be an edge server deployed in various places, users can obtain the required resources nearby, reduce network congestion, and improve user access response. For speed, priority is usually given to requesting the SDK resource located on the CDN server pointed to by the first resource address.
  • CDN servers are usually maintained by external service providers. If a failure occurs, the SDK service will be unavailable and uncontrollable. Therefore, by providing a second resource address pointing to the SDK resource located on the origin server, when the CDN server fails, the origin server can provide business guarantee. It can improve user access response speed, provide business disaster recovery capabilities, and improve business reliability.
  • the method further includes: the SDK server updating the first resource address and/or updating the second resource address.
  • the business disaster recovery method provided by the embodiment of the present application updates the first resource address and/or the second resource address in the SDK server when the SDK static resources are updated, such as version upgrade, so that dynamic information can be returned to the business server. Updated and reliable address information.
  • the third aspect of the present application provides a business disaster recovery method, including: the business server receives a first request message sent by a terminal device, the first request message displays resources required by the business page, and the resources include a software development kit SDK static resources, the SDK static resources are used to implement SDK functions associated with the business page; the business server sends a fourth request message to the SDK server according to the first request message, the fourth request message is used to Obtain SDK static resources; the business server receives the response message of the fourth request message returned by the SDK server, the response message of the fourth request message includes a first resource address and a second resource address, and the first The resource address points to the SDK static resource located on the CDN server, and the second resource address points to the SDK static resource located on the source server; the service server forwards the first resource address and the second resource address to the terminal. .
  • the second resource address is a backup address, used when the resource obtained by the first resource address fails.
  • the fourth aspect of this application provides a terminal device, including:
  • a sending module configured to send a first request message to the business server.
  • the first request message is used to request resources required to display the business page.
  • the resources include SDK static resources.
  • the SDK static resources are used to implement the SDK functions associated with business pages;
  • a receiving module configured to obtain the response message of the first request message returned by the business server.
  • the response message of the first request message includes a first resource address and a second resource address.
  • the first resource address points to a location located at The SDK static resources of the content distribution network CDN server, the second resource address points to the SDK static resources located on the source server.
  • the second resource address is a backup address.
  • the sending module is further configured to send a second request message to the CDN server according to the first resource address, where the second request message is used to request that the The SDK static resources of the CDN server; the receiving module is also used to receive the response message of the second request message sent by the CDN server; the sending module is also used to, if the second request message The response message includes information of request failure, then sends a third request message to the source server according to the second resource address, where the third request message is used to request the SDK static resources located on the source server; The receiving module is further configured to receive a response message returned by the source server to the third request message, where the response message of the third request message includes the SDK static resource;
  • the terminal device further includes: a processing module that implements the SDK function according to the SDK static resource, and the SDK function includes: a login verification function.
  • the fifth aspect of the present application provides an SDK server, including: a receiving module, configured to receive a fourth request message sent by a business server, the fourth request message being used to obtain SDK static resources, and the SDK static resources being used to Implement the SDK function associated with the business page; a sending module configured to return a response message of the fourth request message to the business server, where the response message of the fourth request message includes a first resource address and a second resource address, The first resource address points to the SDK static resource located on the CDN server, and the second resource address points to the SDK static resource located on the origin server.
  • the second resource address is a backup address.
  • the SDK server further includes: an update module, used to update the first resource address and/or update the second resource address.
  • a sixth aspect of the present application provides a business server, including: a receiving module, configured to receive a first request message sent by a terminal device, where the first request message displays resources required for the business page, and the resources include software development Includes SDK static resources, the SDK static resources are used to implement the SDK functions associated with the business page; a sending module is used to send a fourth request message to the SDK server according to the first request message, the fourth request message Used to obtain SDK static resources; the receiving module is also used to receive a response message of the fourth request message returned by the SDK server, where the response message of the fourth request message includes a first resource address and a second resource address, so The first resource address points to the SDK static resource located on the CDN server, and the second resource address points to the SDK static resource located on the source server; the sending module is also used to forward the first resource address and The second resource address.
  • a receiving module configured to receive a first request message sent by a terminal device, where the first request message displays resources required for the business page, and the resources
  • the second resource address is a backup address.
  • a seventh aspect of the present application provides a terminal device, including: a memory, computer-readable instructions are stored in the memory; and a processor connected to the memory, when the computer-readable instructions are executed by the processor, The terminal device is caused to implement the method described in any one of the above first aspect and various possible implementation manners.
  • the eighth aspect of this application provides an SDK server, including: a memory, computer-readable instructions are stored in the memory; a processor connected to the memory, when the computer-readable instructions are executed by the processor,
  • the SDK server is caused to implement the method described in any one of the above second aspect and various possible implementation manners.
  • a ninth aspect of this application provides a business server, including: a memory, computer-readable instructions are stored in the memory; and a processor connected to the memory, when the computer-readable instructions are executed by the processor, The business server is caused to implement the method described in any one of the above third aspect and various possible implementation manners.
  • a tenth aspect of the present application provides a computer program product, including computer-readable instructions.
  • the computer-readable instructions When the computer-readable instructions are run on a computer, they cause the computer to perform the above-mentioned first aspect, second aspect, third aspect and each of the above. any one of the possible implementation methods.
  • An eleventh aspect of the present application provides a computer-readable storage medium, characterized in that instructions are stored in the computer-readable storage medium, and when the instructions are run on a computer, they cause the computer to execute the above-mentioned first aspect. , the method described in any one of the second aspect, the third aspect, and various possible implementations.
  • a twelfth aspect of this application provides a chip including a processor.
  • the processor is used to read and execute the computer program stored in the memory to perform the method in any possible implementation of any of the above aspects.
  • the chip should include a memory, and the memory and the processor are connected to the memory through circuits or wires.
  • the chip also includes a communication interface, and the processor is connected to the communication interface.
  • the communication interface is used to receive data and/or information that needs to be processed.
  • the processor obtains the data and/or information from the communication interface, processes the data and/or information, and outputs the processing results through the communication interface.
  • the communication interface may be an input-output interface.
  • a thirteenth aspect of the present application provides a communication system.
  • the communication system includes a terminal device, a business server, and an SDK server; the terminal device is used to send a first request message to the business server, and the first request message is used to Request the resources required to display the business page.
  • the resources include software development kit SDK static resources.
  • the SDK static resources are used to implement the SDK functions associated with the business page; the business server is used to respond to the first request.
  • the message sends a fourth request message to the SDK server.
  • the fourth request message is used to request SDK static resources; the SDK server is used to return the fourth request to the business server according to the fourth request message.
  • message response message The response message of the fourth request message includes a first resource address and a second resource address.
  • the first resource address points to the SDK static resource located on the CDN server, and the second resource address points to the SDK static resource located on the source server.
  • SDK static resources; the business server is also configured to send a response message to the first request message to the terminal server, where the response message to the first request message includes the first resource address and the second resource address.
  • the communication system further includes a CDN server and an origin server; the terminal device is further configured to send a second request message to the CDN server according to the first resource address, The second request message is used to request the SDK static resources located in the CDN server; the CDN server is used to return a response message to the second request message according to the second request message; if the second If the response message of the request message includes information indicating that the request failed, the terminal device is further configured to send a third request message to the source server according to the second resource address, where the third request message is used to request that the source server is located at the source server.
  • the SDK static resources of the server; the source server is configured to return a response message of the third request message to the terminal device according to the third request message, where the response message of the third request message includes the SDK static resource .
  • the terminal server is further configured to implement the SDK function according to the SDK static resource, where the SDK function includes: a login verification function.
  • any implementation method of the fourth aspect, the fifth aspect, the sixth aspect, the seventh aspect, the eighth aspect, the ninth aspect, the tenth aspect, the eleventh aspect, the twelfth aspect and the thirteenth aspect please refer to the technical effects brought about by the corresponding implementation methods in the first aspect to the third aspect, which will not be described again here.
  • the terminal device can obtain two resource addresses of SDK static resources, including the address of the SDK static resource located on the CDN server and the address of the SDK static resource located on the source server.
  • the terminal device can ensure that the terminal device can obtain the SDK static resources normally and realize the SDK functions associated with the business page. Even if some servers fail, such as CDN server failure, normal business can be guaranteed and the disaster recovery capability of the business can be improved.
  • Figure 1 is a system architecture diagram of the business disaster recovery method provided by the embodiment of this application.
  • Figure 2 is a schematic diagram of an embodiment of the business disaster recovery method in the embodiment of the present application.
  • Figure 3 is a schematic diagram of the interaction between the business server and the SDK server in the embodiment of this application;
  • Figure 4 is a schematic diagram of module interaction in a terminal device according to an embodiment of the present application.
  • Figure 5 is a schematic diagram of another embodiment of the business disaster recovery method in the embodiment of the present application.
  • Figure 6 is a code schematic diagram of the service server returning information about the terminal device in the embodiment of the present application.
  • Figure 7 is a code schematic diagram of a terminal device switching to load the SDK static resource address of the source server in the embodiment of the present application;
  • Figure 8 is a rendering of the e-commerce login interface in the embodiment of this application.
  • Figure 9 is a schematic diagram of an embodiment of a terminal device in an embodiment of the present application.
  • FIG. 10 is a schematic diagram of an embodiment of the SDK server in the embodiment of this application.
  • Figure 11 is a schematic diagram of another embodiment of the terminal device in the embodiment of the present application.
  • Figure 12 is a schematic diagram of another embodiment of the SDK server in the embodiment of the present application.
  • the embodiment of this application discloses a business disaster recovery method, which is used for SDK static resource disaster recovery and can improve business reliability.
  • SDK Software development kit
  • Software development kits are generally a collection of development tools used by software engineers to create application software for specific software packages, software frameworks, hardware platforms, operating systems, etc.
  • Software development tools broadly refer to a collection of relevant documents, examples and tools that assist in the development of a certain type of software.
  • a software development kit is a collection of development tools used by software engineers to create application software for specific software packages, software frameworks, hardware platforms, operating systems, etc.
  • SDK is used to develop applications under the Windows platform.
  • SDK can simply provide some files for an application programming interface API for a certain programming language, but it may also include complex hardware that can communicate with an embedded system.
  • General tools include utilities for debugging and other purposes.
  • SDKs also often include sample code, supporting technical notes, or other supporting documentation to clarify doubts about basic reference materials.
  • JS-SDK JavaScript software development kit, JavaScript SDK
  • JavaScript ("JS” for short) is a lightweight, interpreted or just-in-time compiled programming language with function priority.
  • JS-SDK is an optional implementation method of SDK static resources in the embodiment of this application.
  • CDN Content delivery network
  • CDN is an intelligent virtual network built on the existing network. It relies on edge servers deployed in various places and uses the load balancing, content distribution, scheduling and other functional modules of the central platform to enable users to obtain the content they need nearby and reduce network congestion. Improve user access response speed and hit rate.
  • the key technologies of CDN mainly include content storage and distribution technology.
  • a disaster recovery system refers to the establishment of two or more systems with the same functions in remote places that are far apart. They can perform health status monitoring and function switching between each other. When one system is affected by an accident (such as fire, earthquake or malfunction, etc.) When stopping working, The system can be switched to another location so that the system functions can continue to work normally.
  • Disaster recovery technology is an integral part of the system's high availability technology, providing node-level system recovery capabilities.
  • the application scenario architecture of the business disaster recovery method in the embodiment of this application is introduced below. Please refer to Figure 1.
  • the application scenario architecture includes: terminal device 100, business server 200, SDN server 300, CDN server 400 and source server 500.
  • the terminal device 100 and the business server 200 communicate through a network connection
  • the business server 200 and the SDN server 300 communicate through a network connection
  • the terminal device 100 and the CDN server 400 communicate through a network connection
  • the source server 500 communicate through network connections.
  • the CDN server 400 serves as an edge server deployed in various places to enable users to obtain required content nearby, which is usually close to the physical location of the terminal device 100 .
  • the physical locations of the source server 500 and the terminal device 100 may be close or far away. That is to say, the access speeds from different terminal devices 100 to the source server 500 vary greatly.
  • the user accesses the business interface through the browser of the terminal device 100.
  • the resources required by the browser to display the business interface can be obtained by requesting the business server 200.
  • some product functions, such as verifying login or registration information, etc., are provided through the JS-SDK. In this way, the terminal device 100 needs to obtain SDK static resources to implement these business functions.
  • SDK static resources were stored on the source server 500. Due to the large difference in user access speed, which affects the user experience, the SDK static resources can be stored on the CDN server 400 by purchasing a CDN service. However, the CDN server is provided by an external service provider. Maintenance, once a failure occurs, user functions will be unavailable.
  • embodiments of this application provide a business disaster recovery method and network equipment for SDK static resource disaster recovery, which can improve business reliability.
  • this embodiment of the present application proposes a business disaster recovery method, which can be applied to the scenario shown in Figure 1.
  • the user terminal is equivalent to the one shown in Figure 1.
  • the method includes steps 201-208.
  • the terminal device sends the first request message to the service server;
  • the user accesses the business web page through the terminal device browser. After the browser obtains the address visited by the user, it can send a first request message to the business server.
  • the first request message is used to request the resources required to display the business page.
  • the resources Including software development kit SDK static resources, the SDK static resources are used to implement the SDK functions associated with the business page;
  • the second resource address is a backup address. It can be understood that the backup address can be used when the resource obtained by the first resource address fails.
  • the business server sends the fourth request message to the SDK server;
  • the SDK server receives the fourth request message sent by the business server, the fourth request message is used to obtain SDK static resources, and the SDK static resources are used to implement the SDK function associated with the business page;
  • the SDK server returns the response message of the fourth request message to the business server;
  • the SDK server returns a response message of the fourth request message to the business server.
  • the response message of the fourth request message includes a first resource address and a second resource address.
  • the first resource address points to the CDN server. of the SDK static resources, and the second resource address points to the SDK static resources located on the source server.
  • the SDK server not only provides the said SDK static resources located on the CDN server, but also provides the CDN The address of the SDK static resource on the source server used for switching after a server failure.
  • the SDK server updates the first resource address and/or updates the second resource address.
  • the service server returns the response message of the first request message to the terminal device;
  • the terminal device obtains the response message of the first request message returned by the service server.
  • the response message of the first request message includes a first resource address and a second resource address.
  • the first resource address points to the content located in the content.
  • the terminal device before performing step 205, can first check whether the CDN network is normal.
  • the checking method can refer to existing methods, which are not limited here. If the check result is normal, the second request message is sent to the CDN server; if the check result is abnormal, steps 207-208 are executed.
  • the terminal device sends the second request message to the CDN server;
  • the terminal device sends a second request message to the CDN server according to the first resource address, where the second request message is used to request the SDK static resources located in the CDN server.
  • the CDN server returns the response message of the second request message to the terminal device;
  • the terminal device receives the response message of the second request message sent by the CDN server;
  • the terminal device sends the third request message to the source server;
  • the terminal device sends a third request message to the source server according to the second resource address, and the third request message is used to request the source server located at the The SDK static resources of the source server;
  • the source server returns a response message of the third request message to the terminal device.
  • the terminal device receives a response message from the source server that returns the third request message, and the response message of the third request message includes the SDK static resource.
  • the terminal device requests SDK static resource information from the business server and can obtain two resource addresses from the business server, including the address of the SDK static resource located on the CDN server and the SDK static resource located on the source server. The address of the resource.
  • the terminal device can ensure that the terminal device can obtain the SDK static resources normally and realize the SDK functions associated with the business page. Even if some servers fail, such as CDN server failure, normal business can be guaranteed and the disaster recovery capability of the business can be improved.
  • the business server requests SDK static resources from the SDK server through the request module 301, and the SDK server configures the storage module 302 to store the address information of the SDK static resources.
  • the SDK server reads the first resource address and the second resource address from the storage module 302.
  • the first resource address points to the SDK static resource located on the content distribution network CDN server, and the second resource address points to the SDK static resource located on the source server.
  • the SDK static resource CDN and source site configure address information and return it to the business server.
  • the terminal device includes a JS processing module 401 and a caching module 402.
  • the browser JS processing module 401 is used to handle CDN exceptions. If an exception is found, the identifier is stored in the cache module 402. When subsequently loading SDK static resources in the same session, you can first check whether the identifier exists in the cache module. If If there is an identifier, it will directly request the SDK resources from the source server.
  • This embodiment of the present application proposes a business disaster recovery method.
  • the method can be applied to the scenario shown in Figure 1, where in the application scenario shown in Figure 1, the user terminal is equivalent to the terminal device 100 shown in Figure 1, and the e-commerce server is equivalent to the business shown in Figure 1 Server 200, the login verification server is equivalent to the SDN server shown in Figure 1, and the method includes steps 501-511.
  • the terminal device requests the resources required to display the business page from the e-commerce server;
  • the terminal device requests the resources required to display the business page from the e-commerce server.
  • the terminal device is a personal computer and obtains the user's request to browse the e-commerce website in the browser. If the user is going to shop on the e-commerce website, he needs to log in first. Website, access the e-commerce shopping login interface https://www.shop.com/index.html. After the terminal device obtains the access address through the browser, it will resolve to the e-commerce server based on the www.shop.com domain name and query the e-commerce server. The content that needs to be displayed on the server login interface.
  • the e-commerce server requests the login verification server to obtain SDK information
  • the e-commerce server After receiving the interface request from the browser, the e-commerce server organizes the interface title and background image displayed on the page. In addition, some SDK functions, such as those involving user login, verification or registration, are entrusted to the login verification server. The e-commerce server needs to request the login verification server to obtain SDK information.
  • the SDK information is the SDK static resource (for example, this application In the embodiment, the SDK static resource is specifically the address of JS-SDK static resource).
  • the login verification server After the login verification server receives the e-commerce server request, the login verification server determines the JS-SDK static resource address, that is, obtains the URL address information of loginJSSDK.js.
  • This JS-SDK static resource is stored on two static resource services and has two URL addresses:
  • the SDK static resource address (i.e. the first resource address) located on the CDN server is https://www.cdn.com/loginJSSDK.js;
  • SDK static resource address (i.e. the second resource address) placed on the source server of the Nginx static resources built on the account platform is https://www.account.com/loginJSSDK.js.
  • the login verification server returns the SDK information to the e-commerce server;
  • the login verification server returns SDK information to the e-commerce server.
  • SDK information for example, please refer to the JS-SDK information in Figure 6, including the first resource address and the second resource address.
  • the e-commerce server returns the page to the terminal device, it also returns the JS-SDK static resource address information to the browser of the terminal device.
  • the browser can download based on the JS-SDK static resource address, and after execution, it can render the account login information. Interface box.
  • This JS-SDK static resource implements the functions of the SDK (software development kit) and is called JS-SDK.
  • the e-commerce server requests the login verification server to obtain the latest JS-SDK information that opens the login function.
  • the e-commerce server returns SDK information to the terminal device;
  • the e-commerce server returns the resources required to display the business page to the terminal device, including the title, background image, and JS URL information in html format for login verification. Please refer to the information returned by the e-commerce server on the terminal device in Figure 6.
  • the terminal device requests SDK static resources from the CDN server;
  • the terminal device browser parses the information returned by the e-commerce server, initializes the login verification JS-SDK function, loads the JS static resource for login verification: jsSdkUrl, and the browser requests the CDN server to download the SDK static resource https://www.cdn. com/loginJSSDK.js, send a request to the domain name www.cdn.com to download JS-SDK static resources.
  • the CDN server returns a response message to the terminal device
  • step 507 If the response message returned in step 507 includes information that the SDK static resource request failed, the terminal device loads the second resource address, that is, steps 508-511 are triggered. If the download of https://www.cdn.com/loginJSSDK.js is abnormal, step 507 returns exception code 404, and the browser receives a 404 error.
  • step 511 is executed directly.
  • terminal device If the terminal device responds to exception code 404, it loads https://www.account.com/loginJSSDK.js. Please refer to the schematic code shown in Figure 7.
  • the terminal device requests SDK static resources from the source server;
  • the terminal device requests the source server to download JS-SDK static resources.
  • the source server returns SDK static resources to the terminal device
  • the terminal device implements business functions based on SDK resources.
  • the browser obtains loginJSSDK.js returned by the source server and executes loginJSSDK.js.
  • This JS processing module will dynamically load other js files or css files that the login verification function depends on.
  • the final business interface https://www.shop.com/index.html displays the e-commerce login interface rendering as shown in Figure 8.
  • the account and password input box in the white area is rendered after loading the JS-SDK static resources.
  • Login box, other parts are the title and background image returned by the e-commerce.
  • This application provides a terminal device, including:
  • Sending module 901 configured to send a first request message to the business server.
  • the first request message is used to request resources required to display the business page.
  • the resources include information about software development kit SDK static resources.
  • the SDK static resources Used to implement SDK functions associated with the business page;
  • Receiving module 902 configured to obtain the response message of the first request message returned by the business server.
  • the response message of the first request message includes a first resource address and a second resource address, and the first resource address points to
  • the SDK static resources are located on the content distribution network CDN server, and the second resource address points to the SDK static resources located on the source server.
  • the second resource address is a backup address.
  • the sending module 901 is further configured to send a second request message to the CDN server according to the first resource address, where the second request message is used to request a location located on the CDN server.
  • the SDK static resources the receiving module 902 is also used to receive the response message of the second request message sent by the CDN server; the sending module 901 is also used to: if the second request message If the response message includes information that the request failed, a third request message is sent to the source server according to the second resource address, and the third request message is used to request The SDK static resource located in the source server; the receiving module 902 is also configured to receive a response message from the source server returning the third request message, where the response message of the third request message includes the SDK static resources;
  • the terminal device further includes: a processing module 903 that implements the SDK function according to the SDK static resource, and the SDK function includes: a login verification function.
  • the above units may be one or more integrated circuits configured to implement the above methods, such as: one or more application specific integrated circuits (ASICs), or one or more microprocessors (digital singnal processor, DSP), or one or more field programmable gate arrays (field programmable gate array, FPGA), etc.
  • ASICs application specific integrated circuits
  • DSP digital singnal processor
  • FPGA field programmable gate array
  • the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call programs.
  • CPU central processing unit
  • these units can be integrated together and implemented in the form of a system-on-a-chip (SOC).
  • SOC system-on-a-chip
  • An embodiment of the present application provides an SDK server, including: a receiving module 1002, configured to receive a fourth request message sent by a business server.
  • the fourth request message is used to obtain information about SDK static resources.
  • the SDK static resources are To implement the SDK function associated with the business page;
  • the sending module 1001 is configured to return a response message of the fourth request message to the business server, where the response message of the fourth request message includes a first resource address and a second resource Address, the first resource address points to the SDK static resource located on the CDN server, and the second resource address points to the SDK static resource located on the source server.
  • the second resource address is a backup address.
  • the SDK server further includes: an update module 1003, configured to update the first resource address and/or update the second resource address.
  • the above units may be one or more integrated circuits configured to implement the above methods, such as: one or more application specific integrated circuits (ASICs), or one or more microprocessors (digital signal processor, DSP), or one or more field programmable gate arrays (field programmable gate array, FPGA), etc.
  • ASICs application specific integrated circuits
  • DSP digital signal processor
  • FPGA field programmable gate array
  • the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call programs.
  • CPU central processing unit
  • these units can be integrated together and implemented in the form of a system-on-a-chip (SOC).
  • SOC system-on-a-chip
  • Figure 11 is a schematic diagram of another embodiment of the terminal device in the embodiment of the present application.
  • the terminal device provided in this embodiment can be an electronic device such as a mobile phone, a laptop computer, a desktop computer, a tablet computer, a wearable device, etc.
  • the specific device form is not limited in the embodiment of this application.
  • the terminal device 1100 may vary greatly due to different configurations or performance, and may include one or more processors 1101 and a memory 1102, with programs or data stored in the memory 1102.
  • the memory 1102 can be volatile storage or non-volatile storage.
  • the processor 1101 is one or more central processing units (CPUs), which may be single-core CPUs or multi-core CPUs.
  • the processor 1101 can communicate with the memory 1102 and execute a series of instructions in the memory 1102 on the terminal device 1100 .
  • the terminal device 1100 also includes one or more wired or wireless network interfaces 1103, such as an Ethernet interface.
  • the terminal device 1100 may also include one or more power supplies; one or more input and output interfaces, which may be used to connect a display, mouse, keyboard, touch screen device or sensor.
  • input and output interfaces are optional components, which may or may not exist, and are not limited here.
  • the process executed by the processor 1101 in the terminal device 1100 may refer to the method process described in the foregoing method embodiment, and will not be described again here.
  • Figure 12 is a schematic diagram of another embodiment of the SDK server in the embodiment of the present application.
  • the SDK server provided in this embodiment can be a virtual machine or a physical server, and the specific device form is not limited in the embodiment of this application.
  • the SDK server 1200 may vary greatly due to different configurations or performance, and may include one or more processors 1201 and memory 1202, with programs or data stored in the memory 1202.
  • the memory 1202 can be volatile storage or non-volatile storage.
  • the processor 1201 is one or more central processing units (CPUs), which may be single-core CPUs or multi-core CPUs.
  • the processor 1201 can communicate with the memory 1202 and execute a series of instructions in the memory 1202 on the SDK server 1200 .
  • the SDK server 1200 also includes one or more wired or wireless network interfaces 1203, such as an Ethernet interface.
  • the SDK server 1200 may also include one or more power supplies; one or more input and output interfaces, which may be used to connect a monitor, mouse, keyboard, touch screen device or sensor.
  • input and output interfaces are optional components, which may or may not exist, and are not limited here.
  • the process executed by the processor 1201 in the SDK server 1200 can refer to the method process described in the foregoing method embodiment, and will not be described again here.
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented.
  • Another point, shown The mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit.
  • the above integrated units can be implemented in the form of hardware or software functional units.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Telephonic Communication Services (AREA)

Abstract

本申请公开了一种业务容灾方法,用于SDK静态资源容灾。本申请实施例方法包括:终端设备(100)向业务服务器(200)发送第一请求消息,第一请求消息可用于请求SDK静态资源,终端设备(100)获取业务服务器(200)返回的第一资源地址和第二资源地址,第一资源地址指向位于内容分发网络CDN服务器(400)的SDK静态资源,第二资源地址指向位于源服务器(500)的SDK静态资源。终端设备(100)在基于第一资源地址获取SDK静态资源失败时,可以根据第二资源地址向源服务器(500)请求资源,提升业务可靠性。

Description

业务容灾方法、终端设备、软件开发包服务器和通信系统
本申请要求于2022年05月27日提交中国专利局、申请号为202210590988.6、申请名称为“业务容灾方法、终端设备、软件开发包服务器和通信系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种业务容灾方法、终端设备、软件开发包服务器和通信系统。
背景技术
用户访问业务服务器时,业务服务器可以通过软件开发包(software development kit,SDK)技术集成部分产品功能。由于通过源服务器提供SDK静态资源对于不同地域的用户访问速度会有很大差异,因此,通常将静态资源存储在内容分发网络(content delivery network,CDN)服务器,以提升用户访问速度。
现有技术中,终端设备向业务服务器发起请求,业务服务器向终端设备返回位于CDN服务器的静态资源的地址,终端设备基于该地址向CDN服务器请求静态资源。
但是,CDN服务器由外部服务商维护,当CDN服务器发生故障,会引发用户功能不可用。
发明内容
本申请实施例公开了一种业务容灾方法,用于SDK静态资源容灾。
本申请的第一方面提供了一种业务容灾方法,包括:终端设备向业务服务器发送第一请求消息,所述第一请求消息用于请求显示业务页面所需的资源,所述资源包括软件开发包SDK静态资源,所述SDK静态资源用于实现与所述业务页面关联的SDK功能;所述终端设备获取所述业务服务器返回的所述第一请求消息的响应消息,所述第一请求消息的响应消息包括第一资源地址和第二资源地址,所述第一资源地址指向位于内容分发网络CDN服务器的所述SDK静态资源,所述第二资源地址指向位于源服务器的所述SDK静态资源。
本申请实施例提供的业务容灾方法,终端设备向业务服务器请求SDK静态资源信息,可以从业务服务器获取两个资源地址,包括位于CDN服务器的SDK静态资源的地址,以及位于源服务器的SDK静态资源的地址。当CDN服务器或源服务器中有一个服务器处于正常工作状态,都可以保证终端设备能够正常获取SDK静态资源,实现业务页面关联的SDK功能。即使部分服务器故障,例如CDN服务器故障,也可以保障业务正常,提升了业务的容灾能力。
在第一方面的一种可能的实现方式中,所述第二资源地址为备用地址。
本申请实施例提供的业务容灾方法,可以将第二资源地址作为备用地址,由于CDN服务器可以为部署在各地的边缘服务器,可以使用户就近获取所需内容,降低网络拥塞,提 高用户访问响应速度,通常优先请求第一资源地址指向的位于CDN服务器的SDK资源。但CDN服务器通常由外部服务商维护,若发生故障,将导致SDK服务不可用,存在不可控性。因此,向终端设备提供第二资源地址,指向位于源服务器的SDK资源,当CDN服务器故障时,可以由源服务器提供业务保障。
在第一方面的一种可能的实现方式中,所述方法还包括:所述终端设备根据所述第一资源地址向所述CDN服务器发送第二请求消息,所述第二请求消息用于请求位于所述CDN服务器的所述SDK静态资源;所述终端设备接收所述CDN服务器发送的所述第二请求消息的响应消息;若所述第二请求消息的响应消息包括请求失败的信息,则所述终端设备根据所述第二资源地址向所述源服务器发送第三请求消息,所述第三请求消息用于请求位于所述源服务器的所述SDK静态资源;所述终端设备接收所述源服务器返回所述第三请求消息的响应消息,所述第三请求消息的响应消息包括所述SDK静态资源。
本申请实施例提供的业务容灾方法,若根据第一资源地址向CDN服务器请求SDK静态资源失败,终端可以根据第二资源地址获取位于源服务器的SDK静态资源,业务容灾能力强,业务可靠性提升。
在第一方面的一种可能的实现方式中,所述方法还包括:所述终端设备根据所述SDK静态资源实现所述SDK功能,所述SDK功能包括:登录验证功能或注册功能。
本申请的第二方面提供了一种业务容灾方法,包括:SDK服务器接收业务服务器发送的第四请求消息,所述第四请求消息用于获取SDK静态资源,所述SDK静态资源用于实现与业务页面关联的SDK功能;所述SDK服务器向所述业务服务器返回所述第四请求消息的响应消息,所述第四请求消息的响应消息包括第一资源地址和第二资源地址,所述第一资源地址指向位于CDN服务器的所述SDK静态资源,所述第二资源地址指向位于源服务器的所述SDK静态资源。
本申请实施例提供的业务容灾方法,SDK服务器可以提供至少两个位于不同服务器的SDK静态资源的地址,当其中一个服务器故障时,可以通过另一个服务器提供SDK静态资源,由此,可以提升业务的容灾能力。
在第二方面的一种可能的实现方式中,所述第二资源地址为备用地址。
本申请实施例提供的业务容灾方法,可以将第二资源地址作为备用地址,由于CDN服务器可以为部署在各地的边缘服务器,使得用户可以就近获取所需资源,降低网络拥塞,提高用户访问响应速度,通常优先请求第一资源地址指向的位于CDN服务器的SDK资源。但CDN服务器通常由外部服务商维护,若发生故障,将导致SDK服务不可用,存在不可控性。因此,提供指向位于源服务器的SDK资源的第二资源地址,当CDN服务器故障时,可以由源服务器提供业务保障。可以在提高用户访问响应速度的同时,提供业务容灾能力,业务可靠性提升。
在第二方面的一种可能的实现方式中,所述方法还包括:所述SDK服务器更新所述第一资源地址和/或更新所述第二资源地址。
本申请实施例提供的业务容灾方法,当SDK静态资源更新,例如版本升级等场景下,更新SDK服务器中的第一资源地址和/或第二资源地址,由此,可以向业务服务器返回动态 更新的可靠地址信息。
本申请的第三方面提供了一种业务容灾方法,包括:业务服务器接收终端设备发送的第一请求消息,所述第一请求消息显示业务页面所需的资源,所述资源包括软件开发包SDK静态资源,所述SDK静态资源用于实现与所述业务页面关联的SDK功能;所述业务服务器根据所述第一请求消息向SDK服务器发送第四请求消息,所述第四请求消息用于获取SDK静态资源;所述业务服务器接收所述SDK服务器返回的所述第四请求消息的响应消息,所述第四请求消息的响应消息包括第一资源地址和第二资源地址,所述第一资源地址指向位于CDN服务器的所述SDK静态资源,所述第二资源地址指向位于源服务器的所述SDK静态资源;所述业务服务器向终端转发所述第一资源地址和所述第二资源地址。
在第三方面的一种可能的实现方式中,所述第二资源地址为备用地址,用于在所述第一资源地址获取资源失效时使用。
本申请的第四方面提供了一种终端设备,包括:
发送模块,用于向业务服务器发送第一请求消息,所述第一请求消息用于请求显示业务页面所需的资源,所述资源包括SDK静态资源,所述SDK静态资源用于实现与所述业务页面关联的SDK功能;
接收模块,用于获取所述业务服务器返回的所述第一请求消息的响应消息,所述第一请求消息的响应消息包括第一资源地址和第二资源地址,所述第一资源地址指向位于内容分发网络CDN服务器的所述SDK静态资源,所述第二资源地址指向位于源服务器的所述SDK静态资源。
在第四方面的一种可能的实现方式中,所述第二资源地址为备用地址。
在第四方面的一种可能的实现方式中,所述发送模块还用于,根据所述第一资源地址向所述CDN服务器发送第二请求消息,所述第二请求消息用于请求位于所述CDN服务器的所述SDK静态资源;所述接收模块还用于,接收所述CDN服务器发送的所述第二请求消息的响应消息;所述发送模块还用于,若所述第二请求消息的响应消息包括请求失败的信息,则根据所述第二资源地址向所述源服务器发送第三请求消息,所述第三请求消息用于请求位于所述源服务器的所述SDK静态资源;所述接收模块还用于,接收所述源服务器返回所述第三请求消息的响应消息,所述第三请求消息的响应消息包括所述SDK静态资源;
在第四方面的一种可能的实现方式中,所述终端设备还包括:处理模块,根据所述SDK静态资源实现所述SDK功能,所述SDK功能包括:登录验证功能。
本申请的第五方面提供了一种SDK服务器,包括:接收模块,用于接收业务服务器发送的第四请求消息,所述第四请求消息用于获取SDK静态资源,所述SDK静态资源用于实现与业务页面关联的SDK功能;发送模块,用于向所述业务服务器返回所述第四请求消息的响应消息,所述第四请求消息的响应消息包括第一资源地址和第二资源地址,所述第一资源地址指向位于CDN服务器的所述SDK静态资源,所述第二资源地址指向位于源服务器的所述SDK静态资源。
在第五方面的一种可能的实现方式中,所述第二资源地址为备用地址。
在第五方面的一种可能的实现方式中,所述SDK服务器还包括:更新模块,用于更新 所述第一资源地址和/或更新所述第二资源地址。
本申请的第六方面提供了一种业务服务器,包括:接收模块,用于接收终端设备发送的第一请求消息,所述第一请求消息显示业务页面所需的资源,所述资源包括软件开发包SDK静态资源,所述SDK静态资源用于实现与所述业务页面关联的SDK功能;发送模块,用于根据所述第一请求消息向SDK服务器发送第四请求消息,所述第四请求消息用于获取SDK静态资源;所述接收模块还用于接收所述SDK服务器返回的第四请求消息的响应消息,所述第四请求消息的响应消息包括第一资源地址和第二资源地址,所述第一资源地址指向位于CDN服务器的所述SDK静态资源,所述第二资源地址指向位于源服务器的所述SDK静态资源;所述发送模块还用于向终端转发所述第一资源地址和所述第二资源地址。
在第六方面的一种可能的实现方式中,所述第二资源地址为备用地址。
本申请第七方面提供了一种终端设备,包括:存储器,所述存储器中存储有计算机可读指令;与所述存储器相连的处理器,所述计算机可读指令被所述处理器执行时,使得所述终端设备实现如上述第一方面以及各种可能的实现方式中任一项所述的方法。
本申请第八方面提供了一种SDK服务器,包括:存储器,所述存储器中存储有计算机可读指令;与所述存储器相连的处理器,所述计算机可读指令被所述处理器执行时,使得所述SDK服务器实现如上述第二方面以及各种可能的实现方式中任一项所述的方法。
本申请第九方面提供了一种业务服务器,包括:存储器,所述存储器中存储有计算机可读指令;与所述存储器相连的处理器,所述计算机可读指令被所述处理器执行时,使得所述业务服务器实现如上述第三方面以及各种可能的实现方式中任一项所述的方法。
本申请第十方面提供了计算机程序产品,包括计算机可读指令,当所述计算机可读指令在计算机上运行时,使得所述计算机执行如上述第一方面、第二方面、第三方面以及各种可能的实现方式中任一项所述的方法。
本申请第十一方面提供了一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当所述指令在计算机上运行时,使得计算机执行如上述第一方面、第二方面、第三方面以及各种可能的实现方式中任一项所述的方法。
本申请第十二方面提供了一种芯片,包括处理器。处理器用于读取并执行存储器中存储的计算机程序,以执行上述任一方面任意可能的实现方式中的方法。可选地,该芯片该包括存储器,该存储器与该处理器通过电路或电线与存储器连接。进一步可选地,该芯片还包括通信接口,处理器与该通信接口连接。通信接口用于接收需要处理的数据和/或信息,处理器从该通信接口获取该数据和/或信息,并对该数据和/或信息进行处理,并通过该通信接口输出处理结果。该通信接口可以是输入输出接口。
本申请第十三方面提供了一种通信系统,所述通信系统包括终端设备,业务服务器,SDK服务器;所述终端设备用于向业务服务器发送第一请求消息,所述第一请求消息用于请求显示业务页面所需的资源,所述资源包括软件开发包SDK静态资源,所述SDK静态资源用于实现与所述业务页面关联的SDK功能;所述业务服务器用于根据所述第一请求消息向所述SDK服务器发送第四请求消息,所述第四请求消息用于请求SDK静态资源;所示SDK服务器用于根据所述第四请求消息,向所述业务服务器返回所述第四请求消息的响应消息, 所述第四请求消息的响应消息包括第一资源地址和第二资源地址,所述第一资源地址指向位于CDN服务器的所述SDK静态资源,所述第二资源地址指向位于源服务器的所述SDK静态资源;所述业务服务器还用于向所述终端服务器发送所述第一请求消息的响应消息,所述第一请求消息的响应消息包括所述第一资源地址和所述第二资源地址。
在第十三方面的一种可能的实现方式中,该通信系统还包括CDN服务器和源服务器;所述终端设备还用于根据所述第一资源地址向所述CDN服务器发送第二请求消息,所述第二请求消息用于请求位于所述CDN服务器的所述SDK静态资源;所述CDN服务器用于根据所述第二请求消息返回所述第二请求消息的响应消息;若所述第二请求消息的响应消息包括请求失败的信息,则所述终端设备还用于根据所述第二资源地址向所述源服务器发送第三请求消息,所述第三请求消息用于请求位于所述源服务器的所述SDK静态资源;所述源服务器用于根据所述第三请求消息向所述终端设备返回第三请求消息的响应消息,所述第三请求消息的响应消息包括所述SDK静态资源。
在第十三方面的一种可能的实现方式中,所述终端服务器还用于根据所述SDK静态资源实现所述SDK功能,所述SDK功能包括:登录验证功能。
其中,第四方面、第五方面、第六方面、第七方面、第八方面、第九方面、第十方面、第十一方面、第十二方面以及第十三方面中任一种实现方式所带来的技术效果可参见第一方面至第三方面中相应实现方式所带来的技术效果,此处不再赘述。
本申请提供的业务容灾方法,终端设备可以获取SDK静态资源的两个资源地址,包括位于CDN服务器的SDK静态资源的地址,以及位于源服务器的SDK静态资源的地址。当CDN服务器或源服务器中有一个服务器处于正常工作状态,都可以保证终端设备能够正常获取SDK静态资源,实现业务页面关联的SDK功能。即使部分服务器故障,例如CDN服务器故障,也可以保障业务正常,提升了业务的容灾能力。
附图说明
图1为本申请实施例提供的业务容灾方法的一个系统架构图;
图2为本申请实施例中业务容灾方法的一个实施例示意图;
图3为本申请实施例中业务服务器和SDK服务器交互的一个实施例示意图;
图4为本申请实施例中终端设备中模块交互的一个实施例示意图;
图5为本申请实施例中业务容灾方法的另一个实施例示意图;
图6为本申请实施例中业务服务器返回终端设备的信息的代码示意图;
图7为本申请实施例中终端设备切换加载源服务器的SDK静态资源地址的代码示意图;
图8为本申请实施例中电商登录界面的效果图;
图9为本申请实施例中终端设备的一个实施例示意图;
图10为本申请实施例中SDK服务器的一个实施例示意图;
图11为本申请实施例中终端设备的另一个实施例示意图;
图12为本申请实施例中SDK服务器的另一个实施例示意图。
具体实施方式
本申请实施例公开了一种业务容灾方法,用于SDK静态资源容灾,可以提升业务可靠性。
下面结合附图,对本申请的实施例进行描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。本领域普通技术人员可知,随着技术的发展和新场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或模块的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或模块,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或模块。在本申请中出现的对步骤进行的命名或者编号,并不意味着必须按照命名或者编号所指示的时间/逻辑先后顺序执行方法流程中的步骤,已经命名或者编号的流程步骤可以根据要实现的技术目的变更执行次序,只要能达到相同或者相类似的技术效果即可。
为了便于理解,下面对本申请实施例涉及的部分技术术语进行简要介绍:
1、软件开发工具包(software development kit,SDK)
软件开发工具包一般都是一些软件工程师为特定的软件包、软件框架、硬件平台、操作系统等建立应用软件时的开发工具的集合。软件开发工具广义上指辅助开发某一类软件的相关文档、范例和工具的集合。
软件开发工具包是一些被软件工程师用于为特定的软件包、软件框架、硬件平台、操作系统等创建应用软件的开发工具的集合,一般而言SDK即开发Windows平台下的应用程序所使用的SDK。它可以简单的为某个程序设计语言提供应用程序接口API的一些文件,但也可能包括能与某种嵌入式系统通讯的复杂的硬件。一般的工具包括用于调试和其他用途的实用工具。SDK还经常包括示例代码、支持性的技术注解或者其他的为基本参考资料澄清疑点的支持文档。
2、JS-SDK(JavaScript software development kit,JavaScript SDK)JS软件开发工具包
JavaScript(简称“JS”)是一种具有函数优先的轻量级,解释型或即时编译型的编程语言。JS-SDK为本申请实施例中SDK静态资源的一种可选的实现方式。
3、内容分发网络(content delivery network,CDN)
CDN是构建在现有网络基础之上的智能虚拟网络,依靠部署在各地的边缘服务器,通过中心平台的负载均衡、内容分发、调度等功能模块,使用户就近获取所需内容,降低网络拥塞,提高用户访问响应速度和命中率。CDN的关键技术主要有内容存储和分发技术。
4、容灾(disaster tolerance)
容灾系统是指在相隔较远的异地,建立两套或多套功能相同的系统,互相之间可以进行健康状态监视和功能切换,当一处系统因意外(如火灾、地震或故障等)停止工作时, 系统可以切换到另一处,使得该系统功能可以继续正常工作。容灾技术是系统的高可用性技术的一个组成部分,提供节点级别的系统恢复功能。
下面对本申请实施例中业务容灾方法的应用场景架构进行介绍,请参阅图1,该应用场景架构包括:终端设备100、业务服务器200、SDN服务器300、CDN服务器400和源服务器500。
其中,终端设备100与业务服务器200之间通过网络连接进行通信,业务服务器200与SDN服务器300之间通过网络连接进行通信,终端设备100与CDN服务器400之间通过网络连接进行通信,和源服务器500之间通过网络连接进行通信。需要说明的是,CDN服务器400作为部署在各地的边缘服务器,用于使用户就近获取所需内容,通常与终端设备100的物理位置较近。而源服务器500与终端设备100的物理位置可能近,也可能较远,也就是说,对于不同的终端设备100到源服务器500的访问速度差异较大。
用户通过终端设备100的浏览器访问业务界面,浏览器显示业务界面所需的资源可以请求业务服务器200获取,需要说明的是,部分产品功能,例如验证登录或者注册信息等功能通过JS-SDK的方式集成,终端设备100需要获取SDK静态资源以实现这些业务功能。
过去,SDK静态资源存储在源服务器500上,由于用户访问速度差异较大影响用户体验,因此,可以通过购买CDN服务,将SDK静态资源存储在CDN服务器400上,但是CDN服务器由外部服务商提供维护,一旦出现故障将引发用户功能不可用。
有鉴于此,本申请实施例提供了一种业务容灾方法和网络设备,用于SDK静态资源容灾,可以提升业务可靠性。
参见图2,本申请实施例提出了一种业务容灾的方法,该方法可以应用于图1所示的场景中,其中,在图1所示的应用场景中,用户终端相当于图1所示的,该方法包括步骤201-208。
201、终端设备向业务服务器发送第一请求消息;
用户通过终端设备浏览器访问业务网页,浏览器获取到用户访问的地址后,可以向业务服务器发送第一请求消息,所述第一请求消息用于请求显示业务页面所需的资源,所述资源包括软件开发包SDK静态资源,所述SDK静态资源用于实现与所述业务页面关联的SDK功能;
在一种可能的实现方式中,所述第二资源地址为备用地址,可以理解的是,备用地址可以在所述第一资源地址获取资源失效时使用。
202、业务服务器向SDK服务器发送第四请求消息;
SDK服务器接收业务服务器发送的第四请求消息,所述第四请求消息用于获取SDK静态资源,所述SDK静态资源用于实现与业务页面关联的SDK功能;
203、SDK服务器向业务服务器返回第四请求消息的响应消息;
所述SDK服务器向所述业务服务器返回所述第四请求消息的响应消息,所述第四请求消息的响应消息包括第一资源地址和第二资源地址,所述第一资源地址指向位于CDN服务器的所述SDK静态资源,所述第二资源地址指向位于源服务器的所述SDK静态资源。
也就是说,SDK服务器不仅提供了位于CDN服务器的所述SDK静态资源,还提供了CDN 服务器故障后用于切换的位于源服务器的SDK静态资源的地址。
在一种可能的实现方式中,所述SDK服务器更新所述第一资源地址和/或更新所述第二资源地址。
204、业务服务器向终端设备返回第一请求消息的响应消息;
所述终端设备获取所述业务服务器返回的所述第一请求消息的响应消息,所述第一请求消息的响应消息包括第一资源地址和第二资源地址,所述第一资源地址指向位于内容分发网络CDN服务器的所述SDK静态资源,所述第二资源地址指向位于源服务器的所述SDK静态资源。
在一种可能的实现方式中,终端设备在执行步骤205之前,可以先检查CDN网络是否正常,检查方式可参考现有方法,此处不做限定。若检查结果为正常,则向该CDN服务器发送第二请求消息;若检查结果为异常,则执行步骤207-208。
205、终端设备向CDN服务器发送第二请求消息;
所述终端设备根据所述第一资源地址向所述CDN服务器发送第二请求消息,所述第二请求消息用于请求位于所述CDN服务器的所述SDK静态资源。
206、CDN服务器向终端设备返回第二请求消息的响应消息;
终端设备接收所述CDN服务器发送的所述第二请求消息的响应消息;
207、终端设备向源服务器发送第三请求消息;
若所述第二请求消息的响应消息包括请求失败的信息,则所述终端设备根据所述第二资源地址向所述源服务器发送第三请求消息,所述第三请求消息用于请求位于所述源服务器的所述SDK静态资源;
208、源服务器向终端设备返回第三请求消息的响应消息。
所述终端设备接收所述源服务器返回所述第三请求消息的响应消息,所述第三请求消息的响应消息包括所述SDK静态资源。
本申请实施例提供的业务容灾方法,终端设备向业务服务器请求SDK静态资源信息,可以从业务服务器获取两个资源地址,包括位于CDN服务器的SDK静态资源的地址,以及位于源服务器的SDK静态资源的地址。当CDN服务器或源服务器中有一个服务器处于正常工作状态,都可以保证终端设备能够正常获取SDK静态资源,实现业务页面关联的SDK功能。即使部分服务器故障,例如CDN服务器故障,也可以保障业务正常,提升了业务的容灾能力。
请参阅图3和图4,对本申请实施例中终端设备、业务服务器和SDK服务器中涉及本方法的模块进行简要介绍。如图3所示,基于上述实施例可以了解到,业务服务器通过请求模块301向SDK服务器请求SDK静态资源,SDK服务器配置存储模块302,可以存储SDK静态资源的地址信息。SDK服务器从存储模块302中读取第一资源地址和第二资源地址,所述第一资源地址指向位于内容分发网络CDN服务器的所述SDK静态资源,所述第二资源地址指向位于源服务器的所述SDK静态资源CDN和源站配置地址信息,并返回给业务服务器。
如图4所示,在一种可能的实现方式中,终端设备包括JS处理模块401,和缓存模块 402,浏览器JS处理模块401用于处理CDN的异常,如果发现异常,则向缓存模块402存储标识,后续加载同一个会话内的SDK静态资源时,可以先检查缓存模块中是否存在标识,如果有标识则直接向源服务器请求SDK资源。
为便于理解,下面举例进行示意,具体请参阅图5,本申请实施例提出了一种业务容灾的方法。所述方法可以应用于图1所示的场景中,其中,在图1所示的应用场景中,用户终端相当于图1所示的终端设备100,电商服务器相当于图1所示的业务服务器200,登录验证服务器相当于图1所示的SDN服务器,该方法包括步骤501-511。
501、终端设备向电商服务器请求显示业务页面所需的资源;
终端设备向电商服务器请求显示业务页面所需的资源,示例性的,终端设备为个人电脑,获取用户在浏览器浏览电商网站的请求,若用户准备在电商网站购物,则需要先登录网站,访问电商的购物登录界面https://www.shop.com/index.html,终端设备通过浏览器获取访问地址后,会根据www.shop.com域名解析到电商服务器,询问电商服务器登录界面所需展示的内容。
502、电商服务器向登录验证服务器请求获取SDK信息;
电商服务器收到浏览器的界面请求后,整理页面展示的界面标题及背景图等内容。此外,部分SDK功能,例如涉及用户登录、验证或注册等功能,委托给登录验证服务器实现,电商服务器需要向登录验证服务器请求获取SDK信息,SDK信息即SDK静态资源(示例性地,本申请实施例中SDK静态资源具体为JS-SDK静态资源)的地址。
503、登录验证服务器确定SDK信息;
登录验证服务器收到电商服务器请求后,登录验证服务器确定JS-SDK静态资源地址,即获取loginJSSDK.js的URL地址信息。
这个JS-SDK静态资源,存储于两个静态资源服务上,有两个URL地址:
a.放置在购买的CDN服务上,位于CDN服务器的SDK静态资源地址(即第一资源地址)为https://www.cdn.com/loginJSSDK.js;
b.放置在帐号平台搭建的Nginx静态资源的源服务器上的SDK静态资源地址(即第二资源地址)为https://www.account.com/loginJSSDK.js。
504、登录验证服务器向电商服务器返回SDK信息;
登录验证服务器向电商服务器返回SDK信息,示例性地,请参阅图6中的JS-SDK信息,包括第一资源地址和第二资源地址。电商服务器向终端设备返回页面时同时把JS-SDK静态资源地址信息返回给终端设备的浏览器,浏览器即可基于该JS-SDK静态资源地址进行下载,执行后就能渲染出帐号登录的界面框。这个JS-SDK静态资源实现了SDK(软件开发包)的功能,称之为JS-SDK。为了获取loginJSSDK.js的URL地址信息,电商服务器请求登录验证服务器获取最新开放登录功能的JS-SDK信息。
505、电商服务器向终端设备返回SDK信息;
电商服务器向终端设备返回显示业务页面所需的资源,包括标题、背景图,以及html格式的用于登录验证的JS URL信息。请参阅图6中电商服务器返回终端设备的信息。
506、终端设备向CDN服务器请求SDK静态资源;
终端设备浏览器解析电商服务器返回的信息,初始化登录验证JS-SDK功能,加载用于登录验证的JS静态资:jsSdkUrl,浏览器向CDN服务器请求下载SDK静态资源https://www.cdn.com/loginJSSDK.js,发送请求到www.cdn.com这个域名下载JS-SDK静态资源。
507、CDN服务器向终端设备返回响应消息;
若步骤507返回的响应消息中包括请求SDK静态资源失败的信息,则终端设备加载第二资源地址,即触发步骤508-511。若https://www.cdn.com/loginJSSDK.js下载异常,步骤507返回异常码404,浏览器收到404错误。
若步骤507返回的响应消息中包括SDK静态资源,则直接执行步骤511。
508、若捕获异常,则加载第二资源地址;
终端设备根据异常码404,则加载https://www.account.com/loginJSSDK.js。请参考图7所示的示意代码。
509、终端设备向源服务器请求SDK静态资源;
终端设备向源服务器请求下载JS-SDK静态资源。
510、源服务器向终端设备返回SDK静态资源;
511、终端设备根据SDK资源实现业务功能。
浏览器获取到源服务器返回的loginJSSDK.js,执行loginJSSDK.js,此JS处理模块会动态加载登录验证功能依赖的其他js文件或css文件等。最终https://www.shop.com/index.html这个业务界面,显示如图8所示的电商登录界面效果图,其中白色区域的帐号密码输入框为加载JS-SDK静态资源后渲染的登录框,其他部分为电商返回的标题和背景图。
上面介绍了本申请提供的业务容灾方法,下面对实现该业务容灾方法的终端设备进行介绍,请参阅图9,为本申请实施例中终端设备的一个实施例示意图。
本申请提供了一种终端设备,包括:
发送模块901,用于向业务服务器发送第一请求消息,所述第一请求消息用于请求显示业务页面所需的资源,所述资源包括软件开发包SDK静态资源的信息,所述SDK静态资源用于实现与所述业务页面关联的SDK功能;
接收模块902,用于获取所述业务服务器返回的所述第一请求消息的响应消息,所述第一请求消息的响应消息包括第一资源地址和第二资源地址,所述第一资源地址指向位于内容分发网络CDN服务器的所述SDK静态资源,所述第二资源地址指向位于源服务器的所述SDK静态资源。
在一种可能的实现方式中,所述第二资源地址为备用地址。
在一种可能的实现方式中,所述发送模块901还用于,根据所述第一资源地址向所述CDN服务器发送第二请求消息,所述第二请求消息用于请求位于所述CDN服务器的所述SDK静态资源;所述接收模块902还用于,接收所述CDN服务器发送的所述第二请求消息的响应消息;所述发送模块901还用于,若所述第二请求消息的响应消息包括请求失败的信息,则根据所述第二资源地址向所述源服务器发送第三请求消息,所述第三请求消息用于请求 位于所述源服务器的所述SDK静态资源;所述接收模块902还用于,接收所述源服务器返回所述第三请求消息的响应消息,所述第三请求消息的响应消息包括所述SDK静态资源;
在一种可能的实现方式中,所述终端设备还包括:处理模块903,根据所述SDK静态资源实现所述SDK功能,所述SDK功能包括:登录验证功能。
应理解以上终端设备的各个单元的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且这些单元可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分单元以软件通过处理元件调用的形式实现,部分单元以硬件的形式实现。
例如,以上这些单元可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(application specific integrated circuit,ASIC),或,一个或多个微处理器(digital singnal processor,DSP),或,一个或者多个现场可编程门阵列(field programmable gate array,FPGA)等。再如,当以上某个单元通过处理元件调度程序的形式实现时,该处理元件可以是通用处理器,例如中央处理器(central processing unit,CPU)或其它可以调用程序的处理器。再如,这些单元可以集成在一起,以片上系统(system-on-a-chip,SOC)的形式实现。
上面介绍了本申请提供的业务容灾方法,下面对实现该业务容灾方法的SDK服务器进行介绍,请参阅图10,为本申请实施例中SDK服务器的一个实施例示意图。
本申请实施例提供了一种SDK服务器,包括:接收模块1002,用于接收业务服务器发送的第四请求消息,所述第四请求消息用于获取SDK静态资源的信息,所述SDK静态资源用于实现与业务页面关联的SDK功能;发送模块1001,用于向所述业务服务器返回所述第四请求消息的响应消息,所述第四请求消息的响应消息包括第一资源地址和第二资源地址,所述第一资源地址指向位于CDN服务器的所述SDK静态资源,所述第二资源地址指向位于源服务器的所述SDK静态资源。
在一种可能的实现方式中,所述第二资源地址为备用地址。
在一种可能的实现方式中,所述SDK服务器还包括:更新模块1003,用于更新所述第一资源地址和/或更新所述第二资源地址。
应理解以上SDK服务器的各个单元的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且这些单元可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分单元以软件通过处理元件调用的形式实现,部分单元以硬件的形式实现。
例如,以上这些单元可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(application specific integrated circuit,ASIC),或,一个或多个微处理器(digital signal processor,DSP),或,一个或者多个现场可编程门阵列(field programmable gate array,FPGA)等。再如,当以上某个单元通过处理元件调度程序的形式实现时,该处理元件可以是通用处理器,例如中央处理器(central processing unit,CPU)或其它可以调用程序的处理器。再如,这些单元可以集成在一起,以片上系统(system-on-a-chip,SOC)的形式实现。
请参阅图11,为本申请实施例中终端设备的另一个实施例示意图;
本实施例提供的终端设备,可以为手机、笔记本电脑、台式电脑、平板电脑、可穿戴设备等电子设备,本申请实施例中对其具体设备形态不做限定。
该终端设备1100可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器1101和存储器1102,该存储器1102中存储有程序或数据。
其中,存储器1102可以是易失性存储或非易失性存储。可选地,处理器1101是一个或多个中央处理器(central processing unit,CPU),该CPU可以是单核CPU,也可以是多核CPU。处理器1101可以与存储器1102通信,在终端设备1100上执行存储器1102中的一系列指令。
该终端设备1100还包括一个或一个以上有线或无线网络接口1103,例如以太网接口。
可选地,尽管图11中未示出,终端设备1100还可以包括一个或一个以上电源;一个或一个以上输入输出接口,输入输出接口可以用于连接显示器、鼠标、键盘、触摸屏设备或传感设备等,输入输出接口为可选部件,可以存在也可以不存在,此处不做限定。
本实施例中终端设备1100中的处理器1101所执行的流程可以参考前述方法实施例中描述的方法流程,此处不加赘述。
请参阅图12,为本申请实施例中SDK服务器的另一个实施例示意图;
本实施例提供的SDK服务器,可以为虚拟机或物理服务器等,本申请实施例中对其具体设备形态不做限定。
该SDK服务器1200可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器1201和存储器1202,该存储器1202中存储有程序或数据。
其中,存储器1202可以是易失性存储或非易失性存储。可选地,处理器1201是一个或多个中央处理器(central processing unit,CPU),该CPU可以是单核CPU,也可以是多核CPU。处理器1201可以与存储器1202通信,在SDK服务器1200上执行存储器1202中的一系列指令。
该SDK服务器1200还包括一个或一个以上有线或无线网络接口1203,例如以太网接口。
可选地,尽管图12中未示出,SDK服务器1200还可以包括一个或一个以上电源;一个或一个以上输入输出接口,输入输出接口可以用于连接显示器、鼠标、键盘、触摸屏设备或传感设备等,输入输出接口为可选部件,可以存在也可以不存在,此处不做限定。
本实施例中SDK服务器1200中的处理器1201所执行的流程可以参考前述方法实施例中描述的方法流程,此处不加赘述。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显 示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (17)

  1. 一种业务容灾方法,其特征在于,包括:
    终端设备向业务服务器发送第一请求消息,所述第一请求消息用于请求显示业务页面所需的资源,所述资源包括软件开发包SDK静态资源,所述SDK静态资源用于实现与所述业务页面关联的SDK功能;
    所述终端设备获取所述业务服务器返回的所述第一请求消息的响应消息,所述第一请求消息的响应消息包括第一资源地址和第二资源地址,所述第一资源地址指向位于内容分发网络CDN服务器的所述SDK静态资源,所述第二资源地址指向位于源服务器的所述SDK静态资源。
  2. 根据权利要求1所述的方法,其特征在于,所述第二资源地址为备用地址。
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:
    所述终端设备根据所述第一资源地址向所述CDN服务器发送第二请求消息,所述第二请求消息用于请求位于所述CDN服务器的所述SDK静态资源;
    所述终端设备接收所述CDN服务器发送的所述第二请求消息的响应消息;
    若所述第二请求消息的响应消息包括请求失败的信息,则所述终端设备根据所述第二资源地址向所述源服务器发送第三请求消息,所述第三请求消息用于请求位于所述源服务器的所述SDK静态资源;
    所述终端设备接收所述源服务器返回所述第三请求消息的响应消息,所述第三请求消息的响应消息包括所述SDK静态资源。
  4. 一种业务容灾方法,其特征在于,包括:
    SDK服务器接收业务服务器发送的第四请求消息,所述第四请求消息用于获取SDK静态资源,所述SDK静态资源用于实现与业务页面关联的SDK功能;
    所述SDK服务器向所述业务服务器返回所述第四请求消息的响应消息,所述第四请求消息的响应消息包括第一资源地址和第二资源地址,所述第一资源地址指向位于CDN服务器的所述SDK静态资源,所述第二资源地址指向位于源服务器的所述SDK静态资源。
  5. 根据权利要求4所述的方法,其特征在于,所述第二资源地址为备用地址。
  6. 根据权利要求4或5所述的方法,其特征在于,所述方法还包括:
    所述SDK服务器更新所述第一资源地址和/或更新所述第二资源地址。
  7. 一种终端设备,其特征在于,包括:
    发送模块,用于向业务服务器发送第一请求消息,所述第一请求消息用于请求显示业务页面所需的资源,所述资源包括SDK静态资源,所述SDK静态资源用于实现与所述业务页面关联的SDK功能;
    接收模块,用于获取所述业务服务器返回的所述第一请求消息的响应消息,所述第一请求消息的响应消息包括第一资源地址和第二资源地址,所述第一资源地址指向位于内容分发网络CDN服务器的所述SDK静态资源,所述第二资源地址指向位于源服务器的所述SDK静态资源。
  8. 根据权利要求7所述的终端设备,其特征在于,所述第二资源地址为备用地址。
  9. 根据权利要求8所述的终端设备,其特征在于,
    所述发送模块还用于,根据所述第一资源地址向所述CDN服务器发送第二请求消息,所述第二请求消息用于请求位于所述CDN服务器的所述SDK静态资源;
    所述接收模块还用于,接收所述CDN服务器发送的所述第二请求消息的响应消息;
    所述发送模块还用于,若所述第二请求消息的响应消息包括请求失败的信息,则根据所述第二资源地址向所述源服务器发送第三请求消息,所述第三请求消息用于请求位于所述源服务器的所述SDK静态资源;
    所述接收模块还用于,接收所述源服务器返回所述第三请求消息的响应消息,所述第三请求消息的响应消息包括所述SDK静态资源。
  10. 一种SDK服务器,其特征在于,包括:
    接收模块,用于接收业务服务器发送的第四请求消息,所述第四请求消息用于获取SDK静态资源,所述SDK静态资源用于实现与业务页面关联的SDK功能;
    发送模块,用于向所述业务服务器返回所述第四请求消息的响应消息,所述第四请求消息的响应消息包括第一资源地址和第二资源地址,所述第一资源地址指向位于CDN服务器的所述SDK静态资源,所述第二资源地址指向位于源服务器的所述SDK静态资源。
  11. 根据权利要求10所述的SDK服务器,其特征在于,所述第二资源地址为备用地址。
  12. 根据权利要求10或11所述的SDK服务器,其特征在于,所述SDK服务器还包括:
    更新模块,用于更新所述第一资源地址和/或更新所述第二资源地址。
  13. 一种终端设备,其特征在于,包括:
    存储器,所述存储器中存储有计算机可读指令;
    与所述存储器相连的处理器,所述计算机可读指令被所述处理器执行时,使得所述网络设备实现如权利要求1至3中任一项所述的方法。
  14. 一种SDK服务器,其特征在于,包括:
    存储器,所述存储器中存储有计算机可读指令;
    与所述存储器相连的处理器,所述计算机可读指令被所述处理器执行时,使得所述网络设备实现如权利要求4至6中任一项所述的方法。
  15. 一种计算机程序产品,其特征在于,包括计算机可读指令,当所述计算机可读指令在计算机上运行时,使得所述计算机执行如权利要求1至6任一项所述的方法。
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当所述指令在计算机上运行时,使得所述计算机执行如权利要求1至6中任一项所述的方法。
  17. 一种通信系统,其特征在于,所述通信系统包括终端设备,业务服务器,SDK服务器;
    所述终端设备用于向业务服务器发送第一请求消息,所述第一请求消息用于请求显示业务页面所需的资源,所述资源包括软件开发包SDK静态资源,所述SDK静态资源用于实现与所述业务页面关联的SDK功能;
    所述业务服务器用于根据所述第一请求消息向所述SDK服务器发送第四请求消息,所 述第四请求消息用于获取SDK静态资源;
    所示SDK服务器用于根据所述第四请求消息,向所述业务服务器返回所述第四请求消息的响应消息,所述第四请求消息的响应消息包括第一资源地址和第二资源地址,所述第一资源地址指向位于CDN服务器的所述SDK静态资源,所述第二资源地址指向位于源服务器的所述SDK静态资源;
    所述业务服务器还用于向所述终端服务器发送所述第一资源地址和所述第二资源地址。
PCT/CN2023/095241 2022-05-27 2023-05-19 业务容灾方法、终端设备、软件开发包服务器和通信系统 WO2023226887A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210590988.6A CN117176553A (zh) 2022-05-27 2022-05-27 业务容灾方法、终端设备、软件开发包服务器和通信系统
CN202210590988.6 2022-05-27

Publications (1)

Publication Number Publication Date
WO2023226887A1 true WO2023226887A1 (zh) 2023-11-30

Family

ID=88918459

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/095241 WO2023226887A1 (zh) 2022-05-27 2023-05-19 业务容灾方法、终端设备、软件开发包服务器和通信系统

Country Status (2)

Country Link
CN (1) CN117176553A (zh)
WO (1) WO2023226887A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002071242A1 (en) * 2001-03-01 2002-09-12 Akamai Technologies, Inc. Optimal route selection in a content delivery network
WO2016101763A1 (zh) * 2014-12-22 2016-06-30 北京奇虎科技有限公司 通过cdn下载资源的实现方法和装置、服务器、客户端
CN108200132A (zh) * 2017-12-21 2018-06-22 中国平安人寿保险股份有限公司 资源获取方法、装置、设备及计算机可读存储介质
CN108810111A (zh) * 2013-07-12 2018-11-13 腾讯科技(深圳)有限公司 下载数据的方法、客户端及系统
US10630771B1 (en) * 2015-02-26 2020-04-21 Akamai Technologies, Inc. Content delivery network with network storage and support for on-demand content upload
CN112202631A (zh) * 2020-09-17 2021-01-08 北京金山云网络技术有限公司 一种资源访问方法、装置、系统、电子设备及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002071242A1 (en) * 2001-03-01 2002-09-12 Akamai Technologies, Inc. Optimal route selection in a content delivery network
CN108810111A (zh) * 2013-07-12 2018-11-13 腾讯科技(深圳)有限公司 下载数据的方法、客户端及系统
WO2016101763A1 (zh) * 2014-12-22 2016-06-30 北京奇虎科技有限公司 通过cdn下载资源的实现方法和装置、服务器、客户端
US10630771B1 (en) * 2015-02-26 2020-04-21 Akamai Technologies, Inc. Content delivery network with network storage and support for on-demand content upload
CN108200132A (zh) * 2017-12-21 2018-06-22 中国平安人寿保险股份有限公司 资源获取方法、装置、设备及计算机可读存储介质
CN112202631A (zh) * 2020-09-17 2021-01-08 北京金山云网络技术有限公司 一种资源访问方法、装置、系统、电子设备及存储介质

Also Published As

Publication number Publication date
CN117176553A (zh) 2023-12-05

Similar Documents

Publication Publication Date Title
CN111314141B (zh) 路由更新方法及装置
CN106936793B (zh) 一种信息拦截处理方法及终端
US8527862B2 (en) Methods for making ajax web applications bookmarkable and crawlable and devices thereof
CN110062043B (zh) 服务治理方法、服务治理装置、存储介质及电子设备
US9588854B2 (en) Systems and methods for a secondary website with mirrored content for automatic failover
CN104584011B (zh) 用于web内容和web服务的安全网络内插入的方法和系统
US11455365B2 (en) Data processing method and apparatus
TWI441478B (zh) 分散式作業系統中外部硬體應用的管理
US20150319221A1 (en) Tracing business transactions based on application frameworks
CN107135249B (zh) 数据下载方法及装置
WO2019223136A1 (zh) 数据获取方法、装置、计算机设备以及存储介质
US9338127B2 (en) Browser based hostname resolution for non-DNS (domain name service) and/or different DNS environments
CN114172966A (zh) 单元化架构下的服务调用方法、服务处理方法及装置
CN111694620A (zh) 第三方业务的交互方法、装置、设备及计算机存储介质
CN112015383A (zh) 一种登录方法和装置
WO2022090847A1 (en) Handling deferrable network requests
CN113923008A (zh) 一种恶意网站拦截方法、装置、设备及存储介质
CN111935092B (zh) 一种基于第三方应用的信息交互方法、装置和电子设备
US8793326B2 (en) System, method and computer program product for reconstructing data received by a computer in a manner that is independent of the computer
WO2023226887A1 (zh) 业务容灾方法、终端设备、软件开发包服务器和通信系统
AU2018390863B2 (en) Computer system and method for extracting dynamic content from websites
CN113966604A (zh) web应用封装器
CN113536168B (zh) 组件处理方法及设备
CN112583891B (zh) 接口文档获取方法、装置和服务器
CN114915565A (zh) 网络调试的方法和系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23810958

Country of ref document: EP

Kind code of ref document: A1