Version shunting method and device, computer equipment and storage medium
By obtaining and applying traffic configuration policies, the version marking of mobile terminals is solved by using the identification and diversion function of front-end services and gateways, the problem of insufficient flexibility and scalability of multi-version management strategies in the existing technology is solved, and the front-end is realized Consistency and dynamic routing with backend service versions improve the efficiency and response speed of shunt services.
Patent Information
- Application Number
- CN202411172961.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-12-31
AI Technical Summary
The existing multi-version management strategies lack flexibility and scalability in large multi-user environments, especially when the version shunt strategy needs to be dynamically adjusted based on actual traffic, and cannot effectively respond to rapidly changing market demands and user behavior.
By obtaining traffic configuration policies, the mobile terminals are marked versions, the version identification is obtained, and the front-end service transmission processing and gateway identification diversion are ensured to ensure the consistency of the front-end and back-end service versions, and the actual traffic and users are achieved through actual traffic and transmission. Dynamic service routing for behavior.
It improves the efficiency and response speed of diversion services, ensures the correct connection between front-end and back-end services, avoids the problem of inconsistent versions, and can flexibly adjust according to current network conditions and service needs.
Smart Images

Figure CN119225795A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data diversion technology, and in particular to a version diversion method, device, computer equipment and storage medium. Background Art
[0002] In the field of modern software development and service deployment, especially when implementing multi-version parallel support in a large multi-user environment, the problem of inconsistent front-end and back-end versions is often encountered. Since the front-end adopts a componentized development model, the iteration rhythm of different components is different. How to ensure that an application or component will not affect other applications or components during multi-version verification is a technical problem that needs to be solved urgently.
[0003] Existing multi-version management strategies usually include using environment tags, version branches, or containerization technology to isolate different versions of applications and services. For example, different versions can be managed by deploying each version to a different server environment or using different server instances.
[0004] However, existing multi-version management strategies lack sufficient flexibility and scalability, especially in scenarios where version diversion strategies need to be dynamically adjusted according to actual traffic. Existing multi-version management strategies often rely on static configurations and preset rules, which are insufficient to cope with rapidly changing market demands and user behaviors. Summary of the invention
[0005] The purpose of the embodiments of the present application is to propose a version diversion method, apparatus, computer equipment and storage medium to ensure that the versions of front-end and back-end services remain consistent in a multi-version software environment.
[0006] In order to solve the above technical problems, the embodiment of the present application provides a version splitting method, which adopts the following technical solution:
[0007] Get the traffic configuration strategy;
[0008] Marking the version of the mobile terminal based on the traffic configuration strategy to obtain a version identifier;
[0009] Based on the version identifier, the front-end service is processed to obtain the front-end application version;
[0010] The version identifier is imported into the gateway for identification and diversion to obtain the backend application version.
[0011] Furthermore, the step of performing version marking on the mobile terminal based on the traffic configuration strategy to obtain a version identifier specifically includes:
[0012] Sending the traffic configuration strategy to a mobile terminal configuration service center;
[0013] The mobile terminal configuration service center issues a policy to the mobile terminal to obtain the terminal request header, and the mobile terminal configuration service center is connected to a plurality of the mobile terminals;
[0014] The terminal request header is labeled based on the traffic configuration strategy to obtain a version identifier.
[0015] Furthermore, the step of labeling the terminal request header based on the traffic configuration strategy to obtain a version identifier specifically includes:
[0016] confirming a version tag of the mobile terminal based on the traffic configuration policy;
[0017] The terminal request header is SDK-tagged based on the version tag to obtain the version identifier.
[0018] Furthermore, the step of performing tagging processing on the front-end service based on the version identifier to obtain the front-end application version specifically includes:
[0019] Forwarding the version identifier through a content distribution network, and transmitting the version identifier to a front-end service;
[0020] The front-end application version is obtained by performing version identification through the front-end service.
[0021] Furthermore, the step of importing the version identifier into the gateway for identification and diversion to obtain the backend application version specifically includes:
[0022] Import the traffic configuration strategy into the gateway for parsing to obtain a traffic diversion strategy;
[0023] A diversion strategy is selected based on the version identifier to perform version diversion on the backend application to obtain the backend application version.
[0024] Furthermore, before obtaining the traffic configuration strategy, the method further includes:
[0025] Get business components;
[0026] The traffic configuration strategy is determined based on component granularity of the business component.
[0027] Furthermore, after the step of importing the traffic configuration strategy into the gateway for parsing to obtain the diversion strategy, the method further includes:
[0028] The diversion strategy is converted into code to obtain diversion decision data;
[0029] The diversion decision data is stored in the blockchain.
[0030] In order to solve the above technical problems, the embodiment of the present application further provides a version distribution device, which adopts the following technical solution:
[0031] An acquisition module is used to obtain traffic configuration strategies;
[0032] A marking module, used to mark the version of the mobile terminal based on the traffic configuration strategy to obtain a version identifier;
[0033] A tag transmission module, used to perform tag transmission processing on the front-end service based on the version identifier to obtain the front-end application version;
[0034] The diversion module is used to import the version identifier into the gateway for identification and diversion to obtain the backend application version.
[0035] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0036] A computer device includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the version diversion method when executing the computer-readable instructions.
[0037] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0038] A computer-readable storage medium, characterized in that computer-readable instructions are stored on the computer-readable storage medium, and when the computer-readable instructions are executed by a processor, the steps of the version diversion method are implemented.
[0039] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0040] The embodiment of the present application obtains a traffic configuration strategy, performs version tagging on the mobile terminal based on the traffic configuration strategy to obtain a version identifier, performs tag transmission processing on the front-end service based on the version identifier to obtain the front-end application version, and imports the version identifier into the gateway for identification and diversion to obtain the back-end application version. By performing version tagging on the mobile terminal based on the traffic configuration strategy, each terminal is assigned a clear version identifier, ensuring that all requests carry accurate version information, so that the front-end and back-end services can connect to the correct version and avoid problems caused by version inconsistency. Through the tag transmission processing of the front-end service and the identification and diversion function of the gateway, dynamic service routing based on actual traffic and user behavior is implemented, which can be flexibly adjusted according to current network conditions and service requirements, thereby improving the efficiency and response speed of the diversion service. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0042] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0043] Figure 2 A flowchart of an embodiment of a version splitting method according to the present application;
[0044] Figure 3 is a structural schematic diagram of an embodiment of a version diversion device according to the present application;
[0045] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0046] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0047] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0048] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0049] like Figure 1As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables.
[0050] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0051] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers and desktop computers, etc.
[0052] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .
[0053] It should be noted that the version diversion method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the version diversion device is generally set in the server / terminal device.
[0054] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0055] Continue to refer Figure 2 , shows a flow chart of an embodiment of a method for version distribution according to the present application. The version distribution method comprises the following steps:
[0056] Step S201, obtaining a traffic configuration strategy.
[0057] In this embodiment, the version distribution method can be deployed in a version distribution platform. The version distribution platform can be constructed by a server or a server cluster. The server or server cluster can be any electronic device with functions such as text recognition, text processing, data transmission, and data storage. The version distribution method runs on the electronic device (for example, Figure 1 The server / terminal device shown in the figure can receive the traffic configuration policy through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0058] In this embodiment, the above-mentioned traffic configuration strategy may be a set of rules and parameters for defining how to allocate and manage network traffic, and the traffic may be intelligently diverted through the above-mentioned traffic configuration strategy.
[0059] Specifically, the above-mentioned traffic configuration strategy may include version management rules, user feature rules, and request type and content. The above-mentioned version management rules can be used to specify which versions of applications or services should receive specific types of traffic. For example, new users can be set to automatically access the latest version, while old users remain on the stable version. The above-mentioned user feature rules can allocate traffic based on the user's geographic location, device type, operating system version and other characteristics. The above-mentioned request type and content can determine the routing of traffic based on the type of request (such as GET or POST) and content (such as specific parameters of API calls).
[0060] In a possible embodiment, the above-mentioned traffic configuration strategy can be obtained by technical developers performing rule configuration in a traffic configuration center. The above-mentioned traffic configuration center can be a development / operation multi-version strategy configuration master control. In the above-mentioned traffic configuration center, developers can configure rules according to component or application dimensions to obtain the above-mentioned traffic configuration strategy. The above-mentioned traffic configuration strategy can also be configured and distributed for unified management, which can ensure that the traffic configuration strategies obtained by major core components are unified and consistent, and the behaviors are also consistent.
[0061] Step S202: marking the version of the mobile terminal based on the traffic configuration policy to obtain a version identifier.
[0062] In this embodiment, the mobile terminal may refer to a portable device with wireless communication capability, which can be moved in an unfixed location to exchange data or communicate with the network, and the mobile terminal is equipped with an operating system, can install applications (Apps), and can access the Internet through a cellular network, Wi-Fi or other wireless communication technologies. Specifically, the mobile terminal may include electronic devices such as smart phones, tablet computers, laptops, wearable devices, and in-vehicle infotainment systems.
[0063] In this embodiment, the version identifier may be a data tag or metadata, which is used to indicate the specific version of the software or service that the mobile terminal should use or access. Specifically, the version identifier may also include multiple tags such as the user's geographic location, device type, operating system version, user behavior or historical usage pattern.
[0064] Specifically, regarding the specific implementation process of performing version tagging on the mobile terminal based on the traffic configuration strategy to obtain the version identifier, this application will provide further detailed descriptions of this in subsequent specific embodiments, and will not be elaborated on here.
[0065] Step S203, perform tagging processing on the front-end service based on the version identifier to obtain the front-end application version.
[0066] In this embodiment, the front-end service may be the part that directly interacts with the user, including all interface elements that the user can see and interact with. The front-end service may include a Web server, a content distribution network (CDN) node, and a front-end application framework.
[0067] In this embodiment, the front-end application version may be a specific function set version such as a version with a new user interface, a version with added specific functions, or a customized version designed for a specific user group, such as an accessible version optimized for visually limited users, or a localized version differentiated by region, providing content in different languages or in line with specific cultural preferences.
[0068] Specifically, regarding the above-mentioned specific implementation process of transmitting the tags to the front-end service based on the version identifier to obtain the front-end application version, this application will provide further detailed descriptions in subsequent specific embodiments, and will not be elaborated in detail here.
[0069] Step S204, import the version identifier into the gateway for identification and diversion to obtain the backend application version.
[0070] In this embodiment, the above-mentioned gateway can be an application layer gateway such as NGINX or Apache, or an API gateway such as Amazon API Gateway or Kong. The above-mentioned gateway supports identification and diversion, and can also configure routing to the corresponding backend application version according to the multi-version strategy.
[0071] In this embodiment, the above-mentioned back-end application version can be a back-end service version for a specific database architecture or dependency, or it can be a version in different development stages, such as a development version, a test version, and a production version, or it can be a version updated based on performance optimization or security updates.
[0072] Specifically, regarding the specific implementation process of importing the version identifier into the gateway for identification and diversion to obtain the backend application version, this application will provide further detailed descriptions in subsequent specific embodiments and will not be elaborated on here.
[0073] The present application obtains a traffic configuration strategy, performs version tagging on the mobile terminal based on the traffic configuration strategy to obtain a version identifier, performs tag transmission processing on the front-end service based on the version identifier to obtain the front-end application version, and imports the version identifier into the gateway for identification and diversion to obtain the back-end application version. By performing version tagging on the mobile terminal based on the traffic configuration strategy, each terminal is given a clear version identifier, ensuring that all requests carry accurate version information, so that the front-end and back-end services can connect to the correct version and avoid problems caused by version inconsistencies. In addition, through the tag transmission processing of the front-end service and the identification and diversion function of the gateway, dynamic service routing based on actual traffic and user behavior is realized, which can be flexibly adjusted according to current network conditions and service requirements, thereby improving the efficiency and response speed of the diversion service.
[0074] In some optional implementations, step S202 includes the following steps:
[0075] Send the traffic configuration strategy to the mobile terminal configuration service center;
[0076] The mobile terminal configuration service center issues policies to the mobile terminal and obtains the terminal request header;
[0077] The terminal request header is tagged based on the traffic configuration strategy to obtain a version identifier.
[0078] In this embodiment, the mobile terminal configuration service center may be a centralized configuration management system, which may be responsible for issuing and managing traffic configuration policies to the connected mobile terminals. The mobile terminal configuration service center is connected to several mobile terminals.
[0079] In this embodiment, the above-mentioned terminal request header may refer to the request header part included in the HTTP protocol when the mobile terminal sends an HTTP request to the server. The above-mentioned terminal request header may include: User-Agent, used to identify the browser and operating system information of the device issuing the request; Accept-Language, used to set the user's language preference for internationalization processing; Cookie, used to store user session and status information; Custom Headers, including custom header fields, such as application-specific version identifiers or other tags for traffic diversion.
[0080] In a possible embodiment, a technical developer may connect the traffic configuration center with the mobile terminal configuration service center through an API interface, and send the traffic configuration policy in the traffic configuration center to the mobile terminal configuration service center through the API interface. The mobile terminal configuration service center determines the mobile terminal that needs to execute the policy through a push / pull method, and then communicates with the mobile terminal through the mobile terminal configuration service center to obtain the terminal request header.
[0081] Specifically, the above-mentioned policy issuance can be expressed as follows: once the list of mobile terminals that need to update the policy is determined, the mobile terminal configuration service center will issue a personalized traffic configuration policy based on the specific characteristics of each mobile terminal (such as device model, operating system version, geographic location, etc.). In the process of policy issuance, the mobile terminal will inevitably communicate with the mobile terminal configuration service center. In the above-mentioned communication, the mobile terminal can send its own request header as the above-mentioned terminal request header to the above-mentioned mobile terminal configuration service center.
[0082] Specifically, the push / pull method can be a combination of a push mechanism and a pull mechanism. The push mechanism can be that the mobile configuration service center actively sends configuration update notifications to the connected mobile terminals, and the pull mechanism can be that the mobile terminal regularly requests the latest configuration information from the mobile configuration service center.
[0083] Specifically, regarding the specific implementation process of labeling the terminal request header based on the traffic configuration strategy to obtain the version identifier, this application will provide further details in subsequent specific embodiments, and will not be elaborated on here.
[0084] This application improves the personalization of services by sending traffic configuration policies to a mobile terminal configuration service center, issuing policies to mobile terminals through the mobile terminal configuration service center, and labeling terminal request headers based on these policies to obtain version identification, thereby ensuring that the correct version of the application corresponds to the specific needs of different users, and achieving highly customized and dynamic traffic management and version control.
[0085] In some optional implementations, the above step of "labeling the terminal request header based on the traffic configuration policy to obtain a version identifier" includes the following steps:
[0086] Confirming the version label of the mobile terminal based on the traffic configuration policy;
[0087] The terminal request header is marked with SDK based on the version tag to obtain the version identifier.
[0088] In this embodiment, the version tag may be a predefined identifier for indicating the software version that the mobile terminal should receive and run, and the version tag is generated based on a traffic configuration policy.
[0089] In this embodiment, the SDK tagging may be to add a specific tag or code snippet in the request header or application of the mobile terminal using a software development kit (SDK), so that these terminals can pass version information (i.e., the version identifier) when interacting with the server.
[0090] In a possible embodiment, the mobile terminal configuration service center can decide which mobile terminals should receive which version tags based on the traffic configuration policy received from the traffic configuration center. The above version tags and traffic configuration policies can be saved in a preset tag database, and the version tags and traffic configuration policies correspond one to one. The corresponding version tags can be queried by using the traffic configuration policy as a query object. For example, when the traffic configuration policy has been specified by the developer, the version tag can be obtained by inputting the traffic configuration policy as a query condition into the preset tag database for query, and the above version tag can be used as the version tag of the mobile terminal.
[0091] In a possible embodiment, the developer first integrates a special SDK in the application of the mobile terminal. The SDK is responsible for obtaining the corresponding version tag from the mobile terminal configuration service center when the application is started or the user logs in. Then, the SDK automatically modifies each HTTP request issued by the application and adds the version tag to the terminal request header (i.e., the SDK tags the version tag) to obtain the version identifier. The version identifier can be empty.
[0092] This application obtains a version identifier by SDK marking the terminal request header based on the version tag, ensuring that each HTTP request sent from the mobile terminal carries accurate version information, thereby improving the personalization level and operational efficiency of the diversion service, while also enhancing the security and maintainability of the application, and making it easier to manage different versions of software and updates or repairs for specific versions.
[0093] In some optional implementations, step S203 includes the following steps:
[0094] The version identifier is forwarded through the content distribution network and transmitted to the front-end service;
[0095] The version is identified through the front-end service to obtain the front-end application version.
[0096] In this embodiment, the above-mentioned content delivery network (CDN) can be a group of server networks distributed in multiple geographical locations, which can be used to provide web pages, videos, images and other types of network content through servers that are spatially close to users, thereby reducing delays and accelerating content loading speed. The above-mentioned content delivery network (CDN) caches copies of content in multiple locations. When a user requests content, the above-mentioned content delivery network (CDN) system will select the optimal server location to respond to the user's request based on factors such as the user's geographical location, the health of the server, and the availability of the content.
[0097] In a possible embodiment, when a user's mobile terminal sends a request, the request includes version identification information related to the device. The content distribution network receives the request and determines the routing path based on the version identification in the request header, and selects the most appropriate cache node to provide the corresponding version of the front-end resources. Then, after the front-end service receives these specific version resources selected by the content distribution network, it processes them according to the version identification, dynamically loads and renders the front-end application of the corresponding version (i.e., the above-mentioned front-end application version), ensuring that the user always receives the application version that matches the version identification of his or her device, and no matter where the user is located, he or she can obtain the fastest response speed and the best user experience through the nearest CDN node.
[0098] This application uses a content distribution network (CDN) to intelligently route and provide corresponding versions of front-end resources according to the version identification of the mobile terminal, optimizes the routing and distribution of content based on the version identification of the device, ensures that each user obtains the most suitable application version according to the characteristics of their device, improves the loading speed and performance of the application, reduces network latency and server load, improves the overall reliability of the service and user experience, dynamically provides customized content for different user groups, and enhances the relevance of the content and user satisfaction.
[0099] In some optional implementations, step S204 includes the following steps:
[0100] Import the traffic configuration strategy into the gateway for analysis to obtain the diversion strategy;
[0101] Based on the version identifier, a diversion strategy is selected to perform version diversion on the backend application to obtain the backend application version.
[0102] In this embodiment, the above-mentioned diversion strategy can be a set of rules for controlling and managing the distribution of traffic to different backend service versions according to different version identifiers. The above-mentioned diversion strategy can include a version weight distribution strategy, a geographic location diversion strategy, and a device type diversion strategy. Specifically, the above-mentioned version weight distribution strategy can set different traffic weights for different versions of backend services. For example, the stable version may receive most of the traffic, while the test version receives less test traffic. The above-mentioned geographic location diversion strategy can be based on the user's geographic location, directing traffic to the geographically closest or legally appropriate backend service. The above-mentioned device type diversion strategy can distribute requests to backend services optimized for this type of device according to the user's device type (such as mobile phone, tablet, PC).
[0103] In a possible embodiment, the gateway parses the received traffic configuration policy, identifies and sets the traffic weights of different backend service versions (such as the stable version receives most of the traffic, and the test version receives less traffic), and determines the most suitable service route based on the user's geographic location and device type. Next, when the terminal request header of the mobile terminal reaches the gateway, the gateway reads the version identifier in the request, selects a predefined diversion strategy (such as version weight, geographic location, device type) based on this version identifier, and dynamically routes the request to the corresponding backend service version. In this way, each request is accurately directed to the most appropriate service instance, ensuring the optimal performance of the service and the best user experience, while supporting backend version management and resource optimization.
[0104] The diversion strategy based on version identification in this application can realize efficient version management and traffic control, ensure that each user receives the most suitable backend service version according to their geographical location, device type and version requirements, improve the response speed and load balancing efficiency of the service, enhance the personalization and satisfaction of the user experience. In addition, this application allows smooth implementation of testing and grayscale release of new versions, reduces potential risks and impacts on existing user services, and improves the overall reliability and maintainability of the system.
[0105] In some optional implementations, before step S201, the following steps are further included:
[0106] Get business components;
[0107] Determine the traffic configuration strategy based on the component granularity of the business component.
[0108] In this embodiment, the business components can be the functional modules constituting the business system, and the functional modules are used to process different business logics and data flows in the system. Specifically, the component particles of the business components can be the smallest functional units constituting the business components, and the component particles define the specific implementation methods and functional boundaries within the components.
[0109] In a possible embodiment, developers can analyze the functions, data traffic requirements and performance indicators of all business components of each of the above-mentioned traffic configuration centers, classify the component particles of each component, identify which particles are resource-intensive during the processing process, and then allocate corresponding network bandwidth, CPU and memory resources to them according to the resource consumption pattern and business importance of each particle (configure traffic configuration strategy).
[0110] In this application, by conducting a detailed analysis of the functions, data traffic requirements and performance indicators of each business component in the business system, and performing refined resource allocation based on the resource consumption pattern of the component particles and the importance of the business, resource optimization and performance maximization can be achieved, ensuring the efficient operation of the system, and allocating resources to key businesses first, thereby improving the system's response speed and processing capabilities, and reducing delays and performance bottlenecks.
[0111] In some optional implementations, the above step of "importing the traffic configuration policy into the gateway for parsing to obtain the diversion policy" includes the following steps:
[0112] The diversion strategy is converted into code to obtain diversion decision data;
[0113] The diversion decision data is stored in the blockchain.
[0114] In this embodiment, in order to ensure the privacy and security of the above-mentioned diversion strategy, the above-mentioned diversion strategy can be processed by hashing and encrypted (the above-mentioned encoding conversion) to obtain the above-mentioned diversion decision data, and the above-mentioned diversion decision data is stored in a node of a blockchain. The above-mentioned diversion decision data may include various version identifiers and corresponding routing information, which are used to indicate which specific service instances requests of different versions should be routed to, and may also include load balancing parameters such as weight and priority.
[0115] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0116] This application can achieve the immutability, high transparency and enhanced security of the diversion decision data by encoding the diversion strategy into diversion decision data and storing it in the blockchain, ensuring the consistency and traceability of the diversion strategy, thereby optimizing traffic management and enhancing the overall stability and trust of the network and services.
[0117] It can be understood that in the specific implementation of this application, data related to diversion strategies, traffic configuration strategies, version identification, front-end application versions, and back-end application versions are involved. When the embodiments in this application are applied to specific products or technologies, user permission or consent is required, and the collection, use, and processing of relevant data need to comply with relevant laws, regulations, and standards of relevant countries and regions.
[0118] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0119] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0120] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a version distribution device, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0121] like Figure 3 As shown, the version distribution device 300 described in this embodiment includes: an acquisition module 301, a marking module 302, a tag transmission module 303 and a distribution module 304. Among them:
[0122] An acquisition module 301 is used to acquire a traffic configuration strategy;
[0123] The marking module 302 is used to mark the version of the mobile terminal based on the traffic configuration strategy to obtain a version identifier;
[0124] The tag transmission module 303 is used to perform tag transmission processing on the front-end service based on the version identifier to obtain the front-end application version;
[0125] The distribution module 304 is used to import the version identifier into the gateway for identification and distribution to obtain the backend application version.
[0126] In a possible embodiment, before the acquisition module 301, the method further includes:
[0127] A business acquisition module is used to acquire business components;
[0128] A determination module is used to determine the traffic configuration strategy based on component granularity of the business component.
[0129] In a possible embodiment, the marking module 302 includes:
[0130] A sending submodule, used to send the traffic configuration strategy to a mobile terminal configuration service center;
[0131] The issuing submodule is used to issue the policy to the mobile terminal through the mobile terminal configuration service center to obtain the terminal request header, and the mobile terminal configuration service center is connected to a plurality of the mobile terminals;
[0132] The label marking submodule is used to label the terminal request header based on the traffic configuration strategy to obtain a version identifier.
[0133] In a possible embodiment, the label marking submodule includes:
[0134] A confirmation unit, configured to confirm a version tag of the mobile terminal based on the traffic configuration policy;
[0135] The marking unit is used to mark the terminal request header with SDK based on the version tag to obtain the version identifier.
[0136] In a possible embodiment, the tag transmission module 303 includes:
[0137] A forwarding submodule, used to forward the version identifier through a content distribution network, and transmit the version identifier to a front-end service;
[0138] The identification submodule is used to perform version identification through the front-end service to obtain the front-end application version.
[0139] In a possible embodiment, the above-mentioned flow distribution module 304 includes:
[0140] The parsing submodule is used to import the traffic configuration strategy into the gateway for parsing to obtain a diversion strategy;
[0141] The shunting submodule is used to select a shunting strategy based on the version identifier to perform version shunting on the backend application to obtain the backend application version.
[0142] In a possible embodiment, after the above-mentioned parsing submodule, the following is further included:
[0143] A conversion submodule, used for encoding and converting the diversion strategy to obtain diversion decision data;
[0144] The saving submodule is used to save the diversion decision data in the blockchain.
[0145] In this embodiment, by obtaining the traffic configuration strategy, the mobile terminal is version-tagged based on the traffic configuration strategy to obtain a version identifier, the front-end service is transmitted based on the version identifier to obtain the front-end application version, and the version identifier is imported into the gateway for identification and diversion to obtain the back-end application version. By performing version marking based on the traffic configuration strategy on the mobile terminal, each terminal is assigned a clear version identifier, ensuring that all requests carry accurate version information, so that the front-end and back-end services can connect to the correct version, avoiding problems caused by version inconsistency. Through the transmission of the front-end service and the identification and diversion function of the gateway, dynamic service routing based on actual traffic and user behavior is realized, which can be flexibly adjusted according to current network conditions and service requirements, thereby improving the efficiency and response speed of the diversion service.
[0146] In this embodiment, the operations performed by the above-mentioned units or modules respectively correspond one-to-one to the steps of the version diversion method in the above-mentioned implementation mode, and will not be repeated here.
[0147] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0148] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0149] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0150] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the version diversion method, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0151] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run computer-readable instructions stored in the memory 41 or process data, such as computer-readable instructions for running the version diversion method.
[0152] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0153] This embodiment provides a computer device, which obtains a traffic configuration policy, performs version tagging on a mobile terminal based on the traffic configuration policy to obtain a version identifier, performs tag transmission processing on a front-end service based on the version identifier to obtain a front-end application version, and imports the version identifier into a gateway for tagging and diversion to obtain a back-end application version. By performing version tagging on a mobile terminal based on the traffic configuration policy, each terminal is assigned a clear version identifier, ensuring that all requests carry accurate version information, so that the front-end and back-end services can connect to the correct version and avoid problems caused by version inconsistencies. Through the tag transmission processing of the front-end service and the tagging and diversion function of the gateway, dynamic service routing based on actual traffic and user behavior is implemented, which can be flexibly adjusted according to current network conditions and service requirements, thereby improving the efficiency and response speed of the diversion service.
[0154] The present application also provides another implementation, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the version diversion method as described above.
[0155] This embodiment provides a computer-readable storage medium, which obtains a traffic configuration policy, performs version tagging on a mobile terminal based on the traffic configuration policy to obtain a version identifier, performs tag transmission processing on a front-end service based on the version identifier to obtain a front-end application version, and imports the version identifier into a gateway for identification and diversion to obtain a back-end application version. By performing version tagging on a mobile terminal based on the traffic configuration policy, each terminal is assigned a clear version identifier, ensuring that all requests carry accurate version information, so that the front-end and back-end services can connect to the correct version and avoid problems caused by version inconsistencies. Through the tag transmission processing of the front-end service and the identification and diversion function of the gateway, dynamic service routing based on actual traffic and user behavior is implemented, which can be flexibly adjusted according to current network conditions and service requirements, thereby improving the efficiency and response speed of the diversion service.
[0156] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0157] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A version diversion method, characterized in that: The steps include: Get the traffic configuration strategy; Marking the version of the mobile terminal based on the traffic configuration strategy to obtain a version identifier; Based on the version identifier, the front-end service is processed to obtain the front-end application version; The version identifier is imported into the gateway for identification and diversion to obtain the backend application version.
2. The version diversion method according to claim 1, characterized in that: The step of performing version marking on the mobile terminal based on the traffic configuration strategy to obtain a version identifier specifically includes: Sending the traffic configuration strategy to a mobile terminal configuration service center; The mobile terminal configuration service center issues a policy to the mobile terminal to obtain the terminal request header, and the mobile terminal configuration service center is connected to a plurality of the mobile terminals; The terminal request header is labeled based on the traffic configuration strategy to obtain a version identifier.
3. The version diversion method according to claim 2, characterized in that: The step of labeling the terminal request header based on the traffic configuration strategy to obtain a version identifier specifically includes: confirming a version tag of the mobile terminal based on the traffic configuration policy; The terminal request header is SDK-tagged based on the version tag to obtain the version identifier.
4. The version diversion method according to claim 1, characterized in that: The step of performing tagging processing on the front-end service based on the version identifier to obtain the front-end application version specifically includes: Forwarding the version identifier through a content distribution network, and transmitting the version identifier to a front-end service; The front-end application version is obtained by performing version identification through the front-end service.
5. The version diversion method according to claim 1, characterized in that: The step of importing the version identifier into the gateway for identification and diversion to obtain the backend application version specifically includes: Import the traffic configuration strategy into the gateway for parsing to obtain a traffic diversion strategy; A diversion strategy is selected based on the version identifier to perform version diversion on the backend application to obtain the backend application version.
6. The version diversion method according to claim 1, characterized in that: Before obtaining the traffic configuration strategy, the method further includes: Get business components; The traffic configuration strategy is determined based on component granularity of the business component.
7. The version distribution method according to claim 5, characterized in that: After the step of importing the traffic configuration strategy into the gateway for parsing to obtain the diversion strategy, the method further includes: The diversion strategy is converted into code to obtain diversion decision data; The diversion decision data is stored in the blockchain.
8. A version distribution device, characterized in that: include: An acquisition module is used to obtain traffic configuration strategies; A marking module, used to mark the version of the mobile terminal based on the traffic configuration strategy to obtain a version identifier; A tag transmission module, used to perform tag transmission processing on the front-end service based on the version identifier to obtain the front-end application version; The diversion module is used to import the version identifier into the gateway for identification and diversion to obtain the backend application version.
9. A computer device, characterized in that: It comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the version diversion method as claimed in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the version splitting method according to any one of claims 1 to 7 are implemented.
