Information processing method and device, equipment, medium and program product
By implementing phased version updates to ensure compatibility with different encoding methods, the problem of garbled characters for uncommon words between financial business systems was resolved, achieving seamless integration and improved stability between systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA CONSTRUCTION BANK
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-17
AI Technical Summary
During the data transmission process in financial transactions, there is a problem of garbled characters when applications call each other, which affects the accuracy of data transmission.
The target application system is updated in two or three versions. First, it is made compatible with GBK and UTF-8 encoding methods, and then it is switched to a single UTF-8 encoding method to ensure seamless connection during the switching between systems and avoid garbled characters.
It achieves seamless transitions between systems, avoids garbled characters, and improves the accuracy of request responses and system stability.
Smart Images

Figure CN121879802A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of Internet of Things (IoT) technology, and in particular to an information processing method, apparatus, device, medium, and program product. Background Technology
[0002] Users may input uncommon characters during financial transactions. Data transmission in financial transactions involves calls between application systems. However, these calls can result in garbled characters and affect the accuracy of data transmission. Summary of the Invention
[0003] This invention provides an information processing method, apparatus, device, medium, and program product to solve the problem of garbled characters appearing when calling uncommon characters between systems.
[0004] In a first aspect, embodiments of the present invention provide an information processing method applied to servers in a server cluster, wherein the servers include a target application system, comprising:
[0005] Obtain a first update message sent by a preset server. The first update message includes a version update package of the target application system. The version update package includes a first version package and a second version package. The first version package includes a first code, and the second version package includes a second code. The first code is used to instruct the target application system to respond to the target request according to the encoding method of the received target request. The second code is used to instruct the target application system to encapsulate the content to be transmitted into the target request to be transmitted using the first encoding method.
[0006] Obtain the first version package from the version update package, update the target application system based on the first version package, and send a first update response message to the preset server. The first update response message is used to trigger the preset server to send a second update message to the server that has completed the first version update stage. The first version update stage represents the version update of the target application system based on the first version package.
[0007] In response to the second update message, the second version package in the version update package is obtained, and the target application system is updated based on the second version package.
[0008] Secondly, embodiments of the present invention also provide an information processing apparatus applied to a server in a server cluster, the server including a target application system, the apparatus comprising:
[0009] The message acquisition module is used to acquire a first update message sent by a preset server. The first update message includes a version update package of the target application system. The version update package includes a first version package and a second version package. The first version package includes a first code, and the second version package includes a second code. The first code is used to instruct the target application system to respond to the target request according to the encoding method of the received target request. The second code is used to instruct the target application system to encapsulate the content to be transmitted into the target request to be transmitted using the first encoding method.
[0010] The first version update module is used to obtain the first version package in the version update package, update the target application system based on the first version package, and send a first update response message to the preset server. The first update response message is used to trigger the preset server to send a second update message to the server that has completed the first version update stage. The first version update stage represents the version update of the target application system based on the first version package.
[0011] The second version update module is used to respond to the second update message, obtain the second version package in the version update package, and update the target application system based on the second version package.
[0012] Thirdly, embodiments of the present invention also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the information processing method as described in any of the embodiments of the present invention.
[0013] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the information processing method as described in any of the embodiments of the present invention.
[0014] Fifthly, embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the information processing method as described in any of the embodiments of the present invention.
[0015] In this embodiment of the invention, for a server in a server cluster, a first update message sent by a preset server is obtained. The first update message includes a first version package and a second version package of the target application system. Since the first version package includes first code and the second version package includes second code, the first code is used to instruct the target application system to respond to the target request according to the encoding method of the received target request, and the second code is used to instruct the target application system to encode the content to be transmitted using the first encoding method to obtain the target request, thus providing the data foundation for two system deployments. Further, the first version package in the version update package is obtained, and the target application system is updated based on the first version package, so that the target application system responds to the target request according to the encoding method of the received target request. This achieves the step-by-step execution of the target application system deployment, enabling compatible responses to target requests with different encoding methods even when the old and new systems coexist during the deployment process, avoiding the problem of garbled characters. After the version update based on the first version package is completed, a first update response message is returned to the preset server to indicate that the current server has completed the update of the target application system based on the first version package, thereby triggering the preset server to send a second update message. Furthermore, in response to the second update message, the second version package in the version update package is obtained. Based on the second version package, the target application system is updated again, so that the target application system adopts the first encoding method to encode the content to be transmitted. This achieves the switching of the encoding method of the request from the second encoding method to the first encoding method without stopping the system, thus avoiding affecting the stability of the system. In this embodiment of the invention, by deploying the system twice based on two versions, a seamless transition between systems is achieved. This avoids the problem of using the first encoding format to respond to the target request in the second encoding format during the switching process, which would lead to garbled characters due to uncommon characters. This improves the accuracy of request response and the stability of the system. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 A flowchart of an information processing method provided in an embodiment of the present invention;
[0018] Figure 2 A schematic diagram illustrating an inter-system call method provided in an embodiment of the present invention;
[0019] Figure 3 A schematic diagram illustrating another inter-system calling method provided in an embodiment of the present invention;
[0020] Figure 4 A flowchart of an information processing method provided in an embodiment of the present invention;
[0021] Figure 5 This is a schematic diagram of the structure of an information processing device provided in an embodiment of the present invention;
[0022] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0023] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.
[0024] It should be noted that similar reference numerals and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this invention, terms such as "first" and "second" are used only to distinguish descriptions and should not be construed as indicating or implying relative importance. The acquisition, storage, use, and processing of data in the technical solutions of this application all comply with relevant national laws and regulations. It should be noted that in the embodiments of this application, certain existing industry solutions such as software, components, and models may be mentioned. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solutions of this application, and do not imply that the applicant has already used or necessarily used the relevant content of "this solution."
[0025] The relevant regulations specify three implementation levels for Chinese characters in system software products. System software products meeting the corresponding implementation level should provide input / output functionality for all characters within that level's range. If the original software product requires support for only a subset of Chinese characters, then it meets the Level 1 requirement. If the operating system supports Level 2, software based on the operating system's character set can support Level 2. For a system software product to support Level 3 Chinese character input / output, it needs an input method and character set that meet the Level 3 requirements. Products used for government and public services should meet the Level 3 implementation requirement. Monetary and financial services fall under the public service category and should also meet the Level 3 implementation requirement.
[0026] Relevant regulations stipulate that system software products in the financial industry should support not only the relevant character sets but also uncommon characters from a pre-defined character set. These regulations include provisions for the input, display, printing, information exchange, storage, and internal processing of uncommon characters. Some embodiments further specify that the system software product must not cause the loss or alteration of Chinese character encoding during any processing step. For uncommon characters, if an official code already exists, the system software product should be compatible with handling multiple code versions of a single character during the verification process, and the customer should be informed in detail about the situation.
[0027] A target request is a data carrier for inter-system calls. A target request can be a message in HTTP (Hypertext Transfer Protocol) format. HTTP is a protocol for transmitting hypertext, defining the format of requests and responses between clients and servers. In the HTTP protocol, character encoding is used to specify how the transmitted content is encoded to ensure that text is displayed correctly across different languages and character sets.
[0028] In the HTTP protocol, character encoding is typically specified in two ways: declaring the character encoding in the HTTP header; or using percent encoding to handle special characters. Properly setting the character encoding is crucial for ensuring correct display on the HTTP receiver and in the operating system, especially for web pages containing non-ASCII characters (such as Chinese characters). If the character encoding is not correctly specified or understood between the server and the client, garbled characters may occur.
[0029] Figure 1 This is a flowchart illustrating an information processing method provided by an embodiment of the present invention, applicable to inter-system call scenarios. The method can be executed by an information processing device, which can be implemented in software and / or hardware, optionally through an electronic device. This electronic device can be a server in a server cluster, and the server includes a target application system, etc. For example, the target application system could be a business system in financial services that may involve the encoding or decoding of uncommon characters.
[0030] S110. Obtain a first update message sent by a preset server. The first update message includes a version update package of the target application system. The version update package includes a first version package and a second version package. The first version package includes a first code, and the second version package includes a second code. The first code is used to instruct the target application system to respond to the target request according to the encoding method of the received target request. The second code is used to instruct the target application system to encapsulate the content to be transmitted into the target request to be transmitted using the first encoding method.
[0031] The default server is a server in the server cluster used for version control, configuration management, or code deployment. The first update message instructs the servers in the cluster to update the version of the target application system. The first update message includes a version update package for the target application system. The version update package is a compressed file used for updating the target application system. Within the version update package, the first version package and the second version package are two independently packaged compressed files, identified by the first version package identifier and the second version package identifier, respectively. The target application system before installing the version update package is the old version system, and the target application system after installing the version update package is the new version system. After installing the version update package, the system is put into production through a round-robin service in the server cluster. The server cluster contains both the new and old version systems, representing a phase of coexistence. To ensure compatible responses to target requests with different encoding methods during this phase, the update of the target application system needs to be implemented step-by-step. The first version package is used to implement one version update of the target application system, and the second version package is used to implement another version update.
[0032] In some embodiments, a version update package including a first version package and a second version package is sent to the server at once by a preset server. Compared with the preset server sending the first version package to the server first and then sending the second version package after the first version package is updated, this can solve the problem of large delay caused by reading the server list twice and transmitting the version package twice, and improve the version update efficiency.
[0033] In some embodiments, the first version package includes first code, which is program code that enables the target application system's response to be compatible with different encoding methods. The second version package includes second code, which is program code that switches the encoding method of the target application system's request from the second encoding method to the first encoding method.
[0034] Optionally, the first code includes program code that implements encoding method determination and decoding operations corresponding to at least two preset encoding methods. The at least two preset encoding methods include a first encoding method and a second encoding method, etc. The first encoding method is an encoding method that supports uncommon characters. The second encoding method is an encoding method that does not support uncommon characters. For example, the first encoding method is UTF-8 encoding, and the second encoding method is GBK encoding.
[0035] UTF-8 is a variable-length byte encoding method that encodes Unicode in 8-bit units for text storage and transmission in computer systems.
[0036] GBK is a character encoding standard for Simplified Chinese. It is an extension of GB2312 encoding and includes more Chinese characters and symbols. GBK encoding can represent 21,003 Chinese characters and graphic symbols, including 6,763 Chinese characters and 682 other symbols.
[0037] In some embodiments, the first code is used to perform the following steps: parse the received target request to obtain an encoding method field and an encoded character; decode the encoded character based on the encoding method field to obtain the content to be transmitted corresponding to the encoded character.
[0038] In some embodiments, the second code is used to perform the following steps: encoding the content to be transmitted using the first encoding method to obtain encoded characters corresponding to the content to be transmitted; determining the encoding method field in the request header based on the first encoding method; and determining the request body based on the encoded characters to obtain the target request to be transmitted.
[0039] The encoding method field is a field in the target request that represents the encoding format of the content to be transmitted. The encoding method field is a field in the request header of the target request. The encoded characters represent the encoding result of the content to be transmitted.
[0040] Optionally, if the encoding method field represents the first encoding method, the encoded character is decoded using the first encoding method to obtain the text corresponding to the encoded character. If the encoding method field represents the second encoding method, the encoded character is decoded using the second encoding method to obtain the text corresponding to the encoded character. In this embodiment of the invention, the target application system uses a first code to decode the encoded characters of the content to be transmitted using an encoding method corresponding to the target request.
[0041] In some embodiments, the system sending the target request sends a GBK-encoded target request to the called system. The system sending the target request encodes the content to be transmitted using GBK encoding to obtain the target request. If the content to be transmitted contains uncommon characters, the called system decodes the target request using GBK encoding to obtain the uncommon characters. Optionally, the system sending the target request sends a UTF-8-encoded target request to the called system. The system sending the target request encodes the content to be transmitted using UTF-8 encoding to obtain the target request. If the content to be transmitted contains uncommon characters, the called system decodes the target request using UTF-8 encoding to obtain the uncommon characters. The target application system stores the uncommon characters in a database or displays the uncommon characters.
[0042] Assuming the target request is encoded in GBK, if the called system only supports GBK encoding, the target request can be accurately decoded to obtain the correct uncommon characters. However, if the target request is encoded in GBK but the called system only supports UTF-8 encoding, then UTF-8 encoding cannot accurately decode the GBK-encoded target request, resulting in garbled characters. Similarly, assuming the target request is encoded in UTF-8, if the called system only supports UTF-8 encoding, the target request can be accurately decoded to obtain the correct uncommon characters. However, if the target request is encoded in UTF-8 but the called system only supports GBK encoding, then GBK encoding cannot accurately decode the UTF-8-encoded target request.
[0043] To address the issue of garbled characters for uncommon characters, this invention divides the application system version update into two phases. The first phase updates the target application system based on a first version package, enabling the updated system to respond to requests using either GBK or UTF-8 encoding. The second phase updates the target application system based on a second version package, switching requests to UTF-8 encoding. Since the server only begins the second phase after completing the first phase, and because system version updates require a series of actions such as version package parsing, verification, service shutdown, file replacement, and service startup, system deployment takes considerable time. Due to the round-robin service startup in the server cluster environment, some servers complete one version update while others complete two. For a target application system that has completed one version update, if it receives a target request encoded in GBK, it can respond using GBK encoding. If a target request is received from a target application system that has undergone two version updates, and this target request is encoded in UTF-8, then the response to the target request can be in UTF-8 encoding. Through the above embodiment, because the called system can respond to target requests in both GBK and UTF-8 encoding formats, the problem of garbled characters due to uncommon features is avoided.
[0044] Figure 2 This is a schematic diagram illustrating an inter-system call method provided in an embodiment of the present invention. For example... Figure 2As shown, a first target application system (e.g., system A) 210 calls a second target application system (e.g., system B) 220. Both systems A and B are application systems that implement financial services. The first target application system 210 uses GBK encoding for the content to be transmitted, obtaining encoded characters. It determines the encoding method field in the HTTP request header to be GBK encoding, uses the encoded characters as the request body, obtains the HTTP request, and sends the HTTP request to the second target application system 220. The second target application system 220 receives the HTTP request, parses it to obtain the encoding method field in the request header. Since the encoding method field is GBK encoding, it uses GBK encoding to decode the encoded characters, obtaining the corresponding text. The second target application system 220 encodes the response information using GBK encoding and generates an HTTP response to return to the first target application system 210. Similarly, the second target application system 220 uses GBK encoding for the content to be transmitted, obtaining encoded characters. The HTTP request header's encoding field is determined to be GBK encoding. The encoded characters are used as the request body to obtain the HTTP request, which is then sent to the first target application system 210. The first target application system 210 receives the HTTP request and parses it to obtain the encoding field in the request header. Since the encoding field is GBK encoded, the encoded characters are decoded using GBK encoding to obtain the corresponding text. The first target application system 210 encodes the response information using GBK encoding and generates an HTTP response to return to the second target application system 220. Since the encoding field is GBK encoded, the second target application system 220 decodes the response information using GBK encoding.
[0045] In some embodiments, after obtaining the first update message sent by the preset server, the method further includes:
[0046] A receive response message is sent to the preset server. This receive response message indicates the reception status of the first update message. The receive response message is used to notify the preset server to send a preset instruction to the server whose reception status is successful. The preset instruction includes multiple instruction information for updating the target application system. This embodiment of the disclosure uses a receive response message to feed back the current server's reception status of the version update package to the preset server, facilitating the preset server to send preset instructions to the server that has successfully received the version update package, thereby quickly achieving automatic updates to the target application.
[0047] S120. Obtain the first version package from the version update package, update the target application system based on the first version package, and send a first update response message to the preset server. The first update response message is used to trigger the preset server to send a second update message to the server that has completed the first version update stage. The first version update stage represents the version update of the target application system based on the first version package.
[0048] In some embodiments, the first update message also includes a first version package identifier, a second version package identifier, and a hash value. The server performs verification processing on the version update package, for example, by comparing whether the hash value of the version update package is consistent with the hash value in the first update message. If the verification passes, the server retrieves the first version package corresponding to the first version package identifier from the version update package to perform the deployment operation of the first version package.
[0049] For example, the preset instructions are obtained, including a stop service instruction, a system update instruction, and a start service instruction. Based on the preset instructions and the first version package, the target application system is updated, and a first update response information is sent to the preset server. The first update response information includes the execution information of the preset instructions during the update of the target application system based on the first version package. The preset server includes a preset script and a version update log. The preset script provides the preset instructions required for updating the target application system, and the version update log records the server's version update information, including the execution information of the preset instructions. For example, the preset instructions instruct the server to perform a series of operations such as parsing the version package, verifying the version package, controlling the target application system to stop service, replacing relevant files of the target application system, and controlling the target application system to start service. The version update log can also record the execution status of each server's version update instructions.
[0050] In some embodiments, a preset script can be deployed on a preset server. It is understood that the preset server can refer to a server or computer where the preset script is deployed, and may also be called a version control machine. Running the preset script sends preset instructions to each server in the server cluster, enabling automatic and batch updates of the server cluster and improving version update efficiency.
[0051] Alternatively, the pre-defined script can be deployed on each server in the server cluster. Running the pre-defined script controls the target application system to perform version updates.
[0052] The first update response message includes response information for the preset command. For example, the first update response message includes an update start identifier and an update end identifier.
[0053] In some embodiments, the preset server further includes a version update log, which records version update information of the server, including execution information of the preset instructions. The version update information indicates the server's execution status of the preset instructions, etc. For example, the preset server obtains the server's execution status of the preset instructions based on a first update response message and records the execution status in the version update log. The preset server receives the first update response message sent by the server. If all operations of the preset instructions are successfully executed, it determines that the server has completed the version update of the target application system based on the first version package. Alternatively, the preset server determines whether the server has completed the version update based on the first version package based on the update start time and update completion time, achieving rapid determination of the server's update status. If the server has completed the version update based on the first version package, a second update message is sent to the server. The second update message is used to trigger the server to perform a second-stage version update operation. For example, the second update message includes preset instructions, etc.
[0054] Optionally, the first update response message may also include service startup response information. This service startup response information indicates the service startup status. The default server can determine whether the target application system on the server has completed the update based on the service startup response information. For example, if the default server receives a service startup response indicating successful startup, it determines that the target application system on the server has completed the update.
[0055] S130. In response to the second update message, obtain the second version package in the version update package, and update the target application system based on the second version package.
[0056] For example, for a server in a server cluster, if the first phase of the version update operation for the target application system is completed, the target application system on the server is updated based on the second version package.
[0057] In some embodiments, the second update message is received, wherein the second update message includes a preset instruction; the second version package in the version update package is obtained; and the target application system is updated based on the preset instruction and the second version package.
[0058] After completing the first phase of the target application system's version update, a pre-defined server runs a pre-defined script, sending pre-defined instructions to the server to parse and verify the second version package. Once the second version package passes verification, the script controls the target application system to stop service, replace related files, and restart service, thus completing the second phase of the version update. At this point, since both the caller's first target application system and the callee's second target application system respond in a manner compatible with both GBK and UTF-8 encoding, the order in which the second phase of the version update is deployed will not affect the target application system's correct response to the target request.
[0059] The technical solution of this invention ensures that HTTP calls in the server cluster are not affected by production switching, and that the target application system can automatically adapt to UTF-8 encoding after production is completed. This avoids the problem of incompatibility between the encoding formats of the old and new versions of the system during system startup, which could lead to garbled characters for rare characters.
[0060] Figure 3 This is a schematic diagram illustrating another inter-system calling method provided in an embodiment of the present invention. For example... Figure 3As shown, a first target application system (e.g., system A) 310 calls a second target application system (e.g., system B) 320. The first target application system 310 encodes the content to be transmitted using UTF-8 to obtain encoded characters. It determines the encoding method field in the HTTP request header to be UTF-8 encoded, uses the encoded characters as the request body, obtains the HTTP request, and sends the HTTP request to the second target application system 320. The second target application system 320 receives the HTTP request, parses it to obtain the encoding method field in the request header. Since the encoding method field is UTF-8 encoded, it decodes the encoded characters using UTF-8 encoding to obtain the corresponding text. The second target application system 320 encodes the response information using UTF-8 encoding and generates an HTTP response to return to the first target application system 310. Similarly, the second target application system 320 encodes the content to be transmitted using UTF-8 to obtain encoded characters. The HTTP request header's encoding field is determined to be UTF-8 encoded. The encoded characters are used as the request body to obtain the HTTP request, which is then sent to the first target application system 310. The first target application system 310 receives the HTTP request and parses it to obtain the encoding field in the request header. Since the encoding field is UTF-8 encoded, the encoded characters are decoded using UTF-8 encoding to obtain the corresponding text. The first target application system 310 encodes the response information using UTF-8 encoding and generates an HTTP response to return to the second target application system 320. Since the encoding field is UTF-8 encoded, the second target application system 320 decodes the response information using UTF-8 encoding.
[0061] The technical solution of this disclosure embodiment, for a server in a server cluster, obtains a first update message sent by a preset server. The first update message includes a first version package and a second version package of the target application system. Since the first version package includes first code and the second version package includes second code, the first code is used to instruct the target application system to respond to the target request according to the encoding method of the received target request, and the second code is used to instruct the target application system to encode the content to be transmitted using the first encoding method to obtain the target request, providing a data foundation for two system deployments. Further, the first version package in the version update package is obtained, and the target application system is updated based on the first version package, so that the target application system responds to the target request according to the encoding method of the received target request. This achieves step-by-step execution of the target application system deployment, enabling compatible responses to target requests with different encoding methods even when the old and new systems coexist during deployment, avoiding the problem of garbled characters. After the version update based on the first version package is completed, a first update response message is returned to the preset server to indicate that the current server has completed the update of the target application system based on the first version package, thereby triggering the preset server to send a second update message. Furthermore, in response to the second update message, the second version package in the version update package is obtained. Based on the second version package, the target application system is updated again, so that the target application system adopts the first encoding method to encode the content to be transmitted. This achieves the switching of the encoding method of the request from the second encoding method to the first encoding method without stopping the system, thus avoiding affecting the stability of the system. In this embodiment of the invention, by deploying the system twice based on two versions, a seamless transition between systems is achieved. This avoids the problem of using the first encoding format to respond to the target request in the second encoding format during the switching process, which would lead to garbled characters due to uncommon characters. This improves the accuracy of request response and the stability of the system.
[0062] Figure 4 This is a flowchart of an information processing method provided by an embodiment of the present invention. Based on the above embodiments, this disclosure adds a third-stage version update step.
[0063] like Figure 4 As shown, the method includes:
[0064] S410. Obtain a first update message sent by a preset server. The first update message includes a version update package of the target application system. The version update package includes a first version package, a second version package, and a third version package. The first version package includes a first code, the second version package includes a second code, and the third version package includes a third code. The first code is used to instruct the target application system to respond to the target request according to the encoding method of the received target request. The second code is used to instruct the target application system to encapsulate the content to be transmitted into the target request to be transmitted using the first encoding method. The third code is used to instruct the target application system to respond to the received target request using the first encoding method.
[0065] The third code is program code that switches the target application system's response from being compatible with different encoding methods to responding with the first encoding method. This embodiment of the disclosure avoids the step of determining the encoding method based on the encoding method field of the target request by switching the target application system's response from being compatible with different encoding methods to the first encoding method, thus saving operational steps and improving request-response efficiency.
[0066] Since the target application system uses the first encoding method to encode requests after completing the second phase of version update, the third code can be used to enable the target application system to directly use the first encoding method to respond to the target request, thereby improving the request response efficiency.
[0067] S420. Obtain the first version package from the version update package, update the target application system based on the first version package, and send a first update response message to the preset server. The first update response message is used to trigger the preset server to send a second update message to the server that has completed the first version update stage. The first version update stage represents the version update of the target application system based on the first version package.
[0068] S430. In response to the second update message, obtain the second version package in the version update package, and update the target application system based on the second version package.
[0069] S440. In response to the completion of the version update of the target application system based on the second version package, a second update response message is sent to the preset server, wherein the second update response message is used to trigger the preset server to send a third update message to the server that has completed the second version update stage, and the second version update stage represents the version update of the target application system based on the second version package.
[0070] The third update message is a message sent by the default server to the server that has completed the version update based on the second version package. The third update message includes default instructions, etc.
[0071] S450. Receive the third update message, wherein the third update message includes a preset instruction.
[0072] S460. Obtain the third version package from the version update package.
[0073] For example, the version update package also includes a third version identifier. The third version package corresponding to the third version package identifier is retrieved from the version update package.
[0074] S470. Based on the preset instructions and the third version package, update the target application system.
[0075] Since the first and second phases of version updates for the target application system are executed sequentially, the first phase update enables the target application system to respond to both GBK and UTF-8 encoded target requests. The second phase update, while maintaining compatibility with both GBK and UTF-8 encoded target requests, uses UTF-8 encoding for the content to be transmitted in the target request. After the second phase update is completed, the target application system can be controlled to perform a third phase update. Optionally, the first code in the server can be replaced with the third code from the third version packet to enable the target application system to respond to UTF-8 encoded target requests.
[0076] For example, based on the preset instructions and the third version package, the first code is replaced with the third code to update the target application system.
[0077] After completing the second phase of the target application system's version update, a pre-defined server runs a pre-defined script, sending pre-defined instructions to the server to parse and verify the third version package. Once the third version package passes verification, the script controls the target application system to stop service, replaces relevant files, and restarts service, thus achieving the third phase of the version update. In this third phase, the first code is replaced with a third code, causing the target application system to switch to responding to UTF-8 encoded target requests. This omits the step of identifying the target request's encoding method and responding with the appropriate encoding.
[0078] In some embodiments, a first target application system (e.g., system A) calls a second target application system (e.g., system B). The first target application system encodes the content to be transmitted using UTF-8 to obtain encoded characters. It determines the encoding method field in the HTTP request header to be UTF-8 encoded, uses the encoded characters as the request body, obtains the HTTP request, and sends the HTTP request to the second target application system. The second target application system receives the HTTP request, decodes the encoded characters in the HTTP request using UTF-8 encoding, and obtains the text corresponding to the encoded characters. The second target application system encodes the response information using UTF-8 encoding and generates an HTTP response to return to the first target application system.
[0079] The technical solution of this disclosure provides a data foundation for three phases of system deployment by acquiring a first version package, a second version package, and a third version package of the target application system. The first version package includes first code, the second version package includes second code, and the third version package includes third code. The first code instructs the target application system to respond to the target request according to the encoding method of the received target request. The second code instructs the target application system to encode the content to be transmitted using the first encoding method to obtain the target request. The third code instructs the target application system to respond to the received target request using the first encoding method. Further, the target application system is updated based on the first version package, enabling it to respond to the target request according to the encoding method of the received target request. This achieves phased execution of the target application system deployment, ensuring compatibility with different encoding methods even when the old and new systems coexist during deployment, avoiding the problem of garbled characters. After the version update based on the first version package is completed, a first update response message is returned to a preset server to indicate that the server has completed the update of the target application system based on the first version package, thereby triggering the preset server to send a second update message. Furthermore, in response to the second update message, the second version package in the version update package is obtained. Based on the second version package, the target application system is updated again to enable the target application system to encode the content to be transmitted using the first encoding method. This allows the encoding method of the request to be switched from the second encoding method to the first encoding method without system downtime, avoiding impact on system stability. After the version update based on the second version package is completed, a second update response message is returned to the preset server to indicate that the server has completed the update of the target application system based on the second version package, thereby triggering the preset server to send a third update message. Furthermore, in response to the third update message, the target application system is updated again based on the third version package to enable the target application system to respond to the target request using the first encoding method. This avoids the step of determining the encoding method based on the encoding method field of the target request, saving operational steps and improving request-response efficiency.
[0080] Figure 5 This is a schematic diagram of an information processing device provided in an embodiment of the present invention. The device can be implemented in software and / or hardware, optionally through an electronic device, such as a server in a server cluster. The server includes a target application system.
[0081] like Figure 5 As shown, the device includes: a message acquisition module 510, a first version update module 520, and a second version update module 530.
[0082] The message acquisition module 510 is used to acquire a first update message sent by a preset server. The first update message includes a version update package of the target application system. The version update package includes a first version package and a second version package. The first version package includes a first code, and the second version package includes a second code. The first code is used to instruct the target application system to respond to the target request according to the encoding method of the received target request. The second code is used to instruct the target application system to encapsulate the content to be transmitted into the target request to be transmitted using the first encoding method.
[0083] The first version update module 520 is used to obtain the first version package in the version update package, update the target application system based on the first version package, and send a first update response message to the preset server. The first update response message is used to trigger the preset server to send a second update message to the server that has completed the first version update stage. The first version update stage represents the version update of the target application system based on the first version package.
[0084] The second version update module 530 is used to respond to the second update message, obtain the second version package in the version update package, and perform a version update on the target application system based on the second version package.
[0085] Optionally, the first code is used to perform the following steps:
[0086] Parse the received target request to obtain the encoding method field and the encoded characters;
[0087] The encoded character is decoded based on the encoding method field to obtain the content to be transmitted corresponding to the encoded character.
[0088] Optionally, decoding the encoded character based on the encoding method field to obtain the content to be transmitted corresponding to the encoded character includes:
[0089] If the encoding method field represents the first encoding method, the encoded character is decoded using the first encoding method to obtain the text corresponding to the encoded character;
[0090] If the encoding method field represents a second encoding method, the encoded character is decoded using the second encoding method to obtain the text corresponding to the encoded character.
[0091] Optionally, the first encoding method is UTF-8 encoding, and the second encoding method is GBK encoding.
[0092] Optionally, the second code is used to perform the following steps:
[0093] The content to be transmitted is encoded using the first encoding method to obtain the encoded characters corresponding to the content to be transmitted.
[0094] Based on the first encoding method, the encoding method field in the request header is determined, and based on the encoded characters, the request body is determined to obtain the target request to be transmitted.
[0095] Optionally, it also includes:
[0096] A receive response message is sent to the preset server. The receive response message indicates the reception status of the first update message. The receive response message is used to notify the preset server to send a preset instruction to the server whose reception status is successful. The preset instruction includes multiple instruction information for updating the target application system.
[0097] Optionally, the first version update module 520 is specifically used for:
[0098] Obtain the preset instructions, wherein the preset instructions include a stop service instruction, a system update instruction, and a start service instruction;
[0099] Based on the preset instruction and the first version package, the target application system is updated, and a first update response information is sent to the preset server. The first update response information includes the execution information of the preset instruction during the process of updating the target application system based on the first version package.
[0100] Optionally, the preset server includes a preset script and a version update log. The preset script is used to provide the preset instructions required for updating the target application system. The version update log is used to record the version update information of the server, including the execution information of the preset instructions.
[0101] Optionally, the second version update module 530 is specifically used for:
[0102] Receive the second update message, wherein the second update message includes a preset instruction;
[0103] Obtain the second version package from the version update package;
[0104] Based on the preset instructions and the second version package, the target application system is updated.
[0105] Optionally, it also includes:
[0106] The version update package also includes a third version package, which includes third code, wherein the third code is used to instruct the target application system to respond to the received target request using the first encoding method;
[0107] In response to the completion of the version update of the target application system based on the second version package, a second update response message is sent to the preset server, wherein the second update response message is used to trigger the preset server to send a third update message to the server that has completed the second version update stage, and the second version update stage represents the version update of the target application system based on the second version package;
[0108] Receive the third update message, wherein the third update message includes a preset instruction;
[0109] Obtain the third version package from the aforementioned version update package;
[0110] Based on the preset instructions and the third version package, the target application system is updated.
[0111] Optionally, updating the target application system based on the preset instructions and the third version package includes:
[0112] Based on the preset instructions and the third version package, the first code is replaced with the third code to update the target application system.
[0113] The information processing apparatus provided in the embodiments of the present invention can execute the information processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.
[0114] Figure 6 This is a schematic diagram of an electronic device provided for an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, and other suitable computers. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0115] like Figure 6As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0116] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0117] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as an information processing method.
[0118] In some embodiments, an information processing method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform an information processing method by any other suitable means (e.g., by means of firmware).
[0119] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0120] Computer programs used to implement the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable rule-based decision-making apparatus, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0121] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0122] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0123] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0124] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0125] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the information processing method provided in any embodiment of this application.
[0126] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0127] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. An information processing method characterized by comprising: A server used in a server cluster, the server including the target application system, including: Obtain a first update message sent by a preset server. The first update message includes a version update package of the target application system. The version update package includes a first version package and a second version package. The first version package includes a first code, and the second version package includes a second code. The first code is used to instruct the target application system to respond to the target request according to the encoding method of the received target request. The second code is used to instruct the target application system to encapsulate the content to be transmitted into the target request to be transmitted using the first encoding method. Obtain the first version package from the version update package, update the target application system based on the first version package, and send a first update response message to the preset server. The first update response message is used to trigger the preset server to send a second update message to the server that has completed the first version update stage. The first version update stage represents the version update of the target application system based on the first version package. In response to the second update message, the second version package in the version update package is obtained, and the target application system is updated based on the second version package.
2. The method of claim 1, wherein, The first code is used to perform the following steps: Parse the received target request to obtain the encoding method field and the encoded characters; The encoded character is decoded based on the encoding method field to obtain the content to be transmitted corresponding to the encoded character.
3. The method according to claim 2, characterized in that, Decoding the encoded character based on the encoding method field to obtain the content to be transmitted corresponding to the encoded character includes: If the encoding method field represents the first encoding method, the encoded character is decoded using the first encoding method to obtain the text corresponding to the encoded character; If the encoding method field represents a second encoding method, the encoded character is decoded using the second encoding method to obtain the text corresponding to the encoded character.
4. The method according to claim 3, characterized in that, The first encoding method is UTF-8 encoding, and the second encoding method is GBK encoding.
5. The method according to claim 1, characterized in that, The second code is used to perform the following steps: The content to be transmitted is encoded using the first encoding method to obtain the encoded characters corresponding to the content to be transmitted. Based on the first encoding method, the encoding method field in the request header is determined, and based on the encoded characters, the request body is determined to obtain the target request to be transmitted.
6. The method according to claim 1, characterized in that, After obtaining the first update message sent by the preset server, the method further includes: A receive response message is sent to the preset server. The receive response message represents the reception status of the first update message. The receive response message is used to notify the preset server to send a preset instruction to the server whose reception status is successful. The preset instruction includes multiple instruction information for updating the target application system.
7. The method according to claim 6, characterized in that, The step of updating the target application system based on the first version package and sending a first update response message to the preset server includes: Obtain the preset instructions, wherein the preset instructions include a stop service instruction, a system update instruction, and a start service instruction; Based on the preset instruction and the first version package, the target application system is updated, and a first update response information is sent to the preset server. The first update response information includes the execution information of the preset instruction during the process of updating the target application system based on the first version package.
8. The method according to claim 6, characterized in that, The preset server includes a preset script and a version update log. The preset script is used to provide the preset instructions required for updating the target application system. The version update log is used to record the version update information of the server, including the execution information of the preset instructions.
9. The method according to claim 1, characterized in that, The step of responding to the second update message, obtaining the second version package from the version update package, and updating the target application system based on the second version package includes: Receive the second update message, wherein the second update message includes a preset instruction; Obtain the second version package from the version update package; Based on the preset instructions and the second version package, the target application system is updated.
10. The method according to claim 1, characterized in that, The version update package also includes a third version package, which includes third code. The third code is used to instruct the target application system to respond to the received target request using the first encoding method. The method further includes: In response to the completion of the version update of the target application system based on the second version package, a second update response message is sent to the preset server, wherein the second update response message is used to trigger the preset server to send a third update message to the server that has completed the second version update stage, and the second version update stage represents the version update of the target application system based on the second version package; Receive the third update message, wherein the third update message includes a preset instruction; Obtain the third version package from the aforementioned version update package; Based on the preset instructions and the third version package, the target application system is updated.
11. The method according to claim 10, characterized in that, The process of updating the target application system based on the preset instructions and the third version package includes: Based on the preset instructions and the third version package, the first code is replaced with the third code to update the target application system.
12. An information processing device, characterized in that, A server used in a server cluster, the server including the target application system, including: The message acquisition module is used to acquire a first update message sent by a preset server. The first update message includes a version update package of the target application system. The version update package includes a first version package and a second version package. The first version package includes a first code, and the second version package includes a second code. The first code is used to instruct the target application system to respond to the target request according to the encoding method of the received target request. The second code is used to instruct the target application system to encapsulate the content to be transmitted into the target request to be transmitted using the first encoding method. The first version update module is used to obtain the first version package in the version update package, update the target application system based on the first version package, and send a first update response message to the preset server. The first update response message is used to trigger the preset server to send a second update message to the server that has completed the first version update stage. The first version update stage represents the version update of the target application system based on the first version package. The second version update module is used to respond to the second update message, obtain the second version package in the version update package, and update the target application system based on the second version package.
13. An electronic device, characterized in that, The invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, implements the information processing method as described in any one of claims 1-11.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the information processing method as described in any one of claims 1-11.
15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the information processing method as described in any one of claims 1-11.